Save uncommitted changes
Build / Lint & Test (push) Successful in 15s

This commit is contained in:
PickleRick committed 2026-09-21 12:46:44 +02:00
1 parent 880ec5bc6d
commit 2cf22ef628
2 files changed
+36 -8

No files matched your search

+14
View File
@@ -19,6 +19,20 @@ curl -fsSL https://git.cdtech.freeddns.org/PickleRick/Tdarr-plugin/raw/branch/ma
| bash -s -- /your/tdarr/plugins/FlowPlugins | bash -s -- /your/tdarr/plugins/FlowPlugins
``` ```
By default, the installer downloads only the latest version of every plugin.
Use `--all` to download every version retained in the repository:
```bash
# Latest versions of all plugins
./install.sh /your/tdarr/plugins/FlowPlugins --latest
# All available versions of all plugins
./install.sh /your/tdarr/plugins/FlowPlugins --all
# All available versions of selected plugins
./install.sh /your/tdarr/plugins/FlowPlugins --all replaceOriginalFile copyToWorkDir
```
**Update a single plugin** (e.g. after a bug fix): **Update a single plugin** (e.g. after a bug fix):
```bash ```bash
curl -fsSL https://git.cdtech.freeddns.org/PickleRick/Tdarr-plugin/raw/branch/main/install.sh \ curl -fsSL https://git.cdtech.freeddns.org/PickleRick/Tdarr-plugin/raw/branch/main/install.sh \
+22 -8
View File
@@ -2,9 +2,11 @@
# install.sh — Update Tdarr plugins from Gitea raw file URLs. # install.sh — Update Tdarr plugins from Gitea raw file URLs.
# #
# Usage: # Usage:
# ./install.sh <PLUGIN_DIR> # update ALL plugins # ./install.sh <PLUGIN_DIR> # latest version of ALL plugins
# ./install.sh <PLUGIN_DIR> transcode2PassX265 # update ONE plugin # ./install.sh <PLUGIN_DIR> --latest # latest version of ALL plugins
# ./install.sh <PLUGIN_DIR> p1 p2 p3 # update MULTIPLE plugins # ./install.sh <PLUGIN_DIR> --all # every available plugin version
# ./install.sh <PLUGIN_DIR> --all p1 p2 # every version of selected plugins
# ./install.sh <PLUGIN_DIR> --latest p1 p2 # latest version of selected plugins
# #
# Or pipe directly from Gitea (no clone needed): # Or pipe directly from Gitea (no clone needed):
# curl -fsSL https://git.cdtech.freeddns.org/PickleRick/Tdarr-plugin/raw/branch/main/install.sh \ # curl -fsSL https://git.cdtech.freeddns.org/PickleRick/Tdarr-plugin/raw/branch/main/install.sh \
@@ -48,7 +50,14 @@ fi
PLUGIN_DIR="$1" PLUGIN_DIR="$1"
shift shift
# If no specific plugins requested, update all # Version mode defaults to the latest version only.
VERSION_MODE="latest"
if [[ "${1:-}" == "--all" || "${1:-}" == "--latest" ]]; then
VERSION_MODE="${1#--}"
shift
fi
# If no specific plugins requested, update all.
if [[ $# -eq 0 ]]; then if [[ $# -eq 0 ]]; then
TARGETS=("${!PLUGIN_CATEGORY[@]}") TARGETS=("${!PLUGIN_CATEGORY[@]}")
else else
@@ -66,10 +75,13 @@ download_plugin() {
fi fi
local versions="1.0.0" local versions="1.0.0"
if [[ "$name" == "copyToWorkDir" ]]; then if [[ "$VERSION_MODE" == "all" ]]; then
case "$name" in
copyToWorkDir) versions="1.0.0 2.0.0" ;;
replaceOriginalFile) versions="1.0.0 2.0.0" ;;
esac
elif [[ "$name" == "copyToWorkDir" || "$name" == "replaceOriginalFile" ]]; then
versions="2.0.0" versions="2.0.0"
elif [[ "$name" == "replaceOriginalFile" ]]; then
versions="1.0.0 2.0.0"
fi fi
for version in $versions; do for version in $versions; do
@@ -109,7 +121,9 @@ for plugin in "${TARGETS[@]}"; do
download_plugin "$plugin" || ERRORS=$((ERRORS + 1)) download_plugin "$plugin" || ERRORS=$((ERRORS + 1))
done done
if [[ $# -eq 0 || " ${TARGETS[*]} " == *" copyToWorkDir "* || " ${TARGETS[*]} " == *" replaceOriginalFile "* ]]; then if [[ "$VERSION_MODE" == "all"
|| " ${TARGETS[*]} " == *" copyToWorkDir "*
|| " ${TARGETS[*]} " == *" replaceOriginalFile "* ]]; then
download_progress_helper || ERRORS=$((ERRORS + 1)) download_progress_helper || ERRORS=$((ERRORS + 1))
fi fi