From 17c2ff70b9d32e11316d77cb19e801716ef857e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Sun, 6 Oct 2019 16:15:53 -0400 Subject: [PATCH] Added notification for running embedded subtitles indexing. --- bazarr/get_episodes.py | 4 +++- bazarr/get_movies.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bazarr/get_episodes.py b/bazarr/get_episodes.py index cc6e5369a..d7a91a4bc 100644 --- a/bazarr/get_episodes.py +++ b/bazarr/get_episodes.py @@ -184,7 +184,9 @@ def sync_episodes(): ).execute() # Store subtitles for added or modified episodes - for altered_episode in altered_episodes: + for i, altered_episode in enumerate(altered_episodes, 1): + notifications.write(msg='Indexing episodes embedded subtitles...', queue='get_episodes', item=i, + length=len(altered_episodes)) store_subtitles(path_replace(altered_episode[1])) list_missing_subtitles(altered_episode[2]) diff --git a/bazarr/get_movies.py b/bazarr/get_movies.py index 5f545580b..f39592db8 100644 --- a/bazarr/get_movies.py +++ b/bazarr/get_movies.py @@ -265,7 +265,9 @@ def update_movies(): ).execute() # Store subtitles for added or modified movies - for altered_movie in altered_movies: + for i, altered_movie in enumerate(altered_movies, 1): + notifications.write(msg='Indexing movies embedded subtitles...', queue='get_movies', item=i, + length=len(altered_movies)) store_subtitles_movie(path_replace_movie(altered_movie[1])) list_missing_subtitles_movies(altered_movie[2])