CharleyVarrick 283 Posted February 13, 2021 Posted February 13, 2021 In my movie library, I sometime spot a discrepancy between my file name (yyyy) and Emby movie name (yyyy). Here's an example: I fully realize this is not Emby's fault, but tmdb's users modifying their db at any point in time. Is there a way to get a report listing all at once a list of movies that show different release year in folder and/or file name vs library year. I'd sure like that, as sometimes, this will cause movie identification mistake.
Happy2Play 9780 Posted February 13, 2021 Posted February 13, 2021 5 minutes ago, jlr19 said: I'd sure like that, as sometimes, this will cause movie identification mistake. Not that I know of but that is why there is a year tolerance on TMDB. As country release date affects TMDB. From TMDB bible the theatrical supersedes the premiere. Release Dates - Movie Bible — The Movie Database (TMDb) (themoviedb.org) Passion Play (2011) - Release Dates — The Movie Database (TMDb) (themoviedb.org) I guess you could export a report and compare year to filename in path.
CharleyVarrick 283 Posted February 13, 2021 Author Posted February 13, 2021 (edited) From my experience, I do agree a single year difference rarely causes id error (but I'd still like to know and fix it). But a 2 or 3 year difference will very likely cause id error ( those I need to know about). My library being quite "substantial" produces a mile and a half-long report. In another life, I used PLEX and by itself, it would highlight ambiguous folder/file name to library ("This needs some attention..." or something to that effect) Edited February 13, 2021 by jlr19
Carlo 4561 Posted February 13, 2021 Posted February 13, 2021 If you wouldn't mind running this offline (would be quick) or against a copy of your library.db file, I can throw together some SQL to do this for you. Your folder and file name would need to be identical (except the dot extension on file name).
Carlo 4561 Posted February 13, 2021 Posted February 13, 2021 (edited) If you have a SQL editor you could start with this: select Path, Name, ProductionYear from MediaItems where Type=5 and not instr(Path, ProductionYear) that only checks the year. If you want precision and want both the name and year to match select Path, Name, ProductionYear from MediaItems where Type=5 and not instr(lower(Path), lower(ProductionYear)) and not instr(lower(Path), lower(Name)) If you don't know how to run SQL and are on Windows I could set this up to run from a batch file and create a text file with the info. On my system with over 23K: Second Query: Execution finished without errors. Result: 509 rows returned in 708ms Edited February 13, 2021 by cayars
CharleyVarrick 283 Posted February 13, 2021 Author Posted February 13, 2021 (edited) 17 minutes ago, cayars said: If you have a SQL editor you could start with this: select Path, Name, ProductionYear from MediaItems where Type=5 and not instr(Path, ProductionYear) that only checks the year. If you want precision and want both the name and year to match select Path, Name, ProductionYear from MediaItems where Type=5 and not instr(lower(Path), lower(ProductionYear)) and not instr(lower(Path), lower(Name)) If you don't know how to run SQL and are on Windows I could set this up to run from a batch file and create a text file with the info. On my system with over 23K: Second Query: Execution finished without errors. Result: 509 rows returned in 708ms I dont have SQL and dont know how to use it (read: i'm scared stiff hosing Emby). But I'm intrigued how could you set it up for me. I would like also titles to be compared (tmdb users sometimes change title back n forth). (And yes, my Emby runs on win10) Edited February 13, 2021 by jlr19
CharleyVarrick 283 Posted February 13, 2021 Author Posted February 13, 2021 56 minutes ago, cayars said: Your folder and file name would need to be identical (except the dot extension on file name). I believe they are identical 99.9% (15k)
Solution Carlo 4561 Posted February 13, 2021 Solution Posted February 13, 2021 This is READ ONLY and would not change anything so no chance of messing this up. I could set this up for you remotely in about 3 minutes and show you how to run it if you like. Send me a PM if you want to do this. Otherwise I could set this up to run for you from a batch file (point and click) with a few files in a zip file. 1
CharleyVarrick 283 Posted February 13, 2021 Author Posted February 13, 2021 3 minutes ago, cayars said: This is READ ONLY and would not change anything so no chance of messing this up. Great, as I'd rather edit file name myself, PM incoming.
nmkaufman 50 Posted February 13, 2021 Posted February 13, 2021 (edited) If you save the TMDb/TVDB/IMDB id in your folder names, Emby will use them for identification. I started using IMDB for movies, and TVDB for TV and can't remember having a single misidentification since. Example Movie (2020) [imdbid=tt000000000] Example Show [tvdbid=0000000] This also completely solves the issue of multiple movies with the same title/year. Edited February 13, 2021 by nmkaufman 2
Carlo 4561 Posted February 13, 2021 Posted February 13, 2021 I remoted in and helped him setup a few scripts like finding dupes as well as a couple of scripts to do exactly what's requested all ran from a couple of batch files to make things easy. 1 1
CharleyVarrick 283 Posted February 13, 2021 Author Posted February 13, 2021 I am sure a few years ago, Emby showed a circled 2 on dupe movie while browsing library? When within a same movie folder you had movie.avi and movie.mp4 for example.
GrimReaper 4740 Posted February 13, 2021 Posted February 13, 2021 Just now, jlr19 said: I am sure a few years ago, Emby showed a circled 2 on dupe movie while browsing library? When within a same movie folder you had movie.avi and movie.mp4 for example. Or episodes. Ain't it still so?
Carlo 4561 Posted February 13, 2021 Posted February 13, 2021 4 minutes ago, jlr19 said: I am sure a few years ago, Emby showed a circled 2 on dupe movie while browsing library? When within a same movie folder you had movie.avi and movie.mp4 for example. You might be thinking of the orange server. 1
CharleyVarrick 283 Posted February 13, 2021 Author Posted February 13, 2021 1 minute ago, GrimReaper76 said: Or episodes. Ain't it still so? Unsure about tv, but I think Cayars just might be right about the other guys.
CharleyVarrick 283 Posted February 13, 2021 Author Posted February 13, 2021 (edited) I'm almost done fixing dupes, I have just a few left I'm unsure how to fix. They're all the same type, all bonus content from dvd#2 So in movie folder I have movie part1.mp4 and a sub folder for dvd 2 When possible, I run those VIDEO_TS thru Handbrake to convert to mp4, but sometime It just gives a fair bunch of short clips, but no main file. I've read on emby naming convention (multi parts) it wont work if part 1 and 2 are not within the same folder, so how do you guys handle those? Edited February 13, 2021 by jlr19
Luke 42078 Posted February 13, 2021 Posted February 13, 2021 Merge them in the web interface or move them to the same folder. 1
Carlo 4561 Posted February 13, 2021 Posted February 13, 2021 Here's the way it looks on my system. I've combined discs so I have one file vs two. I've also rip some of the extra stuff on disc and make videos of them as well but they go in the extras folder. You can merge multiple files via ffmpeg or if you want a gui that's decent use avidemux (open 1st file, append 2nd file, save). 2
Happy2Play 9780 Posted February 13, 2021 Posted February 13, 2021 5 hours ago, cayars said: If you have a SQL editor you could start with this: select Path, Name, ProductionYear from MediaItems where Type=5 and not instr(Path, ProductionYear) that only checks the year. If you want precision and want both the name and year to match select Path, Name, ProductionYear from MediaItems where Type=5 and not instr(lower(Path), lower(ProductionYear)) and not instr(lower(Path), lower(Name)) If you don't know how to run SQL and are on Windows I could set this up to run from a batch file and create a text file with the info. On my system with over 23K: Second Query: Execution finished without errors. Result: 509 rows returned in 708ms Things like this would good to have in a how to kb or in tools and utilities section. 1
CharleyVarrick 283 Posted February 13, 2021 Author Posted February 13, 2021 (edited) 3 hours ago, cayars said: Here's the way it looks on my system. I've combined discs so I have one file vs two. I've also rip some of the extra stuff on disc and make videos of them as well but they go in the extras folder. You can merge multiple files via ffmpeg or if you want a gui that's decent use avidemux (open 1st file, append 2nd file, save). I am familiar with avidemux, but as you certainly know already, it will only append files of identical resolution. Some of those have resolutions all over the place. For the extras folder, could i just create it and throw the VIDEO_TS folder in there, or do I absolutely need to "handbrake-it" into all those small clips ? EDIT: VIDEO_TS folder moved to extras folder doesn't work. (still shows up as a different movie instead of a part 2) Edited February 13, 2021 by jlr19
CharleyVarrick 283 Posted February 13, 2021 Author Posted February 13, 2021 14 minutes ago, Happy2Play said: Things like this would good to have in a how to kb or in tools and utilities section. +1 to that
nmkaufman 50 Posted February 13, 2021 Posted February 13, 2021 (edited) 5 minutes ago, jlr19 said: Some of those have resolutions all over the place. If these files all came from the same DVD, handbrake's auto-cropping feature is likely to blame. It's turned on, by default, on all of the built-in profiles. Save a custom profile with the cropping turned off, and use this when you know you're going to be combining the files afterwards. Edited February 13, 2021 by nmkaufman 1
CharleyVarrick 283 Posted February 13, 2021 Author Posted February 13, 2021 9 minutes ago, nmkaufman said: If these files all came from the same DVD, handbrake's auto-cropping feature is likely to blame. It's turned on, by default, on all of the built-in profiles. Save a custom profile with the cropping turned off, and use this when you know you're going to be combining the files afterwards. Good tip ! I've used Handbrake for some time, but I always left default settings. I use it mostly for those pesky dvd and bluray. Its also very useful to easily split a whole music concert (when chapters are present, that is) into individuals music videos.
CharleyVarrick 283 Posted February 13, 2021 Author Posted February 13, 2021 1 hour ago, Luke said: Merge them in the web interface or move them to the same folder. Interesting, I need more detailed instruction about Merge, is there a wiki or something about that that I could read about?
Carlo 4561 Posted February 13, 2021 Posted February 13, 2021 1 hour ago, Happy2Play said: Things like this would good to have in a how to kb or in tools and utilities section. But then I don't look cool, giving a solution. LOL Kidding aside, yes, good point. I can put together some scripts that can do things like this for the tools/utils section that can find movie dupes, change trailers to higher resolution, vacuum, etc in a new thread. I've also got a cool way to run things from a batch file (for windows users) that runs scripts and dumps results to text files so they run quickly and allow you to later view the info. 3
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now