|
|
@ -122,9 +122,6 @@ def blacklisted_show_country(show, allowed_countries):
|
|
|
|
|
|
|
|
|
|
|
|
def blacklisted_show_language(show, allowed_languages):
|
|
|
|
def blacklisted_show_language(show, allowed_languages):
|
|
|
|
blacklisted = False
|
|
|
|
blacklisted = False
|
|
|
|
# [] - add show items with 'en' language
|
|
|
|
|
|
|
|
if not allowed_languages:
|
|
|
|
|
|
|
|
allowed_languages = ['en']
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
# ["ignore"] - add show item even if it is missing a language
|
|
|
|
# ["ignore"] - add show item even if it is missing a language
|
|
|
|
if any('ignore' in s.lower() for s in allowed_languages):
|
|
|
|
if any('ignore' in s.lower() for s in allowed_languages):
|
|
|
@ -134,6 +131,10 @@ def blacklisted_show_language(show, allowed_languages):
|
|
|
|
log.debug("\'%s\' | Blacklisted Languages Check | Blacklisted because it had no language specified.",
|
|
|
|
log.debug("\'%s\' | Blacklisted Languages Check | Blacklisted because it had no language specified.",
|
|
|
|
show['show']['title'])
|
|
|
|
show['show']['title'])
|
|
|
|
blacklisted = True
|
|
|
|
blacklisted = True
|
|
|
|
|
|
|
|
# [] - add show item from any valid language
|
|
|
|
|
|
|
|
elif not allowed_languages:
|
|
|
|
|
|
|
|
log.debug("\'%s\' | Blacklisted Languages Check | Skipped.",
|
|
|
|
|
|
|
|
show['show']['title'])
|
|
|
|
# List provided - skip adding show item if the language is blacklisted
|
|
|
|
# List provided - skip adding show item if the language is blacklisted
|
|
|
|
elif not any(show['show']['language'].lower() in c.lower() for c in allowed_languages):
|
|
|
|
elif not any(show['show']['language'].lower() in c.lower() for c in allowed_languages):
|
|
|
|
log.debug("\'%s\' | Blacklisted Languages Check | Blacklisted because it's in the language: %s",
|
|
|
|
log.debug("\'%s\' | Blacklisted Languages Check | Blacklisted because it's in the language: %s",
|
|
|
@ -308,9 +309,6 @@ def blacklisted_movie_country(movie, allowed_countries):
|
|
|
|
|
|
|
|
|
|
|
|
def blacklisted_movie_language(movie, allowed_languages):
|
|
|
|
def blacklisted_movie_language(movie, allowed_languages):
|
|
|
|
blacklisted = False
|
|
|
|
blacklisted = False
|
|
|
|
# [] - add movie items with 'en' language
|
|
|
|
|
|
|
|
if not allowed_languages:
|
|
|
|
|
|
|
|
allowed_languages = ['en']
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
# ["ignore"] - add movie item even if it is missing a language
|
|
|
|
# ["ignore"] - add movie item even if it is missing a language
|
|
|
|
if any('ignore' in s.lower() for s in allowed_languages):
|
|
|
|
if any('ignore' in s.lower() for s in allowed_languages):
|
|
|
@ -321,6 +319,10 @@ def blacklisted_movie_language(movie, allowed_languages):
|
|
|
|
log.debug("\'%s\' | Blacklisted Languages Check | Blacklisted because it had no language specified.",
|
|
|
|
log.debug("\'%s\' | Blacklisted Languages Check | Blacklisted because it had no language specified.",
|
|
|
|
movie['movie']['title'])
|
|
|
|
movie['movie']['title'])
|
|
|
|
blacklisted = True
|
|
|
|
blacklisted = True
|
|
|
|
|
|
|
|
# [] - add movie item from any valid language
|
|
|
|
|
|
|
|
elif not allowed_languages:
|
|
|
|
|
|
|
|
log.debug("\'%s\' | Blacklisted Languages Check | Skipped.",
|
|
|
|
|
|
|
|
movie['movie']['title'])
|
|
|
|
# List provided - skip adding movie item if the language is blacklisted
|
|
|
|
# List provided - skip adding movie item if the language is blacklisted
|
|
|
|
elif not any(movie['movie']['language'].lower() in s.lower() for s in allowed_languages):
|
|
|
|
elif not any(movie['movie']['language'].lower() in s.lower() for s in allowed_languages):
|
|
|
|
log.debug("\'%s\' | Blacklisted Languages Check | Blacklisted because it's in the language: %s",
|
|
|
|
log.debug("\'%s\' | Blacklisted Languages Check | Blacklisted because it's in the language: %s",
|
|
|
|