dessalines / torrenttunes-client

DEPRECATED: A BitTorrent-based music streaming service.
GNU General Public License v3.0
358 stars 43 forks source link

Clean up unavailable songs #29

Closed dessalines closed 9 years ago

dessalines commented 9 years ago

A lot of people are sharing their libraries, yet don't leave the torrenttunes-client running all day, meaning that a lot of music on torrenttunes is unavailable to the rest of us.

In an attempt to clean house and make sure that all music is highly-available, I'm going to add an IP Address column to the server song table, to be able to determine what IP address uploaded what song. I'll also add a timeouts column, so that if that song wasn't finished within 15 minutes, it will add to a timeouts counter.That way, if an uploader isn't running their client, I can easily remove all their music from the server at once. As it stands right now, I have no way to remove unavailable music en masse.

I want torrenttunes to only hold available music; Its frustrating to find a song only to figure out that no one is actually seeding/sharing it. By far, the vast majority of people who have shared their libraries aren't running clients; I guesstimate more than half of the songs currently shown on torrenttunes are unavailable.

I will be clearing out torrenttunes-server songs, so everyone will have to reshare your collections. I will create a special button to clear your local library database so that you can re-share your songs.

I'm still against a login system, because I want the service to be anonymous; but uploaders should know that I will remove your music if you aren't seeding it, and haven't contacted me about why its unavailable.

Nutomic commented 9 years ago

Does this mean I have to add my music again every time I start torrenttunes? Or is it a one time thing for the update only?

Also, storing IPs doesn't seem like a good idea from a privacy perspective. And what if multiple people are seeding the same song?

dessalines commented 9 years ago

Not every time. Its a one time thing for this upcoming update. I've written most of the code and will probably be making the change within the next day or two, so people(me included) will have to click the clear clear database button, and rescan their libraries.

Also, storing IPs doesn't seem like a good idea from a privacy perspective.

I just did some thinking about this, and you're right. But I still need a way to uniquely link an uploader's computer to the songs they've chosen to share though.

I think I'm going to go with the uploader's MAC Address. That'd uniquely identify the uploader, without compromising their network location.

And what if multiple people are seeding the same song?

That's not an issue here; The original uploader is the person who creates the .torrent file, no one else can, because song's are unique. When another person clicks play, they're just grabbing the torrent file that the original uploader made.

dessalines commented 9 years ago

Looks like I can't get mac address, because that requires root..

dessalines commented 9 years ago

Thought of a way to do this. I'll hash the IP address with the users home directory location string(which I cannot know). This will make a unique computer identifier that could be stored on the server, that couldn't be decoded. I'll call the column IP_HASH

dessalines commented 9 years ago

This cleanup should be done by tomorrow morning.

ghost commented 9 years ago

This feature is only for admins info? Respectfully I think that ip hash could be dangerous to the uploaders, could compromise their work...

ghost commented 9 years ago

Another question, if user use VPN, how the app resolve the presence of two or more IPs?

dessalines commented 9 years ago

This will make a unique computer identifier that could be stored on the server, that couldn't be decoded. I'll call the column IP_HASH

I can't decode that column, its an anonymous unique identifier for an uploader though. Read above for why this is necessary.

If you use a VPN, it should still be fine, because the hash is made from a combination of the IP address and the user.home Dir. As long as two computers aren't using the same VPN with the same user name, they should be unique.

Even if some peoples ips change, I should still at least have groups of uploads, that I can view their timeout counts and remove their songs if necessary.

Here's the function for future reference:

https://github.com/tchoulihan/torrenttunes-client/blob/master/src/main/java/com/torrenttunes/client/tools/Tools.java#L978