s32x / anirip

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

anirip fails to create an episode if the title is too long #35

Open eco9898 opened 5 years ago

eco9898 commented 5 years ago

Error message: [anirip] rename C:\Users[XusernameX]\AppData\Local\Temp\anirip\episode.mkv Do You Love Your Mom and Her Two-Hit Multi-Target Attacks\Season One\Do You Love Your Mom and Her Two-Hit Multi-Target Attacks - S01E04 - Kids Are Kids and Parents Are Parents (but Also Human Beings), and It Takes All Kinds, but They Get Through It Together, Right.mkv: The system cannot find the path specified.

I believe this error occurs because the episode title is too long for the file system to handle. If I manually attempt to create the file I get a length error.

Could you please add a check to try to handle this. eg: if title.length > X: title = title.substring(0,x)

Obviously this would need to be done before checking if the file already exists to stop redownloads of renamed files.

Thank you for your time, I love your software

s32x commented 5 years ago

This is a really good suggestion. I haven't yet run into this issue but I'll definitely be sure to add a check. Thanks!