summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2021-05-12 12:17:09 -0400
committermorpheus65535 <[email protected]>2021-05-12 12:17:09 -0400
commit821ff13b80a0559bb07ca46d3df8a4b5e1ea3102 (patch)
tree9357257315d93b0a6f9f26600e3213a9d47c929d
parente23956278bc7b8c77fd0cecdcf90fd7b5b9642fc (diff)
downloadbazarr-821ff13b80a0559bb07ca46d3df8a4b5e1ea3102.tar.gz
bazarr-821ff13b80a0559bb07ca46d3df8a4b5e1ea3102.zip
Added successful completion message to tasks progress toast.
-rw-r--r--bazarr/get_episodes.py6
-rw-r--r--bazarr/get_movies.py6
-rw-r--r--bazarr/get_series.py6
-rw-r--r--bazarr/get_subtitle.py43
-rw-r--r--bazarr/list_subtitles.py12
5 files changed, 68 insertions, 5 deletions
diff --git a/bazarr/get_episodes.py b/bazarr/get_episodes.py
index d6895f9d7..96fde111b 100644
--- a/bazarr/get_episodes.py
+++ b/bazarr/get_episodes.py
@@ -64,6 +64,12 @@ def sync_episodes():
else:
episodes_to_add.append(episodeParser(episode))
+ show_progress(id='episodes_progress',
+ header='Syncing episodes...',
+ name='Completed successfully',
+ value=series_count,
+ count=series_count)
+
hide_progress(id='episodes_progress')
# Remove old episodes from DB
diff --git a/bazarr/get_movies.py b/bazarr/get_movies.py
index edb99ff86..df4d1b46d 100644
--- a/bazarr/get_movies.py
+++ b/bazarr/get_movies.py
@@ -87,6 +87,12 @@ def update_movies():
movie_default_profile=movie_default_profile,
audio_profiles=audio_profiles))
+ show_progress(id='movies_progress',
+ header='Syncing movies...',
+ name='Completed successfully',
+ value=movies_count,
+ count=movies_count)
+
hide_progress(id='movies_progress')
# Remove old movies from DB
diff --git a/bazarr/get_series.py b/bazarr/get_series.py
index 1c89f322f..ff0a39025 100644
--- a/bazarr/get_series.py
+++ b/bazarr/get_series.py
@@ -67,6 +67,12 @@ def update_series():
tags_dict=tagsDict, serie_default_profile=serie_default_profile,
audio_profiles=audio_profiles))
+ show_progress(id='series_progress',
+ header='Syncing series...',
+ name='Completed successfully',
+ value=series_count,
+ count=series_count)
+
hide_progress(id='series_progress')
# Remove old series from DB
diff --git a/bazarr/get_subtitle.py b/bazarr/get_subtitle.py
index d2aaff2c4..867c6f728 100644
--- a/bazarr/get_subtitle.py
+++ b/bazarr/get_subtitle.py
@@ -811,6 +811,12 @@ def series_download_subtitles(no):
logging.info("BAZARR All providers are throttled")
break
+ show_progress(id='series_search_progress_{}'.format(no),
+ header='Searching missing subtitles...',
+ name='Completed successfully',
+ value=count_episodes_details,
+ count=count_episodes_details)
+
hide_progress(id='series_search_progress_{}'.format(no))
@@ -937,6 +943,12 @@ def movies_download_subtitles(no):
logging.info("BAZARR All providers are throttled")
break
+ show_progress(id='movie_search_progress_{}'.format(no),
+ header='Searching missing subtitles...',
+ name='Completed successfully',
+ value=count_movie,
+ count=count_movie)
+
hide_progress(id='movie_search_progress_{}'.format(no))
@@ -1109,6 +1121,12 @@ def wanted_search_missing_subtitles_series():
logging.info("BAZARR All providers are throttled")
return
+ show_progress(id='wanted_episodes_progress',
+ header='Searching subtitles...',
+ name='Completed successfully',
+ value=count_episodes,
+ count=count_episodes)
+
hide_progress(id='wanted_episodes_progress')
logging.info('BAZARR Finished searching for missing Series Subtitles. Check History for more information.')
@@ -1135,6 +1153,12 @@ def wanted_search_missing_subtitles_movies():
logging.info("BAZARR All providers are throttled")
return
+ show_progress(id='wanted_movies_progress',
+ header='Searching subtitles...',
+ name='Completed successfully',
+ value=count_movies,
+ count=count_movies)
+
hide_progress(id='wanted_movies_progress')
logging.info('BAZARR Finished searching for missing Movies Subtitles. Check History for more information.')
@@ -1357,7 +1381,7 @@ def upgrade_subtitles():
if settings.general.getboolean('use_sonarr'):
for i, episode in enumerate(episodes_to_upgrade, 1):
show_progress(id='upgrade_episodes_progress',
- header='Upgrading subtitles...',
+ header='Upgrading episodes subtitles...',
name='{0} - S{1:02d}E{2:02d} - {3}'.format(episode['seriesTitle'],
episode['season'],
episode['episode'],
@@ -1419,14 +1443,18 @@ def upgrade_subtitles():
language_code, provider, score, subs_id, subs_path)
send_notifications(episode['sonarrSeriesId'], episode['sonarrEpisodeId'], message)
- hide_progress(id='upgrade_episodes_progress')
+ show_progress(id='upgrade_episodes_progress',
+ header='Upgrading episodes subtitles...',
+ name='Completed successfully',
+ value=count_episode_to_upgrade,
+ count=count_episode_to_upgrade)
-
+ hide_progress(id='upgrade_episodes_progress')
if settings.general.getboolean('use_radarr'):
for i, movie in enumerate(movies_to_upgrade, 1):
show_progress(id='upgrade_movies_progress',
- header='Upgrading subtitles...',
+ header='Upgrading movies subtitles...',
name=movie['title'],
value=i,
count=count_movie_to_upgrade)
@@ -1488,8 +1516,13 @@ def upgrade_subtitles():
history_log_movie(3, movie['radarrId'], message, path, language_code, provider, score, subs_id, subs_path)
send_notifications_movie(movie['radarrId'], message)
+ show_progress(id='upgrade_movies_progress',
+ header='Upgrading movies subtitles...',
+ name='Completed successfully',
+ value=count_movie_to_upgrade,
+ count=count_movie_to_upgrade)
+
hide_progress(id='upgrade_movies_progress')
-
logging.info('BAZARR Finished searching for Subtitles to upgrade. Check History for more information.')
diff --git a/bazarr/list_subtitles.py b/bazarr/list_subtitles.py
index eef10d92f..4597c02c2 100644
--- a/bazarr/list_subtitles.py
+++ b/bazarr/list_subtitles.py
@@ -490,6 +490,12 @@ def series_full_scan_subtitles():
count=count_episodes)
store_subtitles(episode['path'], path_mappings.path_replace(episode['path']))
+ show_progress(id='episodes_disk_scan',
+ header='Full disk scan...',
+ name='Completed successfully',
+ value=count_episodes,
+ count=count_episodes)
+
hide_progress(id='episodes_disk_scan')
gc.collect()
@@ -507,6 +513,12 @@ def movies_full_scan_subtitles():
count=count_movies)
store_subtitles_movie(movie['path'], path_mappings.path_replace_movie(movie['path']))
+ show_progress(id='movies_disk_scan',
+ header='Full disk scan...',
+ name='Completed successfully',
+ value=count_movies,
+ count=count_movies)
+
hide_progress(id='movies_disk_scan')
gc.collect()