@ -844,7 +844,7 @@ class CollectionBuilder:
if discover_data is True :
if discover_data is True :
new_dictionary [ discover_final ] = discover_data
new_dictionary [ discover_final ] = discover_data
elif discover_final in tmdb . discover_dates :
elif discover_final in tmdb . discover_dates :
new_dictionary [ discover_final ] = util . check _date( discover_data , f " { method_name } attribute { discover_final } " , return_ string= True )
new_dictionary [ discover_final ] = util . validate _date( discover_data , f " { method_name } attribute { discover_final } " , return_ as= " % m/ %d / % Y " )
elif discover_final in [ " primary_release_year " , " year " , " first_air_date_year " ] :
elif discover_final in [ " primary_release_year " , " year " , " first_air_date_year " ] :
new_dictionary [ discover_final ] = util . check_number ( discover_data , f " { method_name } attribute { discover_final } " , minimum = 1800 , maximum = self . current_year + 1 )
new_dictionary [ discover_final ] = util . check_number ( discover_data , f " { method_name } attribute { discover_final } " , minimum = 1800 , maximum = self . current_year + 1 )
elif discover_final in [ " vote_count.gte " , " vote_count.lte " , " vote_average.gte " , " vote_average.lte " , " with_runtime.gte " , " with_runtime.lte " ] :
elif discover_final in [ " vote_count.gte " , " vote_count.lte " , " vote_average.gte " , " vote_average.lte " , " with_runtime.gte " , " with_runtime.lte " ] :
@ -1379,7 +1379,7 @@ class CollectionBuilder:
elif attribute in [ " year " , " episode_year " ] and modifier in [ " .gt " , " .gte " , " .lt " , " .lte " ] :
elif attribute in [ " year " , " episode_year " ] and modifier in [ " .gt " , " .gte " , " .lt " , " .lte " ] :
return util . check_year ( data , self . current_year , final )
return util . check_year ( data , self . current_year , final )
elif attribute in plex . date_attributes and modifier in [ " .before " , " .after " ] :
elif attribute in plex . date_attributes and modifier in [ " .before " , " .after " ] :
return util . check_date( data , final , return_string = True , plex_date = True )
return util . validate_date( data , final , return_as = " % Y- % m- %d " )
elif attribute in plex . number_attributes and modifier in [ " " , " .not " , " .gt " , " .gte " , " .lt " , " .lte " ] :
elif attribute in plex . number_attributes and modifier in [ " " , " .not " , " .gt " , " .gte " , " .lt " , " .lte " ] :
return util . check_number ( data , final , minimum = 1 )
return util . check_number ( data , final , minimum = 1 )
elif attribute in plex . float_attributes and modifier in [ " .gt " , " .gte " , " .lt " , " .lte " ] :
elif attribute in plex . float_attributes and modifier in [ " .gt " , " .gte " , " .lt " , " .lte " ] :
@ -1458,8 +1458,8 @@ class CollectionBuilder:
elif modifier in [ " .before " , " .after " ] :
elif modifier in [ " .before " , " .after " ] :
if current_data is None :
if current_data is None :
return False
return False
filter_date = datetime. strptime ( str ( filter_data ) , " % m/ %d / % Y " )
filter_date = util. validate_date ( filter_data )
if ( modifier == " .before " and current_data > = filter_dat a ) or ( modifier == " .after " and current_data < = filter_dat a ) :
if ( modifier == " .before " and current_data > = filter_dat e ) or ( modifier == " .after " and current_data < = filter_dat e ) :
return False
return False
elif filter_attr in [ " release " , " added " , " last_played " ] and modifier == " .regex " :
elif filter_attr in [ " release " , " added " , " last_played " ] and modifier == " .regex " :
jailbreak = False
jailbreak = False
@ -1618,7 +1618,7 @@ class CollectionBuilder:
or ( filter_method == " tmdb_vote_count.lte " and movie . vote_count > filter_data ) :
or ( filter_method == " tmdb_vote_count.lte " and movie . vote_count > filter_data ) :
match = False
match = False
break
break
current_title = f " { movie . title } ( { util . check _date( movie . release_date , ' test ' , plex_date = True ) . year } ) " if movie . release_date else movie . title
current_title = f " { movie . title } ( { util . validate _date( movie . release_date , ' test ' ) . year } ) " if movie . release_date else movie . title
if match :
if match :
missing_movies_with_names . append ( ( current_title , missing_id ) )
missing_movies_with_names . append ( ( current_title , missing_id ) )
if self . details [ " show_missing " ] is True :
if self . details [ " show_missing " ] is True :
@ -1958,7 +1958,7 @@ class CollectionBuilder:
logger . error ( e )
logger . error ( e )
continue
continue
if self . details [ " show_missing " ] is True :
if self . details [ " show_missing " ] is True :
current_title = f " { movie . title } ( { util . check _date( movie . release_date , ' test ' , plex_date = True ) . year } ) " if movie . release_date else movie . title
current_title = f " { movie . title } ( { util . validate _date( movie . release_date , ' test ' ) . year } ) " if movie . release_date else movie . title
logger . info ( f " { name } Collection | ? | { current_title } (TMDb: { missing_id } ) " )
logger . info ( f " { name } Collection | ? | { current_title } (TMDb: { missing_id } ) " )
logger . info ( " " )
logger . info ( " " )
logger . info ( f " { len ( self . run_again_movies ) } Movie { ' s ' if len ( self . run_again_movies ) > 1 else ' ' } Missing " )
logger . info ( f " { len ( self . run_again_movies ) } Movie { ' s ' if len ( self . run_again_movies ) > 1 else ' ' } Missing " )