HerrKnarz / Playnite-Extensions

Collection of useful Playnite extensions. See Readme for details!
MIT License
18 stars 2 forks source link

[Enhancement] Link Utilities: Check dead links & resolve redirects #56

Closed chocolatechipcats closed 1 year ago

chocolatechipcats commented 1 year ago

Is your feature request related to a problem? Please describe. n/a

Describe the solution you'd like 'Check Links' option.

If the HTTP status indicates an error, notify the user with an option to open the link and check. Give options to delete the link, exclude from future checks (for fussy websites like CurseForge), or do nothing (for transient errors). If the link is a 301, offer to change the link.

To prevent hammering websites, it would probably be best if this was not available library-span.

Perhaps also give an option to exclude certain domains. (CurseForge is one that should be included by default as they heavily block access.)

Describe alternatives you've considered n/a

Additional context Use-case: When download links for new game, I got two different 'official website' links, for https://www.starcontrol.com and https://www.stardock.com/games/starcontrol/ -- the former just redirected to the latter.

HerrKnarz commented 1 year ago

This is a planned feature since the beginning and I already tried to implement it, but unfortunately many websites don't return an OK or do a redirect without the corresponding return code. Also many websites return "forbidden", if I try to reach them without JavaScript and Cookies. With the given possibilities of the Playnite SDK unfortunately I can't evade those problems. So the feature only would be useful for a fraction of sites.

Another idea is to just show, what a website returns and let the user decide, if that's ok or not. But that might be confusing for users that aren't that technically savvy.

chocolatechipcats commented 1 year ago

yes, the CurseForge thing made me think of that. Perhaps this could be pushed back in scope to just handle 301s like the one I mentioned.

HerrKnarz commented 1 year ago

I added the functionality now, but a little different. "Check links" checks all links fo the selected games and returns the results including status code and response URL. The user can now check theirself if the link is ok or remove/replace it in the result window. I didn't add a blacklist for now. The feature will be in the next release!