mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
10.76k stars 886 forks source link

[kemonoparty] filenames can exceed 255 character limit #5575

Open alexschcom opened 1 month ago

alexschcom commented 1 month ago

On both Mac and Windows, a filename is stored by 8 bits, which results in a max length of 255 characters, including extension.

When downloading from kemono/coomer, the default filename format is set to {id}_{title[:180]}_{num:>02}_{filename[:180]}.{extension}. If title and filename parts are both sufficiently long, this can allow for filenames longer than 255 characters, resulting in failed downloads. (Note also that during downloading, .part files are even longer than the downloaded file...)

Maybe reduce the filename part, as that's arguably the least important part?

EDIT: Problem would be checking for already-downloaded files after change of default filename...

Hrxn commented 1 month ago

Problem would be checking for already-downloaded files after change of default filename...

Not if you're using the archive option.