MantisBT - Doomseeker
View Issue Details
0001576Doomseeker[All Projects] Bugpublic2013-11-11 18:292018-09-29 14:44
Jen0va 
Zalewa 
lowtweakN/A
closedfixed 
AnyAnyAny
0.11 Beta 
0.12 Beta 
0001576: Adding support for custom download scripts
I was looking through the doomseeker source code earlier today to see how I could dynamically link a wad instead of linking a large static wadlist. This is a few of the other wadhosts use (fathax, dogsoft).

According to the source, Wadseeker looks for %WADNAME% in the URL to directly grab wads. However, this only seems to work for hardcoded wadhosts as when I try to pass a URL like that into sv_website, the URL is encoded to remove the % (% becomes %25).

Because of this, Doomseeker cannot find the %WADNAME% as it becomes %25WADNAME%25.

Was this intentional? Is it possible to dynamically link wads from something other than the hardcoded list of "default" wad sites?
No tags attached.
Issue History
2013-11-11 18:29Jen0vaNew Issue
2013-11-12 22:02ZalewaNote Added: 0007545
2013-11-12 22:52Blzut3Note Added: 0007546
2013-11-12 23:39Jen0vaNote Added: 0007547
2013-11-13 14:34Konar6Note Added: 0007551
2013-11-13 15:15Jen0vaNote Added: 0007552
2013-11-13 16:08Jen0vaNote Edited: 0007547bug_revision_view_page.php?bugnote_id=7547#r4209
2013-11-13 18:56ZalewaNote Added: 0007556
2013-11-13 18:56ZalewaNote Edited: 0007556bug_revision_view_page.php?bugnote_id=7556#r4211
2013-11-13 22:28Jen0vaNote Added: 0007557
2013-11-13 22:38ZalewaNote Added: 0007558
2013-11-14 00:03Jen0vaNote Added: 0007559
2014-04-14 20:33ZalewaAssigned To => Zalewa
2014-04-14 20:33ZalewaStatusnew => assigned
2014-04-15 16:52ZalewaNote Added: 0008581
2014-04-15 16:52ZalewaStatusassigned => needs review
2014-04-15 16:53ZalewaNote Edited: 0008581bug_revision_view_page.php?bugnote_id=8581#r4636
2014-04-15 16:54ZalewaNote Edited: 0008581bug_revision_view_page.php?bugnote_id=8581#r4637
2014-04-15 16:55ZalewaNote Edited: 0008581bug_revision_view_page.php?bugnote_id=8581#r4638
2014-04-23 18:35ZalewaNote Added: 0008630
2014-04-23 18:35ZalewaStatusneeds review => needs testing
2014-05-11 16:50ZalewaNote Added: 0008779
2014-05-11 16:50ZalewaStatusneeds testing => resolved
2014-05-11 16:50ZalewaFixed in Version => 0.12 Beta
2014-05-11 16:50ZalewaResolutionopen => fixed
2018-09-29 14:44WubTheCaptainStatusresolved => closed

Notes
(0007545)
Zalewa   
2013-11-12 22:02   
You should never assume that your players will use one browser and never another. Getwad, and IDE in consequence, don't support the %WADNAME% code and the custom URL provided by your server would be useless for people who use IDE.

I'm not inclined in favor of this request.
(0007546)
Blzut3   
2013-11-12 22:52   
My position would be neutral. Perhaps we should talk to bond on standardizing a format here? It has always been kind of an issue that a server can only point to the location of one file.
(0007547)
Jen0va   
2013-11-12 23:39   
(edited on: 2013-11-13 16:08)
I think standardizing the format would be a better choice. As it stands, it takes a while (especially for users with slow connections) to download a giant wad directory.

Linking to only one file would save a ton of bandwidth.

(0007551)
Konar6   
2013-11-13 14:34   
GetWAD supports %s in place of the sought wad.
(0007552)
Jen0va   
2013-11-13 15:15   
%s would be fine, but as it is right now, Doomseeker encodes the URL meaning that %s would turn into %25s. What would be the best way to get around this?
(0007556)
Zalewa   
2013-11-13 18:56   
I deliberately didn't use "%s" as a placeholder as it's simply too short and too probable to create collisions with actual URLs that have '%s' in their name. In reality, I don't think I've ever seen an URL where this would be the case, but when you program this kind of stuff you also must assume that such collision will eventually occur.

Anyway, turning of '%' characters to '%25' strings wasn't actually intentional because your usage of %WADNAME% in custom site URLs wasn't intenional either. I guess that this behavior can be modified to actually support dumping %WADNAME% templates in the URLs, but you'll have to realize that GetWAD won't accept such links, and there are many people who use IDE instead of Doomseeker.

Although not ideal, the current solution for your original problem would be to serve a small HTML file with all links to your WADs through Dropbox.

(0007557)
Jen0va   
2013-11-13 22:28   
Perhaps we could try talking to the author of getwad to get them to replace %s with something better? I don't think anyone thinks that this is a bad suggestion, but it would just take some working together with the author of getwad to come to a solution.

@Zalewa: I already do this, the main issue is that the page has over 4,000 wads and takes a while for players with slow connections to download.
(0007558)
Zalewa   
2013-11-13 22:38   
Well, can't you prepare a smaller page with just the WADs that your servers use?
(0007559)
Jen0va   
2013-11-14 00:03   
That would be very hard to accomplish without writing some type of script that populates a page with only the active wads. I run an IRC bot that allows people to upload wads and run servers themselves.
(0008581)
Zalewa   
2014-04-15 16:52   
(edited on: 2014-04-15 16:55)
Change:
- Wadseeker: allow "template" URLs in custom sites. Servers can now specify '%WADNAME%' or '%s' in their web site URLs and Wadseeker will substitute that with names of seeked WADs.

While I implemented what you wanted I still believe that's not the proper solution for your problem. In fact, I believe it's absolutely the worst solution ever. Consider that all your players that don't have the specific version of the server browser will still suffer from this problem. Furthermore, the %WADNAME% and %s templates in URLs will be replaced with the exact name of the WAD that is provided by the server, so if you host "superwad.wad" but provide "superwad.zip" Wadseeker won't find the WAD anyway unless you instruct your web service to do the translation. Which brings us to the proper solution:

If you already have a bot that allows users to upload WADs and then to create servers with these WADs then you can most certainly instruct this bot to do one of the following:
a) prepare minimal HTML page for given server that will be used as this server's web site. Put links to all WADs hosted on that server on that page.
b) prepare a single Java or PHP web service that will accept some kind of ID as parameter and basing on that ID will either look up a database or even query the server itself and create 'a)' dynamically.
Bot would then just start the server and set its website to link to this web service or minimal HTML page.

If I were in your place I'd do one of the following instead of requesting a feature for one of the optional server browsers that has been taken care of 5 months after it was submitted and won't probably be in an actual release for some more time.

Anyway, I'm putting this issue on "needs review" and will put it on "needs testing" once next beta build is released so that folks can test it and check if I didn't add some kind of abhorrent security flaw in the process.

(0008630)
Zalewa   
2014-04-23 18:35   
Change available on beta update channel. Please test.
(0008779)
Zalewa   
2014-05-11 16:50   
Resolving due to release of version 0.12 where this is implemented.