diff --git a/tubearchivist/home/src/download.py b/tubearchivist/home/src/download.py index 587f66a..12d35f4 100644 --- a/tubearchivist/home/src/download.py +++ b/tubearchivist/home/src/download.py @@ -72,7 +72,7 @@ class PendingList: elif isinstance(video, tuple): youtube_id = video[0] if youtube_id in all_downloaded: - # skip already downlaoded + # skip already downloaded continue video = self.get_youtube_details(youtube_id) # skip on download error diff --git a/tubearchivist/home/src/helper.py b/tubearchivist/home/src/helper.py index 0ac2a11..a4b8abb 100644 --- a/tubearchivist/home/src/helper.py +++ b/tubearchivist/home/src/helper.py @@ -108,7 +108,7 @@ def get_lock(lock_key): def monitor_cache_dir(cache_dir): """ - look at download cache dir directly as alterative progress info + look at download cache dir directly as alternative progress info """ dl_cache = os.path.join(cache_dir, 'download') cache_file = os.listdir(dl_cache) diff --git a/tubearchivist/home/src/index.py b/tubearchivist/home/src/index.py index ad35bb4..6793480 100644 --- a/tubearchivist/home/src/index.py +++ b/tubearchivist/home/src/index.py @@ -216,7 +216,7 @@ class YoutubeChannel: class YoutubeVideo: - """ represents a signle youtube video """ + """ represents a single youtube video """ CONFIG = AppConfig().config ES_URL = CONFIG['application']['es_url'] diff --git a/tubearchivist/home/src/index_management.py b/tubearchivist/home/src/index_management.py index 70e2399..e093228 100644 --- a/tubearchivist/home/src/index_management.py +++ b/tubearchivist/home/src/index_management.py @@ -436,7 +436,7 @@ class ElasticBackup: return file_content def write_es_json(self, file_content, index_name): - """ write nd json file for es _bulk API to disk """ + """ write nd-json file for es _bulk API to disk """ cache_dir = self.config['application']['cache_dir'] file_name = f'es_{index_name}-{self.timestamp}.json' file_path = os.path.join(cache_dir, 'backup', file_name) diff --git a/tubearchivist/home/src/reindex.py b/tubearchivist/home/src/reindex.py index 1d9fafd..4d4c5c4 100644 --- a/tubearchivist/home/src/reindex.py +++ b/tubearchivist/home/src/reindex.py @@ -211,7 +211,7 @@ class FilesystemScanner: def __init__(self): self.all_downloaded = self.get_all_downloaded() self.all_indexed = self.get_all_indexed() - self.missmatch = None + self.mismatch = None self.to_rename = None self.to_index = None self.to_delete = None @@ -296,7 +296,7 @@ class FilesystemScanner: break - self.missmatch = to_fix + self.mismatch = to_fix self.to_rename = to_rename def rename_files(self): @@ -307,11 +307,11 @@ class FilesystemScanner: new_path = os.path.join(self.VIDEOS, channel, expected_filename) os.rename(old_path, new_path) - def send_missmatch_bulk(self): + def send_mismatch_bulk(self): """ build bulk update """ bulk_list = [] - for video_missmatch in self.missmatch: - youtube_id, media_url = video_missmatch + for video_mismatch in self.mismatch: + youtube_id, media_url = video_mismatch action = {"update": {"_id": youtube_id, "_index": 'ta_video'}} source = {"doc": {"media_url": media_url}} bulk_list.append(json.dumps(action)) @@ -454,8 +454,8 @@ def scan_filesystem(): filesystem_handler.list_comarison() if filesystem_handler.to_rename: filesystem_handler.rename_files() - if filesystem_handler.missmatch: - filesystem_handler.send_missmatch_bulk() + if filesystem_handler.mismatch: + filesystem_handler.send_mismatch_bulk() if filesystem_handler.to_delete: filesystem_handler.delete_from_index() if filesystem_handler.to_index: diff --git a/tubearchivist/home/src/searching.py b/tubearchivist/home/src/searching.py index db0f906..9e28408 100644 --- a/tubearchivist/home/src/searching.py +++ b/tubearchivist/home/src/searching.py @@ -72,7 +72,7 @@ class SearchHandler: @staticmethod def vid_cache_link(hit): - """ download thumbnails into chache """ + """ download thumbnails into cache """ vid_thumb = hit['source']['vid_thumb_url'] youtube_id = hit['source']['youtube_id'] channel_id_hit = hit['source']['channel']['channel_id'] diff --git a/tubearchivist/home/templates/home/settings.html b/tubearchivist/home/templates/home/settings.html index 79c11d1..30f2600 100644 --- a/tubearchivist/home/templates/home/settings.html +++ b/tubearchivist/home/templates/home/settings.html @@ -9,7 +9,7 @@

Color scheme

Current color scheme: {{ config.application.colors }}

- Select yout prefered color scheme between dark and light mode.
+ Select yout preferred color scheme between dark and light mode.