Avnsx / fansly-downloader

Easy to use fansly.com content downloading tool. Written in python, but ships as a standalone Executable App for Windows too. Enjoy your Fansly content offline anytime, anywhere in the highest possible content resolution! Fully customizable to download in bulk or single: photos, videos & audio from timeline, messages, collection & specific posts 👍
https://fansly.com/
GNU General Public License v3.0
1.27k stars 64 forks source link

Images Date/Time Exif Field is sometimes populated with incorrect value #189

Open Nostang3 opened 9 months ago

Nostang3 commented 9 months ago

IMPORTANT: Be sure to replace all {{ template sections ⚠️}} or your issue may be discarded.

Bug Description

I"ve noticed that when I download images and then copy them to my phone my gallery app will place some photos at the bottom of the gallery presumably because it defaults the time/date to 1970. I'm not sure if there is just some edge case where the UTC value isn't converted correctly or it's populated it with some other number. For exmample on a photo I downloaded today the value in the DateTime field is: bb2de2b328d9ab2466ee65205def4604b8b98ac5b6937108db7a98ca8b1c9a73.

Expected behavior

Photo would download with either the TimeDate of when the Content Creator took it or a value of when the downloader grabbed it.

Actual behavior

Field is populated with a value that gallery apps can't parse/understand.

Environment Information

User Research

I have done the following:

Additional context

Screenshot_20231127-204213

Nostang3 commented 9 months ago

Updated to latest (3.4.1) and downloaded more files, just now. Here is exif from one.

ExifTool Version Number : 12.70 File Name : 2023-11-27_at_22-01.jpeg Directory : C:\Not\A\Pron\Directory File Size : 2.1 MB File Modification Date/Time : 2023:11:27 22:23:20-05:00 File Access Date/Time : 2023:11:27 22:34:50-05:00 File Creation Date/Time : 2023:11:27 22:23:20-05:00 File Permissions : -rw-rw-rw- File Type : JPEG File Type Extension : jpg MIME Type : image/jpeg Exif Byte Order : Little-endian (Intel, II) Software : 585723579199397888 Modify Date : dc474f8968a885a1e419dfd3a78e6ae1366e194dd6892d4ab275b920ce776388 Image Width : 3024 Image Height : 4032 Encoding Process : Baseline DCT, Huffman coding Bits Per Sample : 8 Color Components : 3 Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2) Image Size : 3024x4032 Megapixels : 12.2

Oldgit13 commented 9 months ago

Software : 585723579199397888 (File ID) Modify Date : dc474f8968a885a1e419dfd3a78e6ae1366e194dd6892d4ab275b920ce776388 (File Hash)

The above lines are because you have "metadata_handling = Advanced" in your config.ini file. It's adding the file hash and id to the exif data section of the image file. You might want to set it to "metadata_handling = Simple" it makes the file name longer by adding the ID and Hash to the file name instead of the exif data. (not ideal but it might help the issue you are having)

You might want to check out this bug I found when using the advanced metadata handling https://github.com/Avnsx/fansly-downloader/issues/172 basically it is overwriting images in single post sets because of the way fansly marks the date and time on the images and this downloader uses that info in the file name.

Nostang3 commented 9 months ago

Thanks for the info. I'd be okay with the FileID in the name but not both. Duplicates don't bother me enough to warrant a 100+ character name. Having the correct post date in the right spot is more important to me. I'm overwriting the hash in the modify date section anyway for the file on my phone otherwise it sits at the bottom of the gallery in random years. Maybe an option to put the data in a different field like 'Artist', 'Copyright', 'Make', Model', or 'User Comment'?

Oldgit13 commented 9 months ago

Assuming you are using the python version and not the exe packaged version, you could try play with these lines in the "metadata_manager.py" script.

86: custom_tag_mapping = { 87: 'Exif.Image.Software': 'ID', 88: 'Exif.Image.DateTime': 'HSH' 89: }

139: custom_tag_mapping = { 140: 'ID': 'Exif.Image.Software', 141: 'HSH': 'Exif.Image.DateTime' 142: }

Change Exif.Image.DateTime to Exif.Image.Model