|
|
|
@ -49,7 +49,6 @@ if find /config -type f -name "cookies.txt" | read; then
|
|
|
|
|
cookiesFile=""
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
pip install yt-dlp --upgrade --no-cache-dir &>/dev/null
|
|
|
|
|
arrItemData=$(curl -s "$arrUrl/api/v3/movie/$arrItemId?apikey=$arrApiKey")
|
|
|
|
|
itemTitle=$(echo "$arrItemData" | jq -r .title)
|
|
|
|
|
itemHasFile=$(echo "$arrItemData" | jq -r .hasFile)
|
|
|
|
@ -61,11 +60,8 @@ if [ ! -d "$itemPath" ]; then
|
|
|
|
|
log "$itemTitle :: ERROR: Item Path does not exist ($itemPath), Skipping..."
|
|
|
|
|
exit
|
|
|
|
|
fi
|
|
|
|
|
if [ -z "$itemTrailerId" ]; then
|
|
|
|
|
log "$itemTitle :: ERROR: No Trailer ID Found, Skipping..."
|
|
|
|
|
exit
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ ! -z "$itemTrailerId" ]; then
|
|
|
|
|
if [ ! -f "$itemPath/Trailer-trailer.mkv" ]; then
|
|
|
|
|
if [ ! -z "$cookiesFile" ]; then
|
|
|
|
|
yt-dlp --cookies "$cookiesFile" -o "$itemPath/Trailer-trailer" --write-sub --sub-lang $trailerLanguages --embed-subs --merge-output-format mkv --no-mtime --geo-bypass "https://www.youtube.com/watch?v=$itemTrailerId"
|
|
|
|
@ -73,8 +69,12 @@ if [ ! -f "$itemPath/Trailer-trailer.mkv" ]; then
|
|
|
|
|
yt-dlp -o "$itemPath/Trailer-trailer" --write-sub --sub-lang $trailerLanguages --embed-subs --merge-output-format mkv --no-mtime --geo-bypass "https://www.youtube.com/watch?v=$itemTrailerId"
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "$trailerSingle" == "true" ]; then
|
|
|
|
|
if [ ! -f "$itemPath/Trailer-trailer.mkv" ]; then
|
|
|
|
|
log "$itemTitle :: ERROR :: No Trailer ID Found, Skipping..."
|
|
|
|
|
fi
|
|
|
|
|
exit
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
@ -99,6 +99,11 @@ do
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
if [ $tmdbVideosListDataIdsCount -le 0 ]; then
|
|
|
|
|
log "$itemTitle :: No Extras Found, skipping..."
|
|
|
|
|
exit
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
log "$itemTitle :: $tmdbVideosListDataIdsCount Extras Found!"
|
|
|
|
|
i=0
|
|
|
|
|
for id in $(echo "$tmdbVideosListDataIds"); do
|
|
|
|
|