iquercorb / OpenModMan

Open Mod Manager - Open source and generic Mod ("Modifications") manager.
GNU General Public License v3.0
95 stars 5 forks source link

Add new way to add repo link #53

Closed lmiol closed 11 months ago

lmiol commented 11 months ago

Right now it is a direct xml file. It's not so easy to create a direct address for your XML file so that it is accessible to other users with whom you want to share the link. I suggest adding Google Drive public. The API for downloading a public file has not changed for almost 10 years and is unlikely to change people will be able to share their XML file, and files for downloading will also be located in Google Drive. I understand that this solution is not “for ages”, but it is very convenient for distributing mods between the community and conveniently loading them.

iquercorb commented 11 months ago

What can be done easily is to allow Open Mod Manager to download repository XML data from any URL type, so you could use this: https://sites.google.com/site/gdocs2direct/home to provide a direct-download link as Repository address, and this should work fine. What do you think of that ?

lmiol commented 11 months ago

good solution (but only for those who know about this site) but anyway the current version always adds .xml and the parsing failed. for example i did this link https://drive.google.com/uc?export=download&id=1VuRLTmagKJJxeufemKvLNO-K8Rd5pQoj and got this message

[00:53:08]  HTTP GET request: https://drive.google.com/uc?export=download&id=1VuRLTmagKJJxeufemKvLNO-K8Rd5pQoj/.xml
[00:53:09]  HTTP GET failed: HTTP_RETURNED_ERROR 404

if i try to add name it will be redirect and parse will be failed too

[00:53:46]  HTTP GET request: https://drive.google.com/uc?export=download&id=1VuRLTmagKJJxeufemKvLNO-K8Rd5pQoj/first.xml
[00:53:47]  HTTP GET failed: HTTP_RETURNED_ERROR 404

also i tried to copy link from generated like this https://drive.google.com/open?id=1VuRLTmagKJJxeufemKvLNO-K8Rd5pQoj&authuser=0 but it is always redirected to https://drive.google.com/file/d/1VuRLTmagKJJxeufemKvLNO-K8Rd5pQoj/view and as result parse failed =(

will be nice if .xml be a part of name (not automatic paste)

lmiol commented 11 months ago

Pastebin will be also a good solution as xml reader=) for example https://pastebin.com/raw/GQreZqPj or https://pastebin.com/dl/GQreZqPj but i cant paste it to app, because it adding .xml at URL end

https://i.imgur.com/oJp1dIj.png https://i.imgur.com/MfPb1D9.png =(

i think best solution is to remove Name field and leave only URL field

iquercorb commented 11 months ago

good solution (but only for those who know about this site) but anyway the current version always adds .xml and the parsing failed.

I know, what I suggest is to allow (in the next version) to set any kind of URL to download XML data. I know this cannot work currently, but this is fairly easy to implement.

What is not possible is dealing with non-direct download from web pages with client-side interpreted script (javascript). An Javascript interpreter is a whole engine on itself, this would require to transform Open Mod Manager to Web Browser: this will never happen.

iquercorb commented 11 months ago

Some news about repository with raw URL of fancy cloud APIs... I just finished implemented raw URL query (prevent appending .xml), I tested the solution you provided and here is my tests and research conclusions:

First, Forget Google Drive, this is not a suitable solution at all since it prevent raw text data download in all tested cases. Either it respond to HTTP request by a web page about antivirus check (who the hell worry about viruses for raw text data ?), either it show the raw text data but encapsulated/embeded in a fancy web page full of HTML and Javascript stuff. In all case, no raw data, OMM cannot parse XML data since it receive Google Drive dirts instead.

I had better chance with pastebin, however it failed too at the first try because I tested the /dl/ link which respond by : "Your request is blocked due to invalid referrer. If you are trying to hotlink this page, please use: /raw/GQreZqPj". That is pleasant to see that the solution is in the error message...

I still interrogative about how you plan to make mods downloadable, since if you can't provide simple text raw download, how do you plan to make Mod file data downloadable the same way ? Because I fear that if you plan to use Google drive, you'ill end with the same problem: Google Drive will provide its sh*** interface instead of raw data... so you'll end downloading HTML garbage as Mod...

lmiol commented 11 months ago

Thanks for the URL without the name field <3 This will allow to research further and look for any alternatives of URL repo without restrictions of hardcode ".xml"

iquercorb commented 11 months ago

Requested feature is implemented since version 1.2