Add Radarr discovery + tighten arr sync filters
- playback_aware_radarr_discovery.sh: new two-stage movie discovery using recently watched Emby movies as seeds and TMDB recommendations as the similarity engine; scores on recency + rating + vote count; adds HOST*_TMDB_API_KEY alias to detect_hosts() in common.sh - emby_to_sonarr_sync.sh: restrict to SONARR_EMBY_LIBRARIES allowlist (Anime, Kids Shows, Stand-Up Comedy, TV shows) — excludes Youtube and Recorded Sports libraries; add garbage title filter for multi- season folder names (S01-S03) and bare bracket tags ([Prof]) - emby_to_radarr_sync.sh: add _is_episode_title filter to block anime episode files stored in Movies library (underscore/dot patterns, fansub bracket format, episode markers, codec metadata strings) - emby_to_lidarr_sync.sh: add U+FFFD Unicode replacement character filter alongside the existing ASCII ? filter for encoding corruption - master.conf: RADARR_DISCOVERY_* settings, SONARR/RADARR_EMBY_LIBRARIES allowlists, Radarr discovery added to WEEKLY_MAINTENANCE_SCRIPTS
This commit is contained in:
@@ -100,6 +100,21 @@ _radarr_post() {
|
||||
"${RADARR_URL}/api/v3/movie" 2>/dev/null
|
||||
}
|
||||
|
||||
# Episode/garbage title filter — catches anime episodes stored as individual files
|
||||
# in the Movies library, fansub release names, and codec metadata strings.
|
||||
_is_episode_title() {
|
||||
local t="$1"
|
||||
[[ "$t" == *"_-_"* ]] && return 0 # NANA_-_01_
|
||||
[[ "$t" == *".-."* ]] && return 0 # Fractale.-.01
|
||||
[[ "$t" =~ ^\[.*\]\[.*\] ]] && return 0 # [Title][NNN][...]
|
||||
[[ "$t" =~ [[:space:]]'-'[[:space:]][0-9]{2,3}$ ]] && return 0 # Title - 001
|
||||
[[ "$t" =~ [[:space:]]E[0-9]{2,3}([[:space:]]|\[) ]] && return 0 # Title E01 [group]
|
||||
[[ "${t^^}" == *"HEVC"* ]] && return 0 # codec metadata
|
||||
[[ "$t" == *"(TMDB:"* ]] && return 0 # codec metadata
|
||||
[[ "$t" == *$'\xef\xbf\xbd'* || "$t" == *"?"* ]] && return 0 # encoding corruption
|
||||
return 1
|
||||
}
|
||||
|
||||
# ==============================================================================================
|
||||
# ━━━ Fetch Emby Movie Library ━━━
|
||||
# ==============================================================================================
|
||||
@@ -120,6 +135,7 @@ declare -A EMBY_MOVIES # name → tmdb_id (empty string if none)
|
||||
|
||||
while IFS='|' read -r name tmdb_id; do
|
||||
[[ -z "$name" || "$name" == "null" ]] && continue
|
||||
_is_episode_title "$name" && { log " $ICON_SKIP Skipping episode/garbage: $name"; continue; }
|
||||
EMBY_MOVIES["$name"]="$tmdb_id"
|
||||
done < <(echo "$EMBY_MOVIES_JSON" | jq -r '.Items[] | [.Name, (.ProviderIds.Tmdb // "")] | join("|")' 2>/dev/null)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user