Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide unplayed maps #121

Open
micheljung opened this issue Jun 1, 2017 · 3 comments
Open

Hide unplayed maps #121

micheljung opened this issue Jun 1, 2017 · 3 comments

Comments

@micheljung
Copy link
Member

Back in time, every map was "versioned" by changing its name - like "FooBar v2". There was no association between "FooBar" and "FooBar v2", so technically there were no map "versions" but just two maps that are very similar. It probably still happens today, even though we now link maps with the exact same name (e.g. "FooBar") and read the "version" attribute of their lua files. This causes the map vault to be flooded with such maps.
While we could try to retroactively associate such maps it would be a lot of effort with an incomplete result.

I therefore propose that we somehow (TBD; unplayed time? heuristics? ...?) set maps to "hidden" (so they won't show up in the map vault anymore, but are still playable).

@Brutus5000
Copy link
Member

Brutus5000 commented Jun 3, 2017

Select the candidates (gives atm 2855 656 rows) :

SELECT map_version.id, map.display_name, map_version.filename, map_version.map_id, map.author
FROM map_version
INNER JOIN map ON map_version.map_id = map.id
WHERE map_version.hidden = FALSE
AND map_version.id NOT IN (SELECT mapId FROM game_stats WHERE mapId IS NOT NULL AND startTime > NOW() - INTERVAL 1 year) -- filter map versions which have not been played in the last 2 years
AND 1 = ( SELECT COUNT(*) FROM map_version as associated_maps WHERE associated_maps.map_id = map_version.map_id); -- filter map versions that aren't already in a version compound

Restricting the interval to last year gives just 20 hits more so we are probably really close to a usefull result. (see below)

@micheljung
Copy link
Member Author

How many maps are left then, and how many of them contain a " v*"? Maybe we could try to clean them up manually as well :)

@Brutus5000
Copy link
Member

Brutus5000 commented Oct 22, 2017

I have updated the query above as it was wrong. Now we have 656 maps not played within 2 years and 936 not played within 1 year. Needs further checking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants