Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Crashing when archiving shows with duplicate subtitles #408

Closed
Niklashere opened this issue May 7, 2024 · 5 comments
Closed

Crashing when archiving shows with duplicate subtitles #408

Niklashere opened this issue May 7, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@Niklashere
Copy link

Describe the bug
If archiving a show that contains the same subtitles with the same name multiple times, the download crashes. This issue has been persistent since version 3.6.0 and upwards. Version 3.5.2 is the last version without the issue.

Example with https://www.crunchyroll.com/de/watch/GRQW94KQR/the-lost-turnabout
Downloading subtitles en-US (CC) [Video: #2], en-US (CC) [Video: #2]

Example with https://www.crunchyroll.com/de/watch/GYE5MWEQR/resolve:
Downloading subtitles de-DE, en-US, en-US (CC), en-US (CC), es-419, fr-FR, it-IT, pt-BR, ru-RU

To Reproduce

$ crunchy-cli archive --credentials "XYZ:XYZ" -o "test.mkv" https://www.crunchyroll.com/de/watch/GRQW94KQR/the-lost-turnabout

Expected behavior
It should download one of the subtitles if video tracks get merged or both subtitles for each video track if no merge is happening.

Screenshots
Screenshot 2024-05-07 182434

Client (please complete the following information):

  • OS: Windows 11 Pro (23H2)
  • Version: 3.6.1 (can also be found under 3.6.0)

Additional context
tested with:
https://www.crunchyroll.com/de/watch/GRQW94KQR/the-lost-turnabout

episodes with similiar isssues:
https://www.crunchyroll.com/de/watch/GK9U3JMM8/soccers-zero
https://www.crunchyroll.com/de/watch/GYE5MWEQR/resolve
https://www.crunchyroll.com/de/watch/GRK537586/cognitive-impairment-is-your-intelligence-okay

@Niklashere Niklashere added the bug Something isn't working label May 7, 2024
@Niklashere Niklashere changed the title Chrashing when archiving shows with duplicate subtitles Crashing when archiving shows with duplicate subtitles May 7, 2024
@Frooastside
Copy link
Contributor

same issue with https://www.crunchyroll.com/series/GRVN8MNQY/classroom-of-the-elite[S02E03]

[2024-05-07 18:35:50] DEBUG  crunchy_cli::utils::os (1) Created temporary file: /tmp/.crunchy-cli_DWECn5.ass
[2024-05-07 18:35:50] DEBUG  crunchy_cli::utils::download (1) Downloaded ar-SA subtitles
[2024-05-07 18:35:50] DEBUG  crunchy_cli::utils::os (1) Created temporary file: /tmp/.crunchy-cli_UD5DbP.ass
[2024-05-07 18:35:50] DEBUG  crunchy_cli::utils::download (1) Downloaded de-DE subtitles (cc)
[2024-05-07 18:35:50] DEBUG  crunchy_cli::utils::os (1) Created temporary file: /tmp/.crunchy-cli_19X9ga.ass
[2024-05-07 18:35:50] DEBUG  crunchy_cli::utils::download (1) Downloaded de-DE subtitles
[2024-05-07 18:35:50] DEBUG  crunchy_cli::utils::os (1) Created temporary file: /tmp/.crunchy-cli_e1yuY1.ass
[2024-05-07 18:35:50] DEBUG  crunchy_cli::utils::download (1) Downloaded en-US subtitles (cc)
thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rsubs-lib-0.2.1/src/vtt.rs:601:63:
called `Result::unwrap()` on an `Err` value: ParseIntError { kind: InvalidDigit }

@Frooastside
Copy link
Contributor

I dont think its the duplicate subtitles because in my example the previous episodes should suffer from the same issue

@Niklashere
Copy link
Author

Niklashere commented May 7, 2024

Not sure if that's the reason, but episodes one and two of your example each have one en-US (CC) and en-US. Only episode 3 has two subtitles in en-US (CC). This would reinforce my suspicion further. Perhaps additional testing is required.

Episode 1 (no error):

PS C:\Users\Niklas\Downloads> .\crunchy-cli-v3.6.1-windows-x86_64.exe archive --credentials "XYZ:XYZ" -o "test.mkv" https://www.crunchyroll.com/series/GRVN8MNQY/classroom-of-the-elite[S02E01]
:: √ Logged in
:: √ Parsed url 1
:: → Series Classroom of the Elite is not available with ar-ME, ca-ES, en-IN, es-LA, hi-IN, ja-JP, ko-KR, pl-PL, pt-PT, ta-IN, te-IN, tr-TR, zh-CN, zh-CN, zh-TW subtitles
:: √ Loaded series information for url 1
:: Classroom of the Elite Season 2 (Classroom of the Elite Season 2)
::      1. Remember to keep a clear head in difficult times. » S02E01
:: Downloading Remember to keep a clear head in difficult times. to 'test (8).mkv'
::      Episode: S02E01
::      Audio: ja-JP, en-US
::      Subtitles: ar-SA, de-DE, en-US, es-419, es-ES, fr-FR, it-IT, pt-BR, ru-RU
::      Resolution: 1920x1080
::      FPS: 23.97
:: Downloading ja-JP audio  22.19 MiB  15.49 MiB/s [#######################################################################################################################################################] 100%
:: Downloading en-US audio  22.19 MiB  15.32 MiB/s [#######################################################################################################################################################] 100%
:: Downloading video #1      1.31 GiB  97.73 MiB/s [#######################################################################################################################################################] 100%
:: Downloading subtitles    ar-SA, de-DE, en-US (CC), en-US, es-419, es-ES, fr-FR, it-IT, pt-BR, ru-RU
:: Generating output file   [##############################################################################################################################################################################] 100%PS 

Episode 2 (no error):

C:\Users\Niklas\Downloads> .\crunchy-cli-v3.6.1-windows-x86_64.exe archive --credentials "XYZ:XYZ" -o "test.mkv" https://www.crunchyroll.com/series/GRVN8MNQY/classroom-of-the-elite[S02E02]
:: √ Logged in
:: √ Parsed url 1
:: → Series Classroom of the Elite is not available with ar-ME, ca-ES, en-IN, es-LA, hi-IN, ja-JP, ko-KR, pl-PL, pt-PT, ta-IN, te-IN, tr-TR, zh-CN, zh-CN, zh-TW subtitles
:: √ Loaded series information for url 1
:: Classroom of the Elite Season 2 (Classroom of the Elite Season 2)
::      1. There are two main human sins from which all the others derive: impatience and indolence. » S02E02
:: Downloading There are two main human sins from which all the others derive: impatience and indolence. to 'test (9).mkv'
::      Episode: S02E02
::      Audio: ja-JP, en-US
::      Subtitles: ar-SA, de-DE, en-US, es-419, es-ES, fr-FR, it-IT, pt-BR, ru-RU
::      Resolution: 1920x1080
::      FPS: 23.97
:: Downloading ja-JP audio  22.19 MiB  10.63 MiB/s [#######################################################################################################################################################] 100%
:: Downloading en-US audio  22.19 MiB  12.51 MiB/s [#######################################################################################################################################################] 100%
:: Downloading video #1      1.31 GiB  93.60 MiB/s [#######################################################################################################################################################] 100%
:: Downloading subtitles    ar-SA, de-DE, en-US (CC), en-US, es-419, es-ES, fr-FR, it-IT, pt-BR, ru-RU                                                                                                           
:: Generating output file   [##############################################################################################################################################################################] 100%PS 

Episode 3 (error):

C:\Users\Niklas\Downloads> .\crunchy-cli-v3.6.1-windows-x86_64.exe archive --credentials "XYZ:XYZ" -o "test.mkv" https://www.crunchyroll.com/series/GRVN8MNQY/classroom-of-the-elite[S02E03]
:: √ Logged in                                                                                                                                                                                                   
:: √ Parsed url 1                                                                                                                                                                                                
:: → Series Classroom of the Elite is not available with ar-ME, ca-ES, en-IN, es-LA, hi-IN, ja-JP, ko-KR, pl-PL, pt-PT, ta-IN, te-IN, tr-TR, zh-CN, zh-CN, zh-TW subtitles
:: √ Loaded series information for url 1
:: Classroom of the Elite Season 2 (Classroom of the Elite Season 2)
::      1. The greatest souls are capable of the greatest vices as well as of the greatest virtues. » S02E03
:: Downloading The greatest souls are capable of the greatest vices as well as of the greatest virtues. to 'test (10).mkv'
::      Episode: S02E03
::      Audio: ja-JP, en-US
::      Subtitles: ar-SA, de-DE, en-US, es-419, es-ES, fr-FR, it-IT, pt-BR, ru-RU
::      Resolution: 1920x1080
::      FPS: 23.97
:: Downloading ja-JP audio  22.19 MiB  23.36 MiB/s [#######################################################################################################################################################] 100%
:: Downloading en-US audio  22.19 MiB  23.40 MiB/s [#######################################################################################################################################################] 100%
:: Downloading video #1      1.31 GiB  87.94 MiB/s [#######################################################################################################################################################] 100%
:: Downloading subtitles    ar-SA, de-DE, en-US (CC), en-US (CC) —
thread 'main' panicked at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\rsubs-lib-0.2.1\src\vtt.rs:601:63:
called `Result::unwrap()` on an `Err` value: ParseIntError { kind: InvalidDigit }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Episode 4 (no error):

PS C:\Users\Niklas\Downloads> .\crunchy-cli-v3.6.1-windows-x86_64.exe archive --credentials "XYZ:XYZ" -o "test.mkv" https://www.crunchyroll.com/series/GRVN8MNQY/classroom-of-the-elite[S02E04]
:: √ Logged in
:: √ Parsed url 1
:: → Series Classroom of the Elite is not available with ar-ME, ca-ES, en-IN, es-LA, hi-IN, ja-JP, ko-KR, pl-PL, pt-PT, ta-IN, te-IN, tr-TR, zh-CN, zh-CN, zh-TW subtitles
:: √ Loaded series information for url 1
:: Classroom of the Elite Season 2 (Classroom of the Elite Season 2)
::      1. The material has to be created. » S02E04
:: Downloading The material has to be created. to 'test (10).mkv'
::      Episode: S02E04
::      Audio: ja-JP, en-US
::      Subtitles: ar-SA, de-DE, en-US, es-419, es-ES, fr-FR, it-IT, pt-BR, ru-RU
::      Resolution: 1920x1080
::      FPS: 23.97
:: Downloading ja-JP audio  22.19 MiB   1.80 MiB/s [#######################################################################################################################################################] 100%
:: Downloading en-US audio  22.19 MiB  12.62 MiB/s [#######################################################################################################################################################] 100%
:: Downloading video #1      1.32 GiB  64.89 MiB/s [#######################################################################################################################################################] 100%
:: Downloading subtitles    ar-SA, de-DE, en-US (CC), en-US, es-419, es-ES, fr-FR, it-IT, pt-BR, ru-RU
:: Generating output file   [##############################################################################################################################################################################] 100%

@Frooastside
Copy link
Contributor

oh yeah your right i didnt know there was 3 en-US (two cc) on that episode

@bytedream
Copy link
Member

Got fixed in v3.6.2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants