metube icon indicating copy to clipboard operation
metube copied to clipboard

Ability to download to a different folder

Open oliroe opened this issue 2 years ago • 11 comments

Hi

I'm aware you can use output templates to direct the downloads to different folders but there's no way to do it with individual vidoes. Say for example I want to download a video that should be in a 'Kids' folder and then download one to 'Music Videos' it's not possible through the frontend

Thanks

oliroe avatar Mar 15 '22 22:03 oliroe

Not sure how to do this without clogging the UI (I imagine it's not a very common use case).. Perhaps some expandable panel can be added with "Additional options" or something like that, for this sort of stuff. Leaving the issue open for future thought. Thanks for the idea.

alexta69 avatar Mar 22 '22 21:03 alexta69

I didn't want to "+1" without adding some value but I've also been wanting this feature! Similar use case, I download most stuff into my YouTube Archive library in Plex but have a unique library for Music Videos.

I did a basic mockup using Bootstrap's "split button" component just to visualize what it could look like

Default, dropdown closed

Screen Shot 2022-04-07 at 11 48 45 AM

Dropdown open after clicking arrow side of button

Screen Shot 2022-04-07 at 11 48 57 AM

The example goes "all out" showing multiple configured download locations (with the normal "Add" button going to a default location). I also included "Add to..." at the bottom which could allow a user to manually enter a path but honestly it's probably unnecessary or over complicating it.


Fanboy time: I love MeTube. It's really handy to be able to access yt-dl from anywhere on demand! Even if this feature isn't added any time soon I'll still be using all the time ❤️

jgillman avatar Apr 07 '22 15:04 jgillman

It's a pretty good UX, I haven't thought of using this split button! The question is, where the folder list would come from.

alexta69 avatar Apr 07 '22 20:04 alexta69

For docker wouldn't it just be your mapped volumes?

oliroe avatar Apr 07 '22 20:04 oliroe

I guess sometimes you'd want to save into subfolders under your main downloads directory... so maybe showing all the subfolders there would be a possibility. But I don't know if it'd cover all use cases.

alexta69 avatar Apr 07 '22 20:04 alexta69

The question is, where the folder list would come from.

hahaha yeaaaahhh... I'm 90% a front end person but the other 10% of me knows that figuring out where to store the data is the actual hard part! Especially since MeTube is doing config via env vars. Not sure what the best practice here would be but I realize this is a heavier lift that "just add a button."

IDK if the application can "know" what volumes are mounted by Docker or not but that would be a cool hack. I suspect that's not possible though.

jgillman avatar Apr 08 '22 15:04 jgillman

But it wouldn't need to know, the user could add them based on the mapped paths

oliroe avatar Apr 08 '22 15:04 oliroe

I guess my point was just that there's no stored config outside of env vars so idk how the app would "remember" where it could download to.

Looks like there's some data stored locally in the browser but one would have to re-add the data every time they use a different device/browser.

jgillman avatar Apr 08 '22 16:04 jgillman

Would also like to "+1" this feature and add to the use cases.

I'd use this feature every time I download a playlist. I'm a little surprised that every user does not download a playlist to it's own unique folder.

This is my main use for youtube-dl, to get Let's Plays of various games as a playlist. I then sort the playlist into a folder named after the content creator, itself inside a folder named after the game title. (e.g. downloads/Minecraft/CohnCarnage/)

For now I download the playlist and then manually re-organise the files, which is still easier with metube than it was when I used youtube-dl from the command line, but having the ability to save to a folder would be even better.

Coyote21 avatar Apr 21 '22 02:04 Coyote21

UPDATE: For anyone else wanting this facility, a temporary work around, or possible solution, is to use the following environment variable:

OUTPUT_TEMPLATE: "/downloads/%(channel)s/%(playlist_title)s/%(title)s.%(ext)s"

This will download playlists into a new folder structure, under your downloads folder, named after the channel's name and a sub-folder named after the playlists name. e.g. downloads/CohnCarnage/100 Days in Minecraft/

Perhaps others can review the OUTPUT_TEMPLATE documentation to find a similar fix for their own circumstance.

Coyote21 avatar May 07 '22 20:05 Coyote21

I just uploaded a PR to add support for this. Please take a look at https://github.com/alexta69/metube/pull/177

A docker image with these changes will also be available at https://hub.docker.com/r/jwoglom/metube as soon as the CI finishes for testing

jwoglom avatar Aug 30 '22 05:08 jwoglom

Amazing!! @jwoglom just noticed this added today and it looks great :)

jgillman avatar Oct 06 '22 13:10 jgillman

Any ideas why I am not seeing any folder options load? I installed this via TrueCharts on TrueNAS. I have added a mnt path for the folder I want it to download to but that folder shows nothing. (I have that folder mapped in Plex so was hoping to make a process flow). image

kmanan avatar Mar 28 '23 04:03 kmanan

@kmanan I think folders will only appear there if any subfolders in the configured download folder. However you can type anything you want there and it will mkdir the folders recursively; then the next time you attempt to download something those newly existent folders should appear

jwoglom avatar Mar 29 '23 23:03 jwoglom

@kmanan I think folders will only appear there if any subfolders in the configured download folder. However you can type anything you want there and it will mkdir the folders recursively; then the next time you attempt to download something those newly existent folders should appear

Thanks! It was a permissions issue. MeTube's default user assigned by TrueNAS didn't have the permissions. Once I changed it to a user from the admin group, the folder structure showed up.

kmanan avatar Mar 31 '23 00:03 kmanan