Phanx / wow-addon-updater

Install and update World of Warcraft addons from the command line on Linux
zlib License
4 stars 1 forks source link

Fix site parameter not being set during addon matching process #7

Closed jukx closed 6 years ago

jukx commented 6 years ago

Should fix #2

Phanx commented 6 years ago

Since we already know the site based on which parsing function we're in, I don't see a reason to pass around an extra argument; just hardcode the appropriate site name in each parsing function.

jukx commented 6 years ago

Ideally I would rewrite the whole thing so you'd just pass the sitename once, but for now I think this is passable. I really don't like repeating the site identifiers here. This is just messy when you consider typos and such. Also you'd have to find a workaround for the wowace case since it just uses the curseforge function.

jukx commented 6 years ago

Btw, now that I look at it, the wowinterface function seems non-functional. It doesn't actually append anything to the table.

Phanx commented 6 years ago

It's been a while since I actually used it, but I'm pretty sure the WoWI parser only sees the latest version right now, and the parsing of other versions (all the table rows in the HTML) doesn't work but I never got around to fixing it.

Phanx commented 6 years ago

Passing the site name around as a function argument felt too dirty.

WoWI search result parsing will be addressed separately.