1
0
mirror of https://github.com/gilbN/theme.park.git synced 2024-07-15 00:57:32 +02:00

multiple addons for plex

This commit is contained in:
gilbn 2021-08-22 12:46:09 +02:00
parent daf073b38d
commit 7b187474a4

View File

@ -42,7 +42,9 @@ if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}"/usr/lib/plexmediaserver/Resources/Plug-ins-*/WebClient.bundle/Contents/Resources/index.html
printf 'Stylesheet set to %s\n' "${TP_THEME}"
if [[ -n ${TP_ADDON} ]]; then
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/addons\/plex\/${TP_ADDON}\/${TP_ADDON}.css'><\/head> /g" "${APP_FILEPATH}"/usr/lib/plexmediaserver/Resources/Plug-ins-*/WebClient.bundle/Contents/Resources/index.html
printf 'Added custom addon: %s\n\n' "${TP_ADDON}"
for addon in $(echo "$TP_ADDON" | tr "|" " "); do
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/addons\/plex\/${addon}\/${addon}.css'><\/head> /g" "${APP_FILEPATH}"/usr/lib/plexmediaserver/Resources/Plug-ins-*/WebClient.bundle/Contents/Resources/index.html
printf 'Added custom addon: %s\n\n' "${addon}"
done
fi
fi