Kodi Community Forum
Looking for help on how to rename files based on existing Metadata - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116)
+--- Thread: Looking for help on how to rename files based on existing Metadata (/showthread.php?tid=345164)



Looking for help on how to rename files based on existing Metadata - kaadk - 2019-07-04

I've been searching around for a while, but I haven't found what I'm looking for so now I'm turning to the forums for help.

First off, let me provide a little background on my use case.  I currently manage all of the family's content in iTunes (running on a iMac on MacOS Mojave).  We have an extensive collection of TV series on DVD that I've been slowly ripping and importing to iTunes, with iTunes managing my library, so that it all is stored on a 4TB external drive.  This allows us to use Home Sharing to watch our collection on a couple of Apple TVs and our various other apple devices laying around.  Within the last year we picked up a couple of Roku TVs to add to the mix, and I've got Plex Media Server running on the Mac, pointing to our 4TB iTunes library that is serving up the ripped shows to those devices (and leveraging .plexignore to block the purchased iTunes content).  

We also have an RV, and do a lot of camping.  For those camping trips, we usually bring along a few movies on dvd, but usually bring a limited selection to save space.  With all this work I've done ripping our TV show collection, I was searching for a way to possibly bring our collection along with us.  I was recently given an old no-name Android TV box that somebody had replaced with a newer model for their Netflix needs, and since it had Kodi pre-installed (V17.6?) and I had a little used 250 GB external drive I could free up it seemed like the perfect fit.  I could grab a few folders of TV shows from the iTunes drive, copy them to the 250 GB drive, connect that to the Android TV box and I'd be able to watch our shows on the road using Kodi.

And this is where I hit my first snag.  Kodi doesn't like the way iTunes stores their TV shows.  iTunes appears to embed all the episode, etc information inside the m4v file and externally only stores it as TV Show/Show Name/Season #/Episode Name.m4v.  Plex had no problem with that, and ordered everything correctly, and I had incorrectly assumed Kodi would be able to as well.  Ok, well, I've done my research and now know that's not the case.  For Kodi, the files need to be named a certain way, using a S01E01 nomenclature.  Ok, not a problem, I just need to rename my files after I copy them over.  This was my second snag.  That 250 GB drive has about 500 files on it.  It's going to take forever to rename that many files.  Not to mention, I was hoping to make this simple to swap out different TV series between camping trips easily when needed.  

So, back to the net and more research, trying to find some kind of automated solution.  This is where I've struck out and now I'm turning to the community for help.  It seems that pretty much every auto-renaming app out there is a "Match to some DB, and update both Metadata and Name based on that match" type of software.  I don't want to match to some DB, and I don't want to alter the Metadata.  I've done a lot of curating as I import a TV show and switching up episodes to match the appropriate chronological order, vs either air date or DVD order.  Sliders, for instance, was all over the board and had to be adjusted so that the show order made sense.  I like my shows exactly as I've set them up.  What I want is to be able to rename my files to match the Kodi recommended format based on the Metadata already existing inside the m4v file.

Does anybody know of any tool, utility, or scripting language that can support this?  

Thanks for any help you can provide.


RE: Looking for help on how to rename files based on existing Metadata - Karellen - 2019-07-04

I'll let others recommend a tool for what you want.

But, there is a little hidden feature that is currently experimental (and currently unsupported) that allows reading of Video File Tags. Enable setting 1.2 here... https://kodi.wiki/view/Settings/Media/Videos#All

Try scraping your library now. Be prepared that it may work, or it may make a mess and you may have to rebuild the library again, but it sounds like nothing is in the library so probably not a big issue at this stage.


RE: Looking for help on how to rename files based on existing Metadata - chrissix666 - 2019-07-05

Think Filebot is the most know mini Tool for renaming Episodes in a batch. It's accessing directly TVDB API and rename also in your language you choose.
I've been using Filebot since then and it works great. Due to the great success Filebot has been changed platform from x86 installer to Windows app,
is only exclusive aviable for a donation in the Windows Store as a Windows app.
But it still buzzing free real x86 installer versions (not a Windows app) on the Internet out there.


For example i use in Filebot for renaming Episodes a common convention: "TvShowname - S01E01 - Episodename.ext", but there are more possibilities allowed and you can edit the renaming behave settings in Filebot yourself
___
For naming TvShow folder naming itself it's still the simplest do this manual, but name always the equal name of TVDB (you can shoose language) -> https://www.thetvdb.com/
___
For Movie folder/file naming it's also simplest do this manual, but name always equal TMDB title+year in brackets (you can choose language) -> https://www.themoviedb.org/
Moviefoldername = Moviename (Year).ext
Moviefilename.ext = Moviename (Year).ext
___
Read also naming conventions:
TvShows: https://kodi.wiki/view/Naming_video_files/TV_shows
Movies: https://kodi.wiki/view/Naming_video_files/Movies
___
There exist also a lot of MediaManagers out there, some MediaManagers can rename all your stuff automated.
But then you have to use the kodi NFO scraper (Local Information Only), and the MediaManager will create a .nfo file nearby all your stuff (Movies/TvShows/Episodes)
Using MediaManagers is more the advanced nerdist way...


RE: Looking for help on how to rename files based on existing Metadata - kaadk - 2019-07-05

(2019-07-04, 23:08)Karellen Wrote: I'll let others recommend a tool for what you want.

But, there is a little hidden feature that is currently experimental (and currently unsupported) that allows reading of Video File Tags. Enable setting 1.2 here... https://kodi.wiki/view/Settings/Media/Videos#All

Try scraping your library now. Be prepared that it may work, or it may make a mess and you may have to rebuild the library again, but it sounds like nothing is in the library so probably not a big issue at this stage.

Thanks, I just checked and the similar setting in 17.6 seems to have already been on: "Extract thumbnails and video information".  But that didn't help with scraping at all, it still only matches if I manually update the file names to include the S01E01 syntax.  I don't know if it's improved in the latest release, but since I don't own this box (it's on loan to see if this approach works for us, at which point I'd go buy my own) I'm a little reluctant to update the app.  I may have to contact the owner to see if they'd mind.


RE: Looking for help on how to rename files based on existing Metadata - kaadk - 2019-07-05

(2019-07-05, 07:05)chrissix Wrote: Think Filebot is the most know mini Tool for renaming Episodes in a batch. It's accessing directly TVDB API and rename also in your language you choose.
I've been using Filebot since then and it works great. Due to the great success Filebot has been changed platform from x86 installer to Windows app,
is only exclusive aviable for a donation in the Windows Store as a Windows app.
But it still buzzing free real x86 installer versions (not a Windows app) on the Internet out there.


For example i use in Filebot for renaming Episodes a common convention: "TvShowname - S01E01 - Episodename.ext", but there are more possibilities allowed and you can edit the renaming behave settings in Filebot yourself
___
For naming TvShow folder naming itself it's still the simplest do this manual, but name always the equal name of TVDB (you can shoose language) -> https://www.thetvdb.com/
___
For Movie folder/file naming it's also simplest do this manual, but name always equal TMDB title+year in brackets (you can choose language) -> https://www.themoviedb.org/
Moviefoldername = Moviename (Year).ext
Moviefilename.ext = Moviename (Year).ext
___
Read also naming conventions:
TvShows: https://kodi.wiki/view/Naming_video_files/TV_shows
Movies: https://kodi.wiki/view/Naming_video_files/Movies
___
There exist also a lot of MediaManagers out there, some MediaManagers can rename all your stuff automated.
But then you have to use the kodi NFO scraper (Local Information Only), and the MediaManager will create a .nfo file nearby all your stuff (Movies/TvShows/Episodes)
Using MediaManagers is more the advanced nerdist way...

Thanks, I had looked at Filebot as well, but like the other media managers out there, it seems to want to be driven by things like TVDB.  I fully get why these types of managers exist, most people want this kind of functionality, to save themselves having to curate their own metadata.  But having already done my own curating, I was really hoping to avoid having to rely on DB based renaming.  Lacking other options, I may have to look at them again.


RE: Looking for help on how to rename files based on existing Metadata - Karellen - 2019-07-05

(2019-07-05, 14:45)kaadk Wrote: Thanks, I just checked and the similar setting in 17.6 seems to have already been on: "Extract thumbnails and video information".
No, that is not what I was referring to. It is not in v17 and was introduced in v18. Read my post again.