unchained-android icon indicating copy to clipboard operation
unchained-android copied to clipboard

Add downloads that are in folders into a folder

Open oathzed opened this issue 4 years ago • 12 comments

So season packs with multiple episodes currently are just separate in the downloads section. Should be stored in a folder to be organized and not clutter everything.

oathzed avatar Oct 01 '20 22:10 oathzed

It would be nice but I need to find a smart way to do this because for real debrid downloads are separated like this, there is no way to group them by default.

LivingWithHippos avatar Oct 01 '20 22:10 LivingWithHippos

It would be nice but I need to find a smart way to do this because for real debrid downloads are separated like this, there is no way to group them by default.

Ok gotcha, hopefully you can figure a nice way :]

oathzed avatar Oct 01 '20 23:10 oathzed

I confirmed there is no easy way to do this since the torrent JSON is like this:

    {
 		"id": "ASDASDAS",
 		"filename": "ASD Season 23 Complete",
 		"links": [
 			"https:\/\/real-debrid.com\/d\/ZCZXCZXCCZX",
 			"https:\/\/real-debrid.com\/d\/ASDDASASDDSA",
 			"https:\/\/real-debrid.com\/d\/QWEEQWEQW",
 		]
 	},

and the individual links are like this

{
 	"id": "WFGLHOIW3P",
 	"filename": "ASD S23E01.mkv",
 	"link": "https:\/\/real-debrid.com\/d\/ZCZXCZXCCZX",
 	"download": "https:\/\/35.download.real-debrid.com\/d\/WFGLHOIW3P\/ASD%20S23E01.mkv",
 	"streamable": 1
 }

The only thing in common is the "link" in the download, which is the same as the one in the torrent "links". I'd need for every download to check every torrent to see if it belongs to a group. Slightly better would be saving in the local database all the torrents with multiple links every time they get loaded and check the downloads against that. I'll also add a search bar for the lists to be filtered, which could help too.

LivingWithHippos avatar Oct 02 '20 10:10 LivingWithHippos

All I can do to help with this is point out to some open source projects that have this functionality, one of them being a Kodi add-on. https://github.com/nixgates/plugin.video.seren/tree/master/resources/lib

Another one being an add-on for a closed source application

https://github.com/wako-unofficial-addons/helios

These two commits/PRs might help track down the code for the second one... https://github.com/wako-unofficial-addons/helios/pull/48 https://github.com/wako-unofficial-addons/helios/pull/54

m0rpheas avatar Apr 07 '21 15:04 m0rpheas

https://github.com/TheBeastLT/torrentio-scraper

Here's another add-on for an application that displays torrents containing multiple files as folders.

Hope this helps. Cheers!

DaedalusBLN avatar Apr 17 '21 23:04 DaedalusBLN

In the meanwhile I've added a custom fragment for opening torrents with multiple files which contains only those, you can test it here

LivingWithHippos avatar May 20 '21 08:05 LivingWithHippos

Hey, this feature seems to work perfectly. (The link you provided required me to sign up for CircleCI to access the build by the way, I actually used to use the competitor TravisCI in the past and nowadays I just use Github actions to compile/execute stuff on commit stuff and push back to repos.) I noticed at some point that my "Downloads" list was empty, not sure if I had cleaned it or if it was caused by this version of Unchained. I did fire up the browser to cross check whether my Downloads list is empty. Will report back in case it reoccurs. Don't be alarmed yet and thanks a bunch for adding this. The app is getting more and more awesome by the day.

Tip: this could be complemented by a "sort by filename" function when inside the folder to make it even more awesome.

DaedalusBLN avatar May 21 '21 23:05 DaedalusBLN

Hey, this feature seems to work perfectly.

Noice

The link you provided required me to sign up for CircleCI to access the build by the way, I actually used to use the competitor TravisCI in the past and nowadays I just use Github actions to compile/execute stuff on commit stuff and push back to repos.

I thoutght about swapping but circleci works and it's free, I suppose I could switch to github actions but it wouldn't give me anything extra afaik.

this could be complemented by a "sort by filename" function when inside the folder to make it even more awesome

yeah I need to add an issue for this. I'll add a sorted alphabetically by default so I can release it quickly and then make an update

The app is getting more and more awesome by the day.

<3

LivingWithHippos avatar May 21 '21 23:05 LivingWithHippos

@LivingWithHippos

If you search for a torrent and click on it, the individual episodes are still listed instead of they remain into a folder. The download list is cluttered with tons of episodes.

It's weird because the folder structure is shown correctly when you find a torrent via the search option and click on the magnet.

Invictaz avatar Jun 09 '21 22:06 Invictaz

Yes, it works like this in real debrid too

LivingWithHippos avatar Jun 10 '21 19:06 LivingWithHippos

So there is nothing you can do about this?

Invictaz avatar Jun 10 '21 23:06 Invictaz

see the answer above https://github.com/LivingWithHippos/unchained-android/issues/31#issuecomment-702647247

LivingWithHippos avatar Jun 11 '21 00:06 LivingWithHippos