crunchy-labs / crunchy-cli

👇 Command-line downloader for Crunchyroll
MIT License
606 stars 62 forks source link

Make delimiter for languages configurable #311

Closed p47-6 closed 8 months ago

p47-6 commented 10 months ago

Is your feature request related to a problem? Please describe. The pipe "|" delimiter for languages does not work for windows because the character is not a valid path character in windows.

Describe the solution you'd like A simple solution would be to make the delimiter configurable. Another solution could be to make a replacement pattern or a list of characters configurable to remove special characters from the final result.

bytedream commented 10 months ago

Can you give an example of an invalid command?

p47-6 commented 10 months ago

I am typically using the following command: crunchy-cli --experimental-fixes --etp-rt "$cookie" archive --skip-existing --yes -m audio -a "de-DE" -a "ja-JP" -a "en-US" -s "de-DE" -s "en-US" -o "$base_dir/{series_name}#{series_id}/Season {season_number}/{series_name} - S{season_number}E{episode_number} - {audio}.mkv" $url

The {audio} part gets replaced by a concatenated list of audio files delimited by a pipe: de-DE|ja-JP|en-US

I am doing this to get arround the issue #292 and let a script regulary check if there are new episodes or languages available. It is not a optimal solution but a workaround for now.

In previus versions the audio part was concatenated without a delimiter and that worked fine on every os. I havent tried to run the command on windows but the following characters are not valid in windows file names: < > : " / \ | ? *

bytedream commented 8 months ago

The default character for it got changed to _ and it can be configured with the CRUNCHY_CLI_FORMAT_DELIMITER env variable in v3.3.0