fix: auto-fix linting issues

This commit is contained in:
alexbelgium
2025-07-23 08:58:09 +00:00
committed by github-actions[bot]
parent 3539f328fb
commit f5428e0950
224 changed files with 5663 additions and 5662 deletions

View File

@@ -7,84 +7,84 @@ LOCATION=$(bashio::config 'data_location')
# Check if config is located in an acceptable location
LOCATIONOK=""
for location in "/share" "/config" "/data" "/mnt"; do
if [[ "$LOCATION" == "$location"* ]]; then
LOCATIONOK=true
fi
if [[ "$LOCATION" == "$location"* ]]; then
LOCATIONOK=true
fi
done
if [ -z "$LOCATIONOK" ]; then
LOCATION=/config/addons_config/${HOSTNAME#*-}
bashio::log.fatal "Your data_location value can only be set in /share, /config or /data (internal to addon). It will be reset to the default location : $LOCATION"
LOCATION=/config/addons_config/${HOSTNAME#*-}
bashio::log.fatal "Your data_location value can only be set in /share, /config or /data (internal to addon). It will be reset to the default location : $LOCATION"
fi
# Set folders
if [ ! -d /jellyfin ]; then
echo "Creating /jellyfin"
mkdir -p /jellyfin
chown -R "$PUID:$PGID" /jellyfin
echo "Creating /jellyfin"
mkdir -p /jellyfin
chown -R "$PUID:$PGID" /jellyfin
fi
if [ ! -d "$LOCATION"/tv ]; then
echo "Creating $LOCATION/tv"
mkdir -p "$LOCATION"/tv
chown -R "$PUID:$PGID" "$LOCATION"/tv
echo "Creating $LOCATION/tv"
mkdir -p "$LOCATION"/tv
chown -R "$PUID:$PGID" "$LOCATION"/tv
fi
if [ ! -d "$LOCATION"/movies ]; then
echo "Creating $LOCATION/movies"
mkdir -p "$LOCATION"/movies
chown -R "$PUID:$PGID" "$LOCATION"/movies
echo "Creating $LOCATION/movies"
mkdir -p "$LOCATION"/movies
chown -R "$PUID:$PGID" "$LOCATION"/movies
fi
if [ ! -d "$LOCATION" ]; then
echo "Creating $LOCATION"
mkdir -p "$LOCATION"
chown -R "$PUID:$PGID" "$LOCATION"
echo "Creating $LOCATION"
mkdir -p "$LOCATION"
chown -R "$PUID:$PGID" "$LOCATION"
fi
# links
if [ ! -d /jellyfin/cache ]; then
echo "Creating link for /jellyfin/cache"
mkdir -p "$LOCATION"/cache
chown -R "$PUID:$PGID" "$LOCATION"/cache
ln -s "$LOCATION"/cache /jellyfin/cache
echo "Creating link for /jellyfin/cache"
mkdir -p "$LOCATION"/cache
chown -R "$PUID:$PGID" "$LOCATION"/cache
ln -s "$LOCATION"/cache /jellyfin/cache
fi
if [ ! -d /jellyfin/data ]; then
echo "Creating link for /jellyfin/data"
mkdir -p "$LOCATION"/data
chown -R "$PUID:$PGID" "$LOCATION"/data
ln -s "$LOCATION"/data /jellyfin/data
echo "Creating link for /jellyfin/data"
mkdir -p "$LOCATION"/data
chown -R "$PUID:$PGID" "$LOCATION"/data
ln -s "$LOCATION"/data /jellyfin/data
fi
if [ ! -d /jellyfin/log ]; then
echo "Creating link for /jellyfin/log"
mkdir -p "$LOCATION"/log
chown -R "$PUID:$PGID" "$LOCATION"/log
ln -s "$LOCATION"/log /jellyfin/log
echo "Creating link for /jellyfin/log"
mkdir -p "$LOCATION"/log
chown -R "$PUID:$PGID" "$LOCATION"/log
ln -s "$LOCATION"/log /jellyfin/log
fi
if [ ! -d /jellyfin/metadata ]; then
echo "Creating link for /jellyfin/metadata"
mkdir -p "$LOCATION"/metadata
chown -R "$PUID:$PGID" "$LOCATION"/metadata
ln -s "$LOCATION"/metadata /jellyfin/metadata
echo "Creating link for /jellyfin/metadata"
mkdir -p "$LOCATION"/metadata
chown -R "$PUID:$PGID" "$LOCATION"/metadata
ln -s "$LOCATION"/metadata /jellyfin/metadata
fi
if [ ! -d /jellyfin/plugins ]; then
echo "Creating link for /jellyfin/plugins"
mkdir -p "$LOCATION"/plugins
chown -R "$PUID:$PGID" "$LOCATION"/plugins
ln -s "$LOCATION"/plugins /jellyfin/plugins
echo "Creating link for /jellyfin/plugins"
mkdir -p "$LOCATION"/plugins
chown -R "$PUID:$PGID" "$LOCATION"/plugins
ln -s "$LOCATION"/plugins /jellyfin/plugins
fi
if [ ! -d /jellyfin/root ]; then
echo "Creating link for /jellyfin/root"
mkdir -p "$LOCATION"/root
chown -R "$PUID:$PGID" "$LOCATION"/root
ln -s "$LOCATION"/root /jellyfin/root
echo "Creating link for /jellyfin/root"
mkdir -p "$LOCATION"/root
chown -R "$PUID:$PGID" "$LOCATION"/root
ln -s "$LOCATION"/root /jellyfin/root
fi
# Legacy mode

View File

@@ -13,19 +13,19 @@ declare keyfile
port=$(bashio::addon.port 80)
if bashio::var.has_value "${port}"; then
bashio::config.require.ssl
bashio::config.require.ssl
if bashio::config.true 'ssl'; then
certfile=$(bashio::config 'certfile')
keyfile=$(bashio::config 'keyfile')
if bashio::config.true 'ssl'; then
certfile=$(bashio::config 'certfile')
keyfile=$(bashio::config 'keyfile')
mv /etc/nginx/servers/direct-ssl.disabled /etc/nginx/servers/direct.conf
sed -i "s/%%certfile%%/${certfile}/g" /etc/nginx/servers/direct.conf
sed -i "s/%%keyfile%%/${keyfile}/g" /etc/nginx/servers/direct.conf
mv /etc/nginx/servers/direct-ssl.disabled /etc/nginx/servers/direct.conf
sed -i "s/%%certfile%%/${certfile}/g" /etc/nginx/servers/direct.conf
sed -i "s/%%keyfile%%/${keyfile}/g" /etc/nginx/servers/direct.conf
else
mv /etc/nginx/servers/direct.disabled /etc/nginx/servers/direct.conf
fi
else
mv /etc/nginx/servers/direct.disabled /etc/nginx/servers/direct.conf
fi
fi
ingress_port=$(bashio::addon.ingress_port)

View File

@@ -28,8 +28,8 @@ sed -i "s|/usr/share/jellyfin|$LOCATION|g" /etc/nginx/servers/ingress.conf
# Custom transcode location
mkdir -p /data/transcodes
if [ -d "$LOCATION"/data/transcodes ]; then
cp -rT "$LOCATION"/data/transcodes /data/transcodes || true
rm -r "$LOCATION"/data/transcodes
cp -rT "$LOCATION"/data/transcodes /data/transcodes || true
rm -r "$LOCATION"/data/transcodes
fi
ln -s /data/transcodes "$LOCATION"/data/transcodes
chown -R "$PUID":"$PGID" /data/transcodes

View File

@@ -7,5 +7,5 @@ db=%%LOCATION%%/data/data/library.db
#Modify base
if [ -f $db ]; then
sqlite3 -quote ${db} "UPDATE 'TypedBaseItems' SET data = replace( data, '/config/jellyfin/', '%%LOCATION%%' ), path = replace( path, '/config/jellyfin/', '%%LOCATION%%' ) WHERE type='MediaBrowser.Controller.Entities.CollectionFolder';"
sqlite3 -quote ${db} "UPDATE 'TypedBaseItems' SET data = replace( data, '/config/jellyfin/', '%%LOCATION%%' ), path = replace( path, '/config/jellyfin/', '%%LOCATION%%' ) WHERE type='MediaBrowser.Controller.Entities.CollectionFolder';"
fi

0
jellyfin/rootfs/etc/services.d/nginx/run Normal file → Executable file
View File