chylex / Discord-History-Tracker

Desktop app & browser script that saves Discord chat history into a file, and an offline viewer that displays the file.
https://dht.chylex.com
MIT License
447 stars 80 forks source link

Downloading avatars that have full version removed will fail; DHT will not download small avatar image #254

Open Acters opened 4 months ago

Acters commented 4 months ago

Low Priority issue

Discord History Tracker will try to download full version avatars of the users in chats. However, there is an edge case where the user changes their Profile Picture avatar and the discord client has their old avatar cached in the chat. This will cause DHT to fail to download the avatar of the user as the small chat avatar is still accessible by appending ?size=96

https://cdn.discordapp.com/avatars/{USERID}/{IMAGEID}.webp?size=96

Alongside this issue, modifying download_url in the download_metadata table to append ?size=96 will cause DHT to place the download in pending indefinitely. Closing DHT and reopening the database will show download_url has lost the ?size=96 parameter. Strangely enough it is forever in pending. The status code for the url will be 0, changing this to 404 to cause discord to place it in the failed downloads for us to retry will still not work.