MrBrax / LiveStreamDVR

An automatic livestream recorder
MIT License
335 stars 26 forks source link

(Feature request) rename old vods #279

Closed Serph91P closed 1 year ago

Serph91P commented 2 years ago

Love the naming scheme implemented, like how easy it is. Where you can go like login}{season}{episode}. And even clickable presets and stuff. Great work. Only thing I wish there was you could rename all the old vods the same fashion after you changed it. Also would help I hope with importing in Plex. So at least the seasons are getting registered correctly because Plex cannot read the nfo files generated for kodi or at least not anymore. Because at it is right now Plex goes like. Season is 2022 and so on see: https://support.plex.tv/articles/200265256-naming-home-series-media/ .Just something for you to think about.

Serph91P commented 2 years ago

Oh forgot to ask what do you mean by `Vod filename. This will break automatic segment finding if changed from default.

Default: {login}{date}{id}`?

Won't it just not be able to ad them to the nfo or something or won't it be able to find them at all.

Serph91P commented 2 years ago

What would be even better would be to implement the metadata into the files dunno if that's possible. See Plex wiki:

Personal Media Shows: The Personal Media Shows agent is used to identify media files that haven’t been broadcast and so don’t appear in online databases. Shows scanned using this agent will be presented like a TV series. This is useful if you have a set of videos from a single event, like a wedding. If Local Media Assets is enabled for the agent, any embedded metadata in the files will be used for that show.

MrBrax commented 2 years ago

plex is kind of a pain. regular metadata is already written to the files, can't seem to find a season field for it though

Oh forgot to ask what do you mean by `Vod filename. This will break automatic segment finding if changed from default.

in a worst case scenario if the segment list is empty, it won't be able to find the mp4 files because of a different naming scheme. not really a problem anymore since you can edit the segment list manually in the gui

Serph91P commented 2 years ago

plex is kind of a pain. regular metadata is already written to the files, can't seem to find a season field for it though

Oh forgot to ask what do you mean by `Vod filename. This will break automatic segment finding if changed from default.

in a worst case scenario if the segment list is empty, it won't be able to find the mp4 files because of a different naming scheme. not really a problem anymore since you can edit the segment list manually in the gui

Found this on Reddit. Plex itself doesn't really seem to want to disclose this information. So the naming scheme would need to be "name of series s01ep01" or something. https://www.reddit.com/r/PleX/comments/rt8pdk/plex_wont_read_metadata_from_my_own_mp4_files/hqrhmf7

Serph91P commented 2 years ago

Or what also could help folder for seasons. Could to this myself but would be gorgeous if lsdvr would do it. I know it would be a bigger change with folder.

Serph91P commented 2 years ago

https://support.plex.tv/articles/200220717-local-media-assets-tv-shows/

MrBrax commented 2 years ago

i had ideas about having subfolders for vods, but that's probably gonna take some time. gonna need some database over the vods too

MrBrax commented 2 years ago

ok so this feature might just break everything, but as a first start the subfolders seem to be working

Serph91P commented 2 years ago

ok so this feature might just break everything, but as a first start the subfolders seem to be working

Wow dude just how fast are you. Sure it would break everything since there are suddenly subfolder. If you need someone for testing. I have running two instances ATM so no problem setting one to dev. Needed two because one would crash described in my other ticket. So I setup a backup.

MrBrax commented 2 years ago

yeah well sometimes when i'm out and about i get ideas in my head :)

it should be able to find all existing files and work as normal, but that only happens if there's no database file for the channel in the config folder, so no way to manually call a refresh. if you make subfolders for them, delete the database file for the channel and restart the server it should pick them up

Serph91P commented 2 years ago

yeah well sometimes when i'm out and about i get ideas in my head :)

it should be able to find all existing files and work as normal, but that only happens if there's no database file for the channel in the config folder, so no way to manually call a refresh. if you make subfolders for them, delete the database file for the channel and restart the server it should pick them up

What does the db file look like or where is it. Because just updated and everything is working so far. But dont see any db file of some sorts. Will try later to sort them in Folder. Also what is the naming you intended to use or make it modular like filenames?

MrBrax commented 2 years ago

database files are stored in /data/config/vods_db/*.json

naming for vod folders is the same as the filename right now, will most likely make it the same with templates

Serph91P commented 2 years ago

database files are stored in /data/config/vods_db/*.json

naming for vod folders is the same as the filename right now, will most likely make it the same with templates

so every stream gets his own subfolder?

MrBrax commented 2 years ago

yes, i think that's good for organizing. can be disabled of course

Serph91P commented 2 years ago

yes, i think that's good for organizing. can be disabled of course

got it, question wouldnt it make more sense in terms of medeia server to make season folder like put every stream of june in the folder 202206 or something? because right now you would end up with folders like 202206_1,202206_2,202206_3 and so one

MrBrax commented 2 years ago

i don't think it would break if you did that honestly, you could just use {season} as the folder name and it would put every stream for that month in there. added the functionality on latest build

Serph91P commented 2 years ago

i don't think it would break if you did that honestly, you could just use {season} as the folder name and it would put every stream for that month in there. added the functionality on latest build

but the season is 2022 so it would put every stream of the year in there no? image

MrBrax commented 2 years ago

yeah you're right, i could add some more variables to use

Serph91P commented 2 years ago

yeah you're right, i could add some more variables to use

Your making every Media Server user happy right now :)

MrBrax commented 2 years ago

any suggestions for more fields? could be anything from the user or at the point of starting the stream

Serph91P commented 2 years ago

any suggestions for more fields? could be anything from the user or at the point of starting the stream

more fields like another folder or more presets for the user to chose from?

MrBrax commented 2 years ago

fields like {season} and {date} etc

i'm adding year/month/date as separate ones

Serph91P commented 2 years ago

fields like {season} and {date} etc

i'm adding year/month/date as separate ones

I dont think from my point of view there is anything that makes sense to add.

Serph91P commented 2 years ago

fields like {season} and {date} etc

i'm adding year/month/date as separate ones

There is something broken herem just tried season and this is what came out :D image

MrBrax commented 2 years ago

is that in a manual stream record?

Serph91P commented 2 years ago

is that in a manual stream record?

yeah

MrBrax commented 2 years ago

alright, pushing changes. changing the folder names is not implemented yet, but you could just rename them yourself and use the new "rescan vods" in the streamer header. should work without leaving vods in memory now hopefully

Serph91P commented 2 years ago

There seems to be a mismatch between what der Interface shows an what is created: image image

MrBrax commented 2 years ago

yup typo

Serph91P commented 2 years ago

ok that did not work. moved now everything is season specific folders. Plex no liky. Looks almost like its getting it from somwhere else. Because after that I tried just Season 03 and so on an still: image

MrBrax commented 2 years ago

https://forums.plex.tv/t/the-plex-dance/197064 done this?

MrBrax commented 2 years ago

also, plex does support daily format just by date, maybe that could be something? i think it should split if there's multiple per day

Serph91P commented 2 years ago

https://forums.plex.tv/t/the-plex-dance/197064 done this?

dunno where the error is, because i completely deleted the Library and added it again. The Menus shown there arnt even present anymore.

Serph91P commented 2 years ago

image image

MrBrax commented 2 years ago

what if you use regular dates like "username (2022-08-28)-01.mp4"

Serph91P commented 2 years ago

what if you use regular dates like "username (2022-08-28)-01.mp4"

Nope, will test tomorrow again. Make an extra direcotry where I can test things safely. Just renamed wrong files :D

Serph91P commented 2 years ago

what if you use regular dates like "username (2022-08-28)-01.mp4"

OK got it, gonne need some changes I think to ask for. Thats how it looks atm: image image image

Only Problem there is now I think is that episode and month which I need to get the naming on point are written without a preceding 0 until it has two numbers like 10 and so on. image

Then the year is left dunno about this because the season would start at 01 again but the year will change. Like streamername (2023) - S01E01 and so on. Dunno what to do about that because the month will start again obv next year. You could change Season for episode to be continous this would work. like start from recording start streamername (2022) - s01e01 .... but if the year changes the season continues: streamername (2023) - s13e01 ....

MrBrax commented 2 years ago

i thought about adding the last two digits of the year, like 20/21/22/23 and so on, so the season number would at least be a bit shorter like "2209"

Serph91P commented 2 years ago

i thought about adding the last two digits of the year, like 20/21/22/23 and so on, so the season number would at least be a bit shorter like "2209"

I can try if plex will eat it like this, because 202209 works for the season. Because the plex documentation says it has to be in this pattern for episodes

/Band of Brothers (2001)/Season 01/Band of Brothers (2001) - s01e01 - Currahee.mkv

MrBrax commented 2 years ago

i think it's pretty much a losing battle with how little control you get, i added the short year to the most recent one but it feels like an endless endeavor

Serph91P commented 2 years ago

i think it's pretty much a losing battle with how little control you get, i added the short year to the most recent one but it feels like an endless endeavor

yeah I hate plex for losing plugin support, there was one where you could use the kodi nfo stuff. Will Have to rename everything myself then.

MrBrax commented 2 years ago

is there a perfect naming scheme for this that's achievable? i feel like there are too many obstacles for it.. maybe a counting season number for every month that doesn't take the month number into consideration?

Serph91P commented 2 years ago

is there a perfect naming scheme for this that's achievable? i feel like there are too many obstacles for it.. maybe a counting season number for every month that doesn't take the month number into consideration?

yeah there is: streamername (year) - s01e01 Where your season statement ist just incrementing numbers while month change maybe and episode ist just incrementing while a season is running I guess dunno how easy to make. Maybe I sit down with my Mentor (learning web dev right now) to do this.

MrBrax commented 2 years ago

oh so you mean having a separate show for each streamer year? because plex only cares about one or the other naming scheme i think

Serph91P commented 2 years ago

oh so you mean having a separate show for each streamer year? because plex only cares about one or the other naming scheme i think

hmmm. streamername (year) is fine. the part about S09E11 is crucial. Because if this isnt right the episode get scrambeled up. image the year gets ignored. The folder name (Season202207) is the part that is important and S07E01 need to match. image So if Season would just increment from 01 to whatever and same for Episode while 1 Season is running. That is what would be needed for it to work.

MrBrax commented 2 years ago

yes, year will never matter on an episode basis if there's a season/episode naming scheme. it's one or the other really.

Serph91P commented 2 years ago

yes, year will never matter on an episode basis if there's a season/episode naming scheme. it's one or the other really.

So it would need to:

2022

2023

MrBrax commented 2 years ago

yes and that would create a different show entry in plex for every streamer+year. technically possible to have template based channel folders but they're very hardcoded right now

Serph91P commented 2 years ago

yes and that would create a different show entry in plex for every streamer+year. technically possible to have template based channel folders but they're very hardcoded right now

You think? because I have atm one Season with 2022 and one with Season2023 and it ignores it completely the only thing that seems to matter is the Season. Sorry dont quite get what you mean. image image

MrBrax commented 2 years ago

the only thing that will matter with the years is if you make folders like "gronkh (2022)" and "gronkh (2023)" and place the respective years into those