Closed hernandito closed 8 months ago
Hey there! There are some settings that should do exactly what you need re: banners and NFOs in the Media Profile settings, but the only way those settings will work is if your media is set to split into "seasons"
This isn't ideal, but it's the only way I could think of to deterministically find the root-level non-shared folder for a given series AND provide support for all major media center apps. Other apps take a more assertive approach in how they name/store your media, but since PF was originally designed for archiving I wanted to allow maximum customization of the storage location/format.
The question then is how do you split the content into "seasons" when there isn't any season metadata stored in the YouTube video? I took an approach used by ytdl-sub and split content into seasons based on the year of upload so you get something like this:
Show Name/
Season 2021/
s2021e0101 - Vid Title.mp4
Season 2022/
...
Other Show Name/
Season 2023/
s2023e0101 - Vid Title.mp4
Season 2024/
...
This seems to work well on all major media center apps. If you're curious, you can see the logic that goes into determining the root folder here.
Practically speaking then, my advice is to set your profile's Output Path Template to something like this: /shows/{{ source_custom_name }}/Season {{ season_from_date }}/{{ season_episode_from_date }} - {{ title }}.{{ ext }}
. You can remove the /shows/
at the beginning if you want, but the important stuff is what comes after that.
I've also recently added presets to profiles - there's a "Media Center" preset there that should set you up!
Let me know if this works 🤙
re:
On a separate note, when PF is downloading a channel, there are also playlists in that channel (the playlist videos are included in the channel's video as individual files. I think placing the individual playlist videos into a separate folder would be nice
I'll look into this, but I'm not sure if it'd work out as expected because yt-dlp
doesn't return any playlist
metadata for a video downloaded when looking over a channel. You might be able to do something with multiple media profiles + one source for each playlist, but that'd be a very manual process. I'll see what I can find!
Simply.. WOW!
It has taken me a while to wrap my head around it, with a lot of testing. I am still at it, mainly seeing how Kodi presents the info. There are challenges because some channels have or miss the banners, nfo data. I am trying one where I edited your line above to put the episode title before the season /{{ title }} - {{ season_episode_from_date }}.{{ ext }}
. These present better in the UI. But still testing.
One thing I want is for the episode id s2024e0311 to suppress the the full year... so it reads as s24e0311. I think it's doable, but the syntax stuff is not easy to digest. Every time I try an edit... it takes a long time to re-download the channels.
Thank you.
Yeah, the syntax stuff can be hard. You should be able to do what you want by using yt-dlp
syntax instead - something like: /{{ title }} - s%(upload_date>%y)Se%(upload_date>%m%d)S.{{ ext }}
, but this is untested.
If you want to do the same for the _season folder, that'd be something like /Season %(upload_date>%y)S/
. So overall it'd be something like /{{ source_custom_name }}/Season %(upload_date>%y)S/{{ title }} - s%(upload_date>%y)Se%(upload_date>%m%d)S.{{ ext }}
(again, untested).
I like to test changes on smaller channels like this. It's not perfect, but it lets me test changes quickly
So, I created two Media Profiles. They generated what I expected in terms of actual files names.
First Profile:
/{{ source_custom_name }}/Season {{ season_from_date }}/{{ title }} - {{ season_episode_from_date }}.{{ ext }}
I get filenames that look like this:
In Kodi: and A little weird with the numbers, but Kodi does present TV shows with the corresponding episode number.:
Second Profile:
/{{ source_custom_name }}/Season {{ season_from_date }}/{{ title }} - s%(upload_date>%y)Se%(upload_date>%m%d)S.{{ ext }}v
I get filenames that look like this:
But in Kodi it's a bit odd (considering that the Season syntax is the same in both profiles: and
I really don't have a preference w/ either version. I think this is truly terrific. I like that it presents everything chronologically by air date. I think this is ready to be implemented in my living room htpc!!
I'm curious, other than my media player user case, what do you envision other uses for it? You mentioned archiving (which makes sense in case YouTube pulls the videos for some reason). I see Music listed... but I don't know much about it.
The syntax is quite tricky. I had never heard of yt-dlp before. I would be happy to write up a Kodi setup guide for the less technical audience. Please let me know if interested, and how to best format it.... a Github repo type README perhaps?
This is truly awesome. You should create an unRAID Forum thread for it. Also reach out to SpaceInvader One to do a video!
Thank you!
I really don't have a preference w/ either version. I think this is truly terrific. I like that it presents everything chronologically by air date. I think this is ready to be implemented in my living room htpc!!
Love to hear it! Thank you for all your feedback so far - seeing people get use from it makes all the work worthwhile!
I'm curious, other than my media player user case, what do you envision other uses for it? You mentioned archiving (which makes sense in case YouTube pulls the videos for some reason). I see Music listed... but I don't know much about it.
There's one other use case that was brought up to me today which is using PF as a podcast host. I love this idea since I listen to a lot of podcasts and this doesn't actually require me to change anything about the file downloads or structures - it simply requires an XML file that you can put into your favourite podcast app. I'm going to be looking into this over the weekend.
Past that, I think you've covered the main use cases I'm interested in supporting. I'll be adding something to view your content in-app just to check it's correct, but the app is not meant to be the main place you view content. Its role will always be to download the content for you to consume through other apps (like Kodi!). I don't think it needs to keep expanding to cover more use cases unless there's a compelling reason to do so - I'd prefer it does fewer things but does them really well!
The syntax is quite tricky. I had never heard of yt-dlp before. I would be happy to write up a Kodi setup guide for the less technical audience. Please let me know if interested, and how to best format it.... a Github repo type README perhaps?
I don't mind writing a guide in the FAQ, but I would love your input! Once you've gotten some time to use it with your HTPC, I'd love a few bullet points on tips and tricks you've found!
You should create an unRAID Forum thread for it. Also reach out to SpaceInvader One to do a video!
I'll be creating a thread soon! I'm not sure if SpaceInvader would want to do a video on my small app, but maybe once it's a little bigger! Fingers crossed, anyway 🤞
I think we've covered everything so I'm going to close this issue. If there's anything else, feel free to reopen it or a new one!
I'll leave a comment here when I create the unraid thread 🙌
@hernandito following up here to say I've created a support thread here.
Just thought I'd let you know!
Hi.
Following up my earlier feature request. I have had a chance to review the changes you have made.
Earlier you mentioned making Pinchflat (PF) pltform agnostic, and not focused on individual applications/media players. My current comments below keep this in mind. You mentioned being able for users to create custom scripts. I am not sure at what point in PF's process, would this script be executed and how it can be called out.
PF organizes downloads in unRAID /mnt/user/Media/YouTube/ChannelName/IndividualVideo. In each video folder it adds the downloaded files... mp4, nfo, and xxx-thumb.jpg.
My Kodi is properly picking up the folder structure correctly. I see 1) a list of channels. In each channel, I see 2) the list of all videos. Going into each video, I see 3) what should be info for the video.
When I go into 1) it would be great if one could see all the Channel banners. I am not sure if these can be downloaded via the YT scraping method. I am not anticipating having a ton of channels. I can manually download the banner, and copy it to the root of the channel folder and rename it properly (banner.jpg for Kodi). But automating this in a custom script would be great.
When I go into 2), we see the list of videos. It would be great if there was an NFO with the channel's info. I know you are scraping the NFO for the video (more on this later), but the info/description for the channel itself would be great. Once in 2) we have the opportunity to see the thumbnail image for each video. I simply copied the xxx-thumb.jpg and copied it to a file called folder.jpg. This shown the thumbnails beautifully.
When I go into 3), I see the video alone and the xxx-thumb.jpg is properly displayed. I am not sure if it is reading the jpg file, or if it's displaying the embedded thumbnail file. Nothing to do here. however, I should be seeing the NFO info here, but Kodi is not reading properly. A quick look at the nfo and compared to a stock Kodi nfo, the main items are named the same... I tried copying regular nfos from both movies and episodes, and none displayed the data. I think for now this is a Kodi issue.
As I mentioned above, I am not sure how custom scripts would operate as PF is doing its scraping/downloading. Should there be an entry in each Media Profile... something that injects a script command at the proper step that, for example, copies the xx-thumb.jpg to a folder.jpg file?
On a separate note, when PF is downloading a channel, there are also playlists in that channel (the playlist videos are included in the channel's video as individual files. I think placing the individual playlist videos into a separate folder would be nice. something like:
This would make watching the playlists nicely organized.
After all my long-winded explanations above... we summarize:
You should create a support thread in the unRAID form. If you are OK with it, I can post the above into that thread. This way Pinchlist gets more exposure/traction. For example, I am not a Plex/Jellyfin expert, people at the forum can chime in on how they would customize so it works with Plex.
Thank you!