funkyg / funkytunes

A streaming music player for Android, using torrents.
GNU General Public License v3.0
122 stars 24 forks source link

Mega pull request #18

Closed gjedeer closed 7 years ago

gjedeer commented 7 years ago

This is a big one, probably should have been several smaller ones:

Then I went a little crazy and added ability to run various search engines and select best results based on score. Base score: seeds+leechers. 2 if not FLAC. 50 if torrent file available (no magnet)

I know we were discussing not doing that but it increases number of played albums.

funkyg commented 7 years ago

Wow this one is really huge. yeah would have been good to split it up a bit.

The code looks good from a quick look, and everything seems to work. But ive noticed a bug:

gjedeer commented 7 years ago

Hmm, did you try the same album with freshly-started app? It seems skytorrents returns crappy results for some albums but something playing in the background shouldn't be a factor.

Or do you have any specific sequence of albums where i can reproduce that? Because it happens sometimes to me too but i didn't see that it's related to something playing.

i need to try ordering skytorrents by relevance instead of seeds.

funkyg commented 7 years ago

Youre right, it probably just grabbed a bad torrent. Im not sure which exact album i tried earlier, but i think it was this one (first one if you search for "cypress hill". So same name for the album and artist. That looks like an extremely bad case, because the actual album doesnt even appear in the logs. Maybe it would help if we add the year to the torrent search?

anyway its not related to this pr, so feel free to ignore for now

gjedeer commented 7 years ago

I was thinking about this today and I'm wondering if I should add client side filtering of results. If the torrent name doesn't even contain full band name it's likely garbage.

I'm thinking

if ! normalize(torrent_name) ~ ".*cypress.*hill.*": gtfo

where normalize() would lower case and transliterate it from unicode to ascii.

Anyway: want to do the honors and merge?

funkyg commented 7 years ago

oh of course. thanks for implementing this all :)

funkyg commented 7 years ago

I think searching artist album year could already improve the search results a lot. Maybe client side filtering wont even be necessary with that.

gjedeer commented 7 years ago

Worth giving a shot for sure