ErrorFlynn / ytdlp-interface

Windows graphical interface for yt-dlp, designed as a simple YouTube downloader
MIT License
1.03k stars 58 forks source link

yt-dlp interface json error cause? #144

Open j2294372 opened 3 months ago

j2294372 commented 3 months ago

it seems to happen randomly out of nowhere, i wonder what causes it to happen?

ErrorFlynn commented 3 months ago

You don't give any details, so I have no idea what you're referring to. JSON errors can happen in different situations (for example when getting data for a newly added URL, or when checking GitHub for a new version). Also, the text of the error is critical to understanding why it happens. Please post a screenshot, and I might be able to tell you why it happens.

j2294372 commented 2 months ago

You don't give any details, so I have no idea what you're referring to. JSON errors can happen in different situations (for example when getting data for a newly added URL, or when checking GitHub for a new version). Also, the text of the error is critical to understanding why it happens. Please post a screenshot, and I might be able to tell you why it happens.

hello again, sorry about not giving more info. i forgot to take a screenshot the last time it happened. basically when this happens, the settings revert back to stock.

Screenshot (59)

ErrorFlynn commented 2 months ago

That happens because the contents of the settings file is missing when the program tries to load it. In other words, the file ytdlp-interface.json has a size of zero when you start the program.

I'm not sure how that could happen. Maybe some external process does it, or maybe the program fails to write the file when exiting, truncating it instead. In the next version, the program will display an error if it fails to write the settings file. It doesn't currently, because I never expected this would happen (I guess I should have known better).