Added clarity and grammar fixes to documentation and to some strings on the program itself.

This commit is contained in:
E.J. Talevi
2025-11-25 23:56:56 -03:00
parent 28a6fe5a7d
commit 0e74ac32d6
8 changed files with 32 additions and 33 deletions
+5 -5
View File
@@ -171,7 +171,7 @@ def _process_url(
return False
if "http" not in url:
print(f"It seems like that you have supplied an invalid URL: {url}")
print(f"It seems like you have supplied an invalid URL: {url}")
return True
url_clean: str = url_ending_clean(url)
@@ -286,7 +286,7 @@ def settings_management(
Args:
names (list[str] | None, optional): None (list all options), one (list the value only for this option) or two arguments (set the value for the option). Defaults to None.
editor (bool, optional): If set, your favorite system editor will be opened. Defaults to False.
editor (bool, optional): If set, your default system editor will be opened. Defaults to False.
"""
if editor:
config_path: Path = Path(path_file_settings())
@@ -333,7 +333,7 @@ def login(ctx: typer.Context) -> bool:
Returns:
bool: True if login was successful, False otherwise.
"""
print("Let us check, if you are already logged in... ", end="")
print("Let us check if you are already logged in... ", end="")
settings = Settings()
tidal = Tidal(settings)
@@ -375,7 +375,7 @@ def download(
writable=False,
readable=True,
resolve_path=True,
help="List with URLs to download. One per line",
help="File with URLs to download. One URL per line.",
),
] = None,
) -> bool:
@@ -395,7 +395,7 @@ def download(
text: str = file_urls.read_text()
urls = text.splitlines()
else:
print("Provide either URLs, IDs or a file containing URLs (one per line).")
print("Provide either URLs or a file containing URLs (one per line).")
raise typer.Abort()
-1
View File
@@ -71,7 +71,6 @@ class BaseConfig:
# Move the invalid config file to the backup location.
shutil.move(path, path_bak)
# TODO: Implement better global logger.
print(
"Something is wrong with your config. Maybe it is not compatible anymore due to a new app version."
f" You can find a backup of your old config here: '{path_bak}'. A new default config was created."
+2 -2
View File
@@ -203,7 +203,7 @@ class DialogPreferences(QtWidgets.QDialog):
):
# If a path is set, use it otherwise the users home directory.
path_settings: str = os.path.expanduser(obj_line_edit.text()) if obj_line_edit.text() else ""
# Check if obj_line_edit is empty but path_default can be usd instead
# Check if obj_line_edit is empty but path_default can be used instead
path_settings = (
path_settings if path_settings else os.path.expanduser(path_default) if path_default else path_settings
)
@@ -223,7 +223,7 @@ class DialogPreferences(QtWidgets.QDialog):
dialog.setDirectory(dir_current)
# Execute dialog and set path is something is choosen.
# Execute dialog and set path if something is chosen.
if dialog.exec():
dir_name: str = dialog.selectedFiles()[0]
path: Path = Path(dir_name)
+3 -3
View File
@@ -406,7 +406,7 @@ class Download:
with path_file.open("wb") as f_target:
for dl_segment_result in dl_segment_results:
with dl_segment_result.path_segment.open("rb") as f_segment:
# Read and write junks, which gives better HDD write performance
# Read and write chunks, which gives better HDD write performance
while segment := f_segment.read(CHUNK_SIZE):
f_target.write(segment)
@@ -1244,7 +1244,7 @@ class Download:
response: requests.Response = requests.get(url, timeout=REQUESTS_TIMEOUT_SEC)
result = response.content
except Exception as e:
# TODO: Implement propper logging.
# TODO: Implement proper logging.
print(e)
finally:
response.close()
@@ -1253,7 +1253,7 @@ class Download:
with open(path_file, "rb") as f:
result = f.read()
except OSError as e:
# TODO: Implement propper logging.
# TODO: Implement proper logging.
print(e)
return result
+4 -4
View File
@@ -69,7 +69,7 @@ class Settings:
@dataclass
class HelpSettings:
skip_existing: str = "Skip download if file already exists."
album_cover_save: str = "Safe cover to album folder."
album_cover_save: str = "Save cover to album folder."
lyrics_embed: str = "Embed lyrics in audio file, if lyrics are available."
use_primary_album_artist: str = "Use only the primary album artist for folder paths instead of track artists."
lyrics_file: str = "Save lyrics to separate *.lrc file, if lyrics are available."
@@ -97,11 +97,11 @@ class HelpSettings:
"will be converted to MP4. FFmpeg must be installed."
)
path_binary_ffmpeg: str = (
"Path to FFmpeg binary file (executable). Only necessary if FFmpeg not set in $PATH. Mandatory for Windows: "
"The directory of `ffmpeg.exe`must be set in %PATH%."
"Path to FFmpeg binary file (executable). Only necessary if FFmpeg is not set in $PATH. Mandatory for Windows: "
"The directory of `ffmpeg.exe` must be set in %PATH%."
)
metadata_cover_dimension: str = (
"The dimensions of the cover image embedded into the track. Possible values: 320x320, 640x640x 1280x1280."
"The dimensions of the cover image embedded into the track. Possible values: 320x320, 640x640, 1280x1280."
)
metadata_cover_embed: str = "Embed album cover into file."
mark_explicit: str = "Mark explicit tracks with '🅴' in track title (only applies to metadata)."