From 4207e89665d290c0494ed7b98bef745cc4d9a740 Mon Sep 17 00:00:00 2001 From: Sarah Date: Fri, 8 Apr 2022 22:06:14 +0100 Subject: [PATCH] change counting page updates --- update_wiki.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/update_wiki.py b/update_wiki.py index 4f441db..06669a6 100644 --- a/update_wiki.py +++ b/update_wiki.py @@ -27,11 +27,7 @@ def update_wiki(token_id, token_secret, update_csv, update_films_by_year, update with IncrementalBar('Retrieving movie data', max=viewing_count, suffix='%(percent).1f%% - %(eta)ds remaining', check_tty=False) as bar: VCinemaUtils.add_imdb_data_to_viewings(viewings, data_fields, bar) - update_page_count = 0 - if update_films_by_year: - update_page_count += 1 - if update_films_by_country: - update_page_count += 1 + update_page_count = sum([update_films_by_year, update_films_by_country]) with IncrementalBar('Processing viewing data', max=update_page_count, suffix='%(percent).1f%% - %(eta)ds remaining', check_tty=False) as bar: if update_films_by_year: