-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Emby server: adjust module options to match changes
- Loading branch information
1 parent
a0d0db9
commit 9ed70ab
Showing
9 changed files
with
123 additions
and
31 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
=== "Access to the web interface" | ||
|
||
The web interface is accessible via port **8096**: | ||
|
||
- URL: `https://<your.IP>:8096` | ||
|
||
=== "Directories" | ||
|
||
- Install directory: `/armbian/emby` | ||
- Site configuration directory: `/armbian/emby/config` | ||
- Data directory: `/armbian/emby/tvshows` `/armbian/emby/movies` | ||
|
||
=== "View logs" | ||
|
||
```sh | ||
docker logs -f emby | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Emby organizes video, music, live TV, and photos from personal media libraries and streams them to smart TVs, streaming boxes and mobile devices. This container is packaged as a standalone emby Media Server. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
module_options+=( | ||
["module_emby,author"]="@schwar3kat" | ||
["module_emby,maintainer"]="@igorpecovnik" | ||
["module_emby,feature"]="module_emby" | ||
["module_emby,example"]="install remove purge status help" | ||
["module_emby,desc"]="Install embyserver container" | ||
["module_emby,status"]="Active" | ||
["module_emby,doc_link"]="https://emby.media" | ||
["module_emby,group"]="Media" | ||
["module_emby,port"]="8096" | ||
["module_emby,arch"]="x86-64 arm64" | ||
) | ||
# | ||
# Module Emby server | ||
# | ||
function module_emby () { | ||
local title="emby" | ||
local condition=$(which "$title" 2>/dev/null) | ||
|
||
if pkg_installed docker-ce; then | ||
local container=$(docker container ls -a | mawk '/emby?( |$)/{print $1}') | ||
local image=$(docker image ls -a | mawk '/emby?( |$)/{print $3}') | ||
fi | ||
|
||
local commands | ||
IFS=' ' read -r -a commands <<< "${module_options["module_emby,example"]}" | ||
|
||
EMBY_BASE="${SOFTWARE_FOLDER}/emby" | ||
|
||
case "$1" in | ||
"${commands[0]}") | ||
pkg_installed docker-ce || module_docker install | ||
[[ -d "$EMBY_BASE" ]] || mkdir -p "$EMBY_BASE" || { echo "Couldn't create storage directory: $EMBY_BASE"; exit 1; } | ||
docker run -d \ | ||
--name=emby \ | ||
--net=lsio \ | ||
-e PUID=1000 \ | ||
-e PGID=1000 \ | ||
-e TZ="$(cat /etc/timezone)" \ | ||
-p 8096:8096 \ | ||
-v "${EMBY_BASE}/emby/library:/config" \ | ||
-v "${EMBY_BASE}/movies:/movies" \ | ||
-v "${EMBY_BASE}/tvshows:/tvshows" \ | ||
--restart unless-stopped \ | ||
lscr.io/linuxserver/emby:latest | ||
for i in $(seq 1 20); do | ||
if docker inspect -f '{{ index .Config.Labels "build_version" }}' emby >/dev/null 2>&1 ; then | ||
break | ||
else | ||
sleep 3 | ||
fi | ||
if [ $i -eq 20 ] ; then | ||
echo -e "\nTimed out waiting for ${title} to start, consult your container logs for more info (\`docker logs emby\`)" | ||
exit 1 | ||
fi | ||
done | ||
;; | ||
"${commands[1]}") | ||
[[ "${container}" ]] && docker container rm -f "$container" >/dev/null | ||
[[ "${image}" ]] && docker image rm "$image" >/dev/null | ||
;; | ||
"${commands[2]}") | ||
[[ -n "${EMBY_BASE}" && "${EMBY_BASE}" != "/" ]] && rm -rf "${EMBY_BASE}" | ||
;; | ||
"${commands[3]}") | ||
if [[ "${container}" && "${image}" ]]; then | ||
return 0 | ||
else | ||
return 1 | ||
fi | ||
;; | ||
"${commands[4]}") | ||
echo -e "\nUsage: ${module_options["module_embyserver,feature"]} <command>" | ||
echo -e "Commands: ${module_options["module_embyserver,example"]}" | ||
echo "Available commands:" | ||
echo -e "\tinstall\t- Install $title." | ||
echo -e "\tstatus\t- Installation status $title." | ||
echo -e "\tremove\t- Remove $title." | ||
echo -e "\tremove\t- Purge $title." | ||
echo | ||
;; | ||
*) | ||
${module_options["module_embyserver,feature"]} ${commands[4]} | ||
;; | ||
esac | ||
} |