Merge pull request #142 from bmatheny/main

Add videoDownloadTag to limit artist downloads
pull/144/head
RandomNinjaAtk 2 years ago committed by GitHub
commit 1d700fa977
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -99,6 +99,7 @@ Container images are configured using parameters passed at runtime (such as thos
| `-e scriptInterval=15m` | #s or #m or #h or #d :: s = seconds, m = minutes, h = hours, d = days :: Amount of time between each script run, when autoStart is enabled |
| `-e enableAudioScript=true` | true = enabled :: Enables the Audio script to run automatically |
| `-e enableVideoScript=true` | true = enabled :: Enables the Video script to run automatically |
| `-e videoDownloadTag=VALUE` | If VALUE is specified, only artists tagged with VALUE will have videos downloaded |
| `-e configureLidarrWithOptimalSettings=true` | true = enabled :: Automatically configures Lidarr with optimal settings |
| `-e searchSort=date` | date or album :: Sorts the missing/cutoff list by release date (newest -> oldest) or album type (album -> single) for processing the list |
| `-e audioFormat=native` | native or alac or mp3 or aac or opus :: native is the native download client file type, selected by the matching audio bitrate |

@ -30,6 +30,7 @@ ENV enableVideoScript=true
ENV matchDistance=5
ENV scriptInterval=15m
ENV videoFormat="bestvideo*+bestaudio/best"
ENV videoDownloadTag=""
RUN \
echo "*** install packages ***" && \

@ -40,6 +40,7 @@ ENV enableVideoScript=true
ENV matchDistance=5
ENV videoFormat="bestvideo*+bestaudio/best"
ENV scriptInterval=15m
ENV videoDownloadTag=""
RUN \
echo "*** install packages ***" && \

@ -40,6 +40,7 @@ ENV enableVideoScript=true
ENV matchDistance=5
ENV videoFormat="bestvideo*+bestaudio/best"
ENV scriptInterval=15m
ENV videoDownloadTag=""
RUN \
echo "*** install packages ***" && \

@ -1638,11 +1638,6 @@ ArtistTidalSearch () {
# $3 Lyric Type (true or false) - false = Clean, true = Explicit
# Get tidal artist album list
if [ ! -f /config/extended/cache/tidal/$2-videos.json ]; then
curl -s "https://api.tidal.com/v1/artists/$2/videos?limit=10000&countryCode=$tidalCountryCode&filter=ALL" -H 'x-tidal-token: CzET4vdadNUFQ5JU' > /config/extended/cache/tidal/$2-videos.json
sleep $sleepTimer
fi
if [ ! -f /config/extended/cache/tidal/$2-albums.json ]; then
curl -s "https://api.tidal.com/v1/artists/$2/albums?limit=10000&countryCode=$tidalCountryCode&filter=ALL" -H 'x-tidal-token: CzET4vdadNUFQ5JU' > /config/extended/cache/tidal/$2-albums.json
sleep $sleepTimer

@ -87,6 +87,9 @@ Configuration () {
log "CONFIG :: Music Video Location :: $videoPath"
log "CONFIG :: Subtitle Language set to: $youtubeSubtitleLanguage"
log "CONFIG :: yt-dlp format: $videoFormat"
if [ -n "$videoDownloadTag" ]; then
log "CONFIG :: Video download tag set to: $videoDownloadTag"
fi
if [ -f "/config/cookies.txt" ]; then
cookiesFile="/config/cookies.txt"
log "CONFIG :: Cookies File Found! (/config/cookies.txt)"
@ -591,8 +594,13 @@ AddFeaturedVideoArtists
log "-----------------------------------------------------------------------------"
log "Finding Videos"
log "-----------------------------------------------------------------------------"
lidarrArtists=$(wget --timeout=0 -q -O - "$lidarrUrl/api/v1/artist?apikey=$lidarrApiKey" | jq -r .[])
lidarrArtistIds=$(echo $lidarrArtists | jq -r .id)
if [ -z "$videoDownloadTag" ]; then
lidarrArtists=$(wget --timeout=0 -q -O - "$lidarrUrl/api/v1/artist?apikey=$lidarrApiKey" | jq -r .[])
lidarrArtistIds=$(echo $lidarrArtists | jq -r .id)
else
lidarrArtists=$(curl -s "$lidarrUrl/api/v1/tag/detail" -H 'Content-Type: application/json' -H "X-Api-Key: $lidarrApiKey" | jq -r -M ".[] | select(.label == \"$videoDownloadTag\") | .artistIds")
lidarrArtistIds=$(echo $lidarrArtists | jq -r .[])
fi
lidarrArtistIdsCount=$(echo "$lidarrArtistIds" | wc -l)
processCount=0
for lidarrArtistId in $(echo $lidarrArtistIds); do

Loading…
Cancel
Save