diff --git a/Tools/TitleDescriptionUpdater.py b/Tools/TitleDescriptionUpdater.py index c546906..00545f3 100644 --- a/Tools/TitleDescriptionUpdater.py +++ b/Tools/TitleDescriptionUpdater.py @@ -25,9 +25,9 @@ pass else: print("Warning: Not currently in the 'Tools' folder. The script may not work properly.") - + # Set the path to include the project root folder, so Scripts imports are valid -sys.path.insert(1, os.getcwd()) +sys.path.insert(1, os.getcwd()) # --------------------------------------------------------------------------------------- from Scripts.shared_imports import * import Scripts.auth as auth @@ -38,10 +38,12 @@ import json import langcodes - # Import translated json file -with open(translatedJsonFile, "r", encoding='utf-8') as f: - translatedJson = json.load(f) +if updateTitleAndDescription: + with open(translatedJsonFile, "r", encoding='utf-8') as f: + translatedJson = json.load(f) +else: + translatedJson = None YOUTUBE_API = auth.youtube_authentication() @@ -245,4 +247,4 @@ def get_video_title(videoID): print("\nUploading caption for language: " + languageDisplayName + " (" + langCode + ")") upload_caption(videoID, langCode, "", filePath) # Use empty string as the name, so it will apply as the default caption for that language -print("\nDone!") +print("\nDone! It might take a couple minutes for the subtitles to show up on YouTube.") diff --git a/main.py b/main.py index 2e562dd..093a140 100644 --- a/main.py +++ b/main.py @@ -6,7 +6,7 @@ # License: GPLv3 # NOTE: By contributing to this project, you agree to the terms of the GPLv3 license, and agree to grant the project owner the right to also provide or sell this software, including your contribution, to anyone under any other license, with no compensation to you. -version = '0.18.1' +version = '0.19.0' print(f"------- 'Auto Synced Translated Dubs' script by ThioJoe - Release version {version} -------") # Import other files