[Feedback]: Inconsistencies between country codes format in configuration makes it easy to crash the GUI app #674

Open
opened 2024-04-25 11:20:09 +00:00 by abaurens · 0 comments
abaurens commented 2024-04-25 11:20:09 +00:00 (Migrated from github.com)

Type

Both

Suggestion

In the cli-defaults.yml config, the dlsubs field expects a 2-char ISO 3166-1 country code while dubLang and defaultAudio both expects a 3-char ISO 3166-2 one.

Even tho this is documented in their respective sections of the documentation:

It is missleading when working with the GUI version and editing the config manually, as the default for dlsubs is all which gives no indication about the expected format (unlike dubLang and defaultAudio which both defaults to jpn).

This results in easy mistakes which makes the app silently crash upon service selection because it doesn't recognize the 3-char code.


Here are a few suggestions that could fix the issue, even tho I don't know if they are all technically applicable:

  • Add indications about the expected format in the comment above the fields.
  • Prevent the GUI app from crashing upon service selection when the CLI fails to execute and add an error message to the GUI and/or to the log file.
  • Changing dlsubs to ISO 3166-2 to match dubLang and defaultAudio's format.
  • Making dubLang, dlsubs and defaultAudio format neutral (accept both format and convert to the expected one internaly).
  • Hardcode default values (or don't pass the argument to CLI) whenever the value in config file is unknown/unsuported (possiblywith an error message in the GUI to warn the user that it's config is being ignored).
### Type Both ### Suggestion In the `cli-defaults.yml` config, the `dlsubs` field expects a 2-char `ISO 3166-1` country code while `dubLang` and `defaultAudio` both expects a 3-char `ISO 3166-2` one. Even tho this **is** documented in their respective sections of the documentation: > - [defaultaudio](https://github.com/anidl/multi-downloader-nx/blob/master/docs/DOCUMENTATION.md#--defaultaudio) > - [dublang](https://github.com/anidl/multi-downloader-nx/blob/master/docs/DOCUMENTATION.md#--dublang) > - [dlsubs](https://github.com/anidl/multi-downloader-nx/blob/master/docs/DOCUMENTATION.md#--dlsubs) It is missleading when working with the GUI version and editing the config manually, as the default for `dlsubs` is `all` which gives no indication about the expected format (unlike `dubLang` and `defaultAudio` which both defaults to `jpn`). This results in easy mistakes **which makes the app silently crash** upon service selection because it doesn't recognize the 3-char code. --- Here are a few suggestions that could fix the issue, even tho I don't know if they are all technically applicable: - Add indications about the expected format in the comment above the fields. - Prevent the GUI app from crashing upon service selection when the CLI fails to execute and add an error message to the GUI and/or to the log file. - Changing `dlsubs` to `ISO 3166-2` to match `dubLang` and `defaultAudio`'s format. - Making `dubLang`, `dlsubs` and `defaultAudio` format neutral (accept both format and convert to the expected one internaly). - Hardcode default values (or don't pass the argument to CLI) whenever the value in config file is unknown/unsuported (possiblywith an error message in the GUI to warn the user that it's config is being ignored).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Creepso/multi-downloader-nx#674
No description provided.