diff options
| author | 2025-01-28 19:12:09 -0500 | |
|---|---|---|
| committer | 2025-01-28 19:12:09 -0500 | |
| commit | a26df18796ff4e506b16bf32fcec9336233b9e2e (patch) | |
| tree | 876512f59831cd670a90a0bc92bc85def6ea3d82 /gallery_dl/extractor/lolisafe.py | |
| parent | 0532a387ef5b7fcb4507a9b094dca37a5f635fe1 (diff) | |
New upstream version 1.28.5.upstream/1.28.5
Diffstat (limited to 'gallery_dl/extractor/lolisafe.py')
| -rw-r--r-- | gallery_dl/extractor/lolisafe.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gallery_dl/extractor/lolisafe.py b/gallery_dl/extractor/lolisafe.py index 295b9c4..6a9f633 100644 --- a/gallery_dl/extractor/lolisafe.py +++ b/gallery_dl/extractor/lolisafe.py @@ -53,7 +53,14 @@ class LolisafeAlbumExtractor(LolisafeExtractor): if "name" in file: name = file["name"] file["name"] = name.rpartition(".")[0] or name - file["id"] = file["filename"].rpartition("-")[2] + _, sep, fid = file["filename"].rpartition("-") + if not sep or len(fid) == 12: + if "id" not in file: + file["id"] = "" + file["filename"] = file["name"] + else: + file["id"] = fid + file["filename"] = file["name"] + "-" + fid elif "id" in file: file["name"] = file["filename"] file["filename"] = "{}-{}".format(file["name"], file["id"]) |
