Skip to content

Commit

Permalink
#117 Cannot switch easily between stores
Browse files Browse the repository at this point in the history
  • Loading branch information
pdulvp committed Nov 19, 2024
1 parent b1f4df7 commit a6ca39f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ See **[pdulvp.fr/qnap-store](https://pdulvp.fr/qstore.html)**
## <img alt="build icon" src="https://raw.githubusercontent.com/pdulvp/pdulvp/main/icons/build.png" width="24px"/> Build <img alt="arrow" src="https://raw.githubusercontent.com/pdulvp/pdulvp/main/icons/downarrow.png" height="24px"/>

### Requirements
- WSL debian bullseye with rsync installed
- WSL debian bullseye with rsync and jq installed
- QDK2 : https://github.com/qnap-dev/qdk2/releases
- Visual Studio 2022

Expand Down
19 changes: 18 additions & 1 deletion packaging/shared/jellyfin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
CONF=/etc/config/qpkg.conf
QPKG_NAME="jellyfin"
QPKG_ROOT=`/sbin/getcfg $QPKG_NAME Install_Path -f ${CONF}`
CMD_SETCFG="/sbin/setcfg"

PDULVP_STORE="d118acb17dd1c34e962e8c0de3628ba1"
PDULVP_PRE_STORE="d808fb70d08462529b9d3275874b2f45"

export PATH=$QPKG_ROOT/jellyfin/bin:$QPKG_ROOT/jellyfin-ffmpeg:$PATH

source $QPKG_ROOT/jellyfin-config.sh
Expand All @@ -25,6 +30,10 @@ jellyfin_stop(){
rm -rf /usr/lib/jellyfin-ffmpeg
}

link_to_store(){
${CMD_SETCFG} "${QPKG_NAME}" "store" "$1" -f "${CONF}"
}

case "$1" in
start)
ENABLED=$(/sbin/getcfg $QPKG_NAME Enable -u -d FALSE -f $CONF)
Expand All @@ -44,8 +53,16 @@ case "$1" in
$0 start
;;

link_to_default_store)
link_to_store "$PDULVP_STORE"
;;

link_to_prerelease_store)
link_to_store "$PDULVP_PRE_STORE"
;;

*)
echo "Usage: $0 {start|stop|restart}"
echo "Usage: $0 {start|stop|restart|link_to_default_store|link_to_prerelease_store}"
exit 1
esac

Expand Down

0 comments on commit a6ca39f

Please sign in to comment.