-
Notifications
You must be signed in to change notification settings - Fork 4
Description
I threw this together really quickly to make it easier for docker users to not only install Emby Party, but to keep it installed between Emby container updates as well. Hopefully, installation will be handled by the plugin in the future.
Quick Install
If you have an Emby container already running, you can edit the CONTAINER_NAME variable to the name of your container and paste the entire script in your terminal to install Emby Party.
install-emby-party.sh
#!/bin/sh
CONTAINER_NAME='emby'
PLUGIN_DLL='https://github.com/Protected/EmbyParty/releases/download/v1.0.0/EmbyParty.dll'
INJECT_AFTER='function(e,title){this.setTitle(title)}.bind(instance))'
INJECT_MODULE=';Emby.importModule("./modules/embyparty/partyheader.js").then(function(PartyHeader) { return (new PartyHeader()).show(skinHeaderElement.querySelector(".headerRight")); });'
sleep 5
docker exec $CONTAINER_NAME sh -c "wget $PLUGIN_DLL -O config/plugins/EmbyParty.dll"
docker exec $CONTAINER_NAME sh -c "sed -i 's|$INJECT_AFTER|$INJECT_AFTER$INJECT_MODULE|' /system/dashboard-ui/modules/appheader/appheader.js"
docker restart $CONTAINER_NAMEQuick uninstall
If you have an Emby container already running, you can edit the CONTAINER_NAME variable to the name of your container and paste the entire script in your terminal to uninstall Emby Party.
You will need to manually create your container again. If you use docker run, this means remembering the cli arguments to setup your Emby container again.
uninstall-emby-party.sh
#!/bin/sh
#!/bin/sh
CONTAINER_NAME='emby'
docker exec $CONTAINER_NAME sh -c "rm config/plugins/EmbyParty.dll"
docker stop $CONTAINER_NAME
docker container rm $CONTAINER_NAME
# Create the container againPersistent Install
Due to the ephemeral nature of docker containers, the required modification of appheader.js will not persist when the container is destroyed. This includes updating the Emby container.
A quick and easy solution to that is to create a docker container that will install Emby Party. This is best done via docker compose.
- Simply modify your current compose file and add the
install-emby-partyservice. - You will also need to add
install-emby-party.shin the same directory as your compose file. - The label
com.centurylinklabs.watchtower.depends-onensures that Emby updates via Watchtower will run the Emby Party installer.
compose.yaml
services:
emby:
[...]
labels:
- com.centurylinklabs.watchtower.depends-on=install-emby-party
[...]
install-emby-party:
image: docker:27.4.1-cli-alpine3.21
container_name: install-emby-party
depends_on: [emby]
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./install-emby-party.sh:/install.sh
entrypoint: ["sh", "-c", "chmod +x ./install.sh && ./install.sh"]Important
Any changes to the end of the render function in appheader.js will break this installer script. The INJECT_AFTER variable will need to be updated again to match text that exists at the end of the render function.