alashow / datmusic

Search and download free music from VK.
https://datmusic.xyz
MIT License
232 stars 58 forks source link

Option to filter out remixes #25

Closed JanPokorny closed 7 years ago

JanPokorny commented 7 years ago

Hi, I once wrote a VK.com downloader too, but it broke down after the API change. Yours is better, anyway. But there is one feature I had that is missing here: automatic filtering of remixes. VK.com is cluttered with remixed versions of songs, and it is sometimes almost impossible to find the original one. My solution was using this regex (it's huge, I know, it had gained weight over time..):

/[ \[\],.:\)\(\-_](bass ?boost(ed)?|dub sound|remake|low bass|cover|(re)?mix|dj|bootleg|edit|aco?ustic|instrumental|karaoke|tribute|vs|rework|mash|rmx|(night|day|slow)core|remode|ringtone?|рингтон|РИНГТОН|Рингтон|звонок|минус)([ ,.:\[\]\)\(\-_].*)?$/gi

If you could implement the functionality as an option, it would be awesome.

alashow commented 7 years ago

Currently, web version (this repo) doesn't use pagination, it only shows the first page. Count of songs returned by each page varies in 10-20, I think. Filtering out them in UI will reduce result count very much.

My choices now:

  1. Implement pagination in the web version. Give an option for filtering. Get next page if the result count is too small (maybe count < 10).
  2. Implement filtering in the API. Get two pages if result count is small (this will mess up pagination of course)
  3. Not filter, but sorting in API. If song matches with regex, move it to the end of the list. Optional or maybe even fixed (always sort).

Imho, 3rd option sounds better.

What do you think?

JanPokorny commented 7 years ago

I think that the 3rd option sounds reasonable, but the sorting should be done on the client (this way, you can have a checkbox to instantly enable/disable sorting). And I have a UI suggestion: Putting a horizontal line between the non-matching and matching results, so they are visually divided. One downside is that when the pagination is implemented, it would be hard to come up with non-confusing UI (so users understand that new songs will appear in the upper section).

alashow commented 7 years ago

Why not just make it always sorted? There will be no need for visual separation. Usually, users need original songs. If the query matches the regex, disable sorting.

JanPokorny commented 7 years ago

That makes sense, I like it.

alashow commented 7 years ago

@JanPokorny This feature is live now at https://datmusic.xyz.

https://datmusic.xyz/?q=Mumford https://datmusic.xyz/?q=Mumford%20Cover