|
|
@ -184,14 +184,15 @@ def shows(list_type, add_limit=0, add_delay=2.5, genre=None, folder=None, no_sea
|
|
|
|
authenticate_user=None):
|
|
|
|
authenticate_user=None):
|
|
|
|
from media.sonarr import Sonarr
|
|
|
|
from media.sonarr import Sonarr
|
|
|
|
from media.trakt import Trakt
|
|
|
|
from media.trakt import Trakt
|
|
|
|
|
|
|
|
from helpers import misc as misc_helper
|
|
|
|
from helpers import sonarr as sonarr_helper
|
|
|
|
from helpers import sonarr as sonarr_helper
|
|
|
|
from helpers import trakt as trakt_helper
|
|
|
|
from helpers import trakt as trakt_helper
|
|
|
|
|
|
|
|
|
|
|
|
added_shows = 0
|
|
|
|
added_shows = 0
|
|
|
|
|
|
|
|
|
|
|
|
# remove genre from shows blacklisted_genres if supplied
|
|
|
|
# remove genre from shows blacklisted_genres if supplied
|
|
|
|
if genre and genre in cfg.filters.shows.blacklisted_genres:
|
|
|
|
if genre:
|
|
|
|
cfg['filters']['shows']['blacklisted_genres'].remove(genre)
|
|
|
|
misc_helper.unblacklist_genres(genre, cfg['filters']['shows']['blacklisted_genres'])
|
|
|
|
|
|
|
|
|
|
|
|
# replace sonarr root_folder if folder is supplied
|
|
|
|
# replace sonarr root_folder if folder is supplied
|
|
|
|
if folder:
|
|
|
|
if folder:
|
|
|
@ -253,8 +254,8 @@ def shows(list_type, add_limit=0, add_delay=2.5, genre=None, folder=None, no_sea
|
|
|
|
for series in sorted_series_list:
|
|
|
|
for series in sorted_series_list:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
# check if genre matches genre supplied via argument
|
|
|
|
# check if genre matches genre supplied via argument
|
|
|
|
if genre and genre.lower() not in series['show']['genres']:
|
|
|
|
if genre and not misc_helper.allowed_genres(genre, 'show', series):
|
|
|
|
log.debug("Skipping: %s because it was not from %s genre", series['show']['title'], genre.lower())
|
|
|
|
log.debug("Skipping: %s because it was not from %s genre(s)", series['show']['title'], genre.lower())
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
|
|
|
|
|
|
|
|
# check if series passes out blacklist criteria inspection
|
|
|
|
# check if series passes out blacklist criteria inspection
|
|
|
@ -360,14 +361,15 @@ def movies(list_type, add_limit=0, add_delay=2.5, genre=None, folder=None, no_se
|
|
|
|
authenticate_user=None):
|
|
|
|
authenticate_user=None):
|
|
|
|
from media.radarr import Radarr
|
|
|
|
from media.radarr import Radarr
|
|
|
|
from media.trakt import Trakt
|
|
|
|
from media.trakt import Trakt
|
|
|
|
|
|
|
|
from helpers import misc as misc_helper
|
|
|
|
from helpers import radarr as radarr_helper
|
|
|
|
from helpers import radarr as radarr_helper
|
|
|
|
from helpers import trakt as trakt_helper
|
|
|
|
from helpers import trakt as trakt_helper
|
|
|
|
|
|
|
|
|
|
|
|
added_movies = 0
|
|
|
|
added_movies = 0
|
|
|
|
|
|
|
|
|
|
|
|
# remove genre from movies blacklisted_genres if supplied
|
|
|
|
# remove genre from movies blacklisted_genres if supplied
|
|
|
|
if genre and genre in cfg.filters.movies.blacklisted_genres:
|
|
|
|
if genre:
|
|
|
|
cfg['filters']['movies']['blacklisted_genres'].remove(genre)
|
|
|
|
misc_helper.unblacklist_genres(genre, cfg['filters']['movies']['blacklisted_genres'])
|
|
|
|
|
|
|
|
|
|
|
|
# replace radarr root_folder if folder is supplied
|
|
|
|
# replace radarr root_folder if folder is supplied
|
|
|
|
if folder:
|
|
|
|
if folder:
|
|
|
@ -430,8 +432,8 @@ def movies(list_type, add_limit=0, add_delay=2.5, genre=None, folder=None, no_se
|
|
|
|
for movie in sorted_movies_list:
|
|
|
|
for movie in sorted_movies_list:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
# check if genre matches genre supplied via argument
|
|
|
|
# check if genre matches genre supplied via argument
|
|
|
|
if genre and genre.lower() not in movie['movie']['genres']:
|
|
|
|
if genre and not misc_helper.allowed_genres(genre, 'movie', movie):
|
|
|
|
log.debug("Skipping: %s because it was not from %s genre", movie['movie']['title'], genre.lower())
|
|
|
|
log.debug("Skipping: %s because it was not from %s genre(s)", movie['movie']['title'], genre.lower())
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
|
|
|
|
|
|
|
|
# check if movie passes out blacklist criteria inspection
|
|
|
|
# check if movie passes out blacklist criteria inspection
|
|
|
|