s32x / anirip

:clapper: A Crunchyroll show/season ripper
MIT License
158 stars 37 forks source link

Invalid Syntax when downloading subtitle files #32

Open guiltykeyboard opened 5 years ago

guiltykeyboard commented 5 years ago

When downloading subtitles, i've been getting strconv.ParseInt: parsing "numbers here": invalid syntax.

For example, strconv.ParseInt parsing "17.11": invalid syntax

turtletowerz commented 5 years ago

I seem to be having the same issue with specific episodes. This doesn't happen with all episodes in a season.

Here's an example of what it looks like in the CLI: 2019-06-22_23-24-21

Upon further testing, it seems the root of the cause is an error from the formatSubtitles function in crunchyroll/subtitle.go

Upon even further testing, it appears the issue has to do with the Angle integer in the Style struct. The angle can be a double, which causes ParseInt to error. I saved the XML and upon further examination the Angle double matches up with the double that the error message displays

2019-08-09_22-48-35