@ -413,7 +413,7 @@ def manual_download_subtitle(path, language, hi, subtitle, provider, providers_a
return None
return None
else :
else :
if not subtitle . is_valid ( ) :
if not subtitle . is_valid ( ) :
notifications . write ( ' No valid subtitles file found for this file: ' + path )
notifications . write ( msg = ' No valid subtitles file found for this file: ' + path , queue = ' get_subtitle ' )
logging . exception ( ' BAZARR No valid subtitles file found for this file: ' + path )
logging . exception ( ' BAZARR No valid subtitles file found for this file: ' + path )
return
return
logging . debug ( ' BAZARR Subtitles file downloaded for this file: ' + path )
logging . debug ( ' BAZARR Subtitles file downloaded for this file: ' + path )
@ -498,7 +498,7 @@ def series_download_subtitles(no):
for episode in episodes_details :
for episode in episodes_details :
for language in ast . literal_eval ( episode [ 1 ] ) :
for language in ast . literal_eval ( episode [ 1 ] ) :
if language is not None :
if language is not None :
notifications . write ( ' Searching for ' + str ( language_from_alpha2 ( language ) ) + ' subtitles for this episode: ' + path_replace ( episode [ 0 ] ) )
notifications . write ( msg = ' Searching for ' + str ( language_from_alpha2 ( language ) ) + ' subtitles for this episode: ' + path_replace ( episode [ 0 ] ) , queue = ' get_subtitle ' )
message = download_subtitle ( path_replace ( episode [ 0 ] ) , str ( alpha3_from_alpha2 ( language ) ) ,
message = download_subtitle ( path_replace ( episode [ 0 ] ) , str ( alpha3_from_alpha2 ( language ) ) ,
series_details [ 0 ] , providers_list , providers_auth , str ( episode [ 3 ] ) ,
series_details [ 0 ] , providers_list , providers_auth , str ( episode [ 3 ] ) ,
series_details [ 1 ] , ' series ' )
series_details [ 1 ] , ' series ' )
@ -508,7 +508,7 @@ def series_download_subtitles(no):
send_notifications ( no , episode [ 2 ] , message )
send_notifications ( no , episode [ 2 ] , message )
list_missing_subtitles ( no )
list_missing_subtitles ( no )
notifications . write ( msg = ' Searching completed. Please reload the page. ' , type = ' success ' , duration = ' permanent ' , button = ' refresh ' )
notifications . write ( msg = ' Searching completed. Please reload the page. ' , type = ' success ' , duration = ' permanent ' , button = ' refresh ' , queue = ' get_subtitle ' )
def movies_download_subtitles ( no ) :
def movies_download_subtitles ( no ) :
@ -524,7 +524,7 @@ def movies_download_subtitles(no):
for language in ast . literal_eval ( movie [ 1 ] ) :
for language in ast . literal_eval ( movie [ 1 ] ) :
if language is not None :
if language is not None :
notifications . write ( ' Searching for ' + str ( language_from_alpha2 ( language ) ) + ' subtitles for this movie: ' + path_replace_movie ( movie [ 0 ] ) )
notifications . write ( msg = ' Searching for ' + str ( language_from_alpha2 ( language ) ) + ' subtitles for this movie: ' + path_replace_movie ( movie [ 0 ] ) , queue = ' get_subtitle ' )
message = download_subtitle ( path_replace_movie ( movie [ 0 ] ) , str ( alpha3_from_alpha2 ( language ) ) , movie [ 4 ] ,
message = download_subtitle ( path_replace_movie ( movie [ 0 ] ) , str ( alpha3_from_alpha2 ( language ) ) , movie [ 4 ] ,
providers_list , providers_auth , str ( movie [ 3 ] ) , movie [ 5 ] , ' movie ' )
providers_list , providers_auth , str ( movie [ 3 ] ) , movie [ 5 ] , ' movie ' )
if message is not None :
if message is not None :
@ -533,7 +533,7 @@ def movies_download_subtitles(no):
send_notifications_movie ( no , message )
send_notifications_movie ( no , message )
list_missing_subtitles_movies ( no )
list_missing_subtitles_movies ( no )
notifications . write ( msg = ' Searching completed. Please reload the page. ' , type = ' success ' , duration = ' permanent ' , button = ' refresh ' )
notifications . write ( msg = ' Searching completed. Please reload the page. ' , type = ' success ' , duration = ' permanent ' , button = ' refresh ' , queue = ' get_subtitle ' )
def wanted_download_subtitles ( path ) :
def wanted_download_subtitles ( path ) :
@ -571,7 +571,7 @@ def wanted_download_subtitles(path):
if attempt [ i ] [ 0 ] == language :
if attempt [ i ] [ 0 ] == language :
if search_active ( attempt [ i ] [ 1 ] ) is True :
if search_active ( attempt [ i ] [ 1 ] ) is True :
notifications . write (
notifications . write (
' Searching ' + str ( language_from_alpha2 ( language ) ) + ' subtitles for this episode: ' + path )
msg = ' Searching ' + str ( language_from_alpha2 ( language ) ) + ' subtitles for this episode: ' + path , queue = ' get_subtitle ' )
message = download_subtitle ( path_replace ( episode [ 0 ] ) , str ( alpha3_from_alpha2 ( language ) ) ,
message = download_subtitle ( path_replace ( episode [ 0 ] ) , str ( alpha3_from_alpha2 ( language ) ) ,
episode [ 4 ] , providers_list , providers_auth , str ( episode [ 5 ] ) ,
episode [ 4 ] , providers_list , providers_auth , str ( episode [ 5 ] ) ,
episode [ 7 ] , ' series ' )
episode [ 7 ] , ' series ' )
@ -619,7 +619,7 @@ def wanted_download_subtitles_movie(path):
if attempt [ i ] [ 0 ] == language :
if attempt [ i ] [ 0 ] == language :
if search_active ( attempt [ i ] [ 1 ] ) is True :
if search_active ( attempt [ i ] [ 1 ] ) is True :
notifications . write (
notifications . write (
' Searching ' + str ( language_from_alpha2 ( language ) ) + ' subtitles for this movie: ' + path )
msg = ' Searching ' + str ( language_from_alpha2 ( language ) ) + ' subtitles for this movie: ' + path , queue = ' get_subtitle ' )
message = download_subtitle ( path_replace_movie ( movie [ 0 ] ) , str ( alpha3_from_alpha2 ( language ) ) ,
message = download_subtitle ( path_replace_movie ( movie [ 0 ] ) , str ( alpha3_from_alpha2 ( language ) ) ,
movie [ 4 ] , providers_list , providers_auth , str ( movie [ 5 ] ) , movie [ 7 ] ,
movie [ 4 ] , providers_list , providers_auth , str ( movie [ 5 ] ) , movie [ 7 ] ,
' movie ' )
' movie ' )
@ -669,7 +669,7 @@ def wanted_search_missing_subtitles():
logging . info ( ' BAZARR Finished searching for missing subtitles. Check histories for more information. ' )
logging . info ( ' BAZARR Finished searching for missing subtitles. Check histories for more information. ' )
notifications . write ( msg = ' Searching completed. Please reload the page. ' , type = ' success ' , duration = ' permanent ' , button = ' refresh ' )
notifications . write ( msg = ' Searching completed. Please reload the page. ' , type = ' success ' , duration = ' permanent ' , button = ' refresh ' , queue = ' get_subtitle ' )
def search_active ( timestamp ) :
def search_active ( timestamp ) :