2018: adding option to clear codecs folder on addon start

This commit is contained in:
dm82m
2025-08-09 17:57:55 +02:00
parent 09f93d4829
commit 9953932d14
2 changed files with 6 additions and 0 deletions

View File

@@ -173,6 +173,7 @@
"localdisks": "str?",
"networkdisks": "str?",
"skip_permissions_check": "bool?",
"clear_codecs_folder": "bool?",
"smbv1": "bool?"
},
"slug": "plex_nas",

View File

@@ -28,3 +28,8 @@ if ! bashio::config.true "skip_permissions_check" && [ "${PUID:-0}" != "0" ] &&
chown -R "$PUID:$PGID" /share/plex
chmod -R 777 /share/plex
fi
# Clear Codecs folder if checked
if ! bashio::config.true "clear_codecs_folder"; then
rm -rf /share/plex/Plex\ Media\ Server/Codecs
fi