pmac 132 Posted February 28, 2019 Share Posted February 28, 2019 I'm having issues with Auto-Organize with a couple of different TV shows; one that gives me the most issues seems to be "The Magicians (US)". I've tried different naming conventions for it's folder structure, everything from "../The Magicians/" to "../The Magicians (US)/", as well as "../The Magicians (2015)/" in my "../Television/" folder, but Auto-Organize never seems to recognize it when it comes time to organize it. So I've enabled smart matches, and manually selected the title of the show with the search function within the Emby config, but after doing that, instead of moving the file to the "../The Magicians (2015)/" folder, it creates a new folder and moves it to "../The Magicians (2015) (2015)/". Now when I try to identify the series within the Auto-Organize config menu, in the dropdown list I have 3 copies of "The Magicians (2015)" in a row, but I only have one physical folder (the one I'd like the series to auto-organize to). Is there a way to refresh or clear the list to get rid of the duplicates? I've had the same issue with another couple shows as well, I believe "The Office" was one of them (since there are 3 different shows Emby finds with the same name (US version, Canadian version and British version)); I tried auto-organizing it, but eventually ended up manually organizing it, since Emby just couldn't figure it out, and was doing the same thing that is happening with "The Magicians". Any ideas of how I could clear up Auto-Organize's confusion? I think if I can clear the list of previously attempted organizations, I could just choose the correct one once, and it would be fine, but there's no way to clear the duplicates from the list that I can find. And yes, I have deleted the smart match for that show, since it was creating the wrong folder. Thanks, Patrick Link to comment Share on other sites More sharing options...
Luke 37254 Posted February 28, 2019 Share Posted February 28, 2019 The duplicates shouldn't happen anymore for new series but existing ones can only be cleaned by either deleting your entire library database, or editing the DB to delete those rows from the table. Link to comment Share on other sites More sharing options...
pmac 132 Posted February 28, 2019 Author Share Posted February 28, 2019 The duplicates shouldn't happen anymore for new series but existing ones can only be cleaned by either deleting your entire library database, or editing the DB to delete those rows from the table. Where might I find the database file to edit in order to remove those rows? And should I just remove all rows for that show, and let it identify it as a new show on it's own when it finds the next episode? or just leave one row for it in the DB? Link to comment Share on other sites More sharing options...
rbjtech 4333 Posted February 28, 2019 Share Posted February 28, 2019 (edited) The best way is to go to thetvdb.com or imdb and find the show yourself (if it's getting confused or there are multiple versions) then get its reference and use 'Identify' in Emby, paste in the number(s) below and it will know what metadata to grab. After a rescan, the old incorrectly identified shows will be removed. IMDB = tt4254242 or thetvdb = 299139 in your case - identified from here - https://www.thetvdb.com/series/the-magicians-2015 Edited February 28, 2019 by rbjtech Link to comment Share on other sites More sharing options...
Luke 37254 Posted February 28, 2019 Share Posted February 28, 2019 Where might I find the database file to edit in order to remove those rows? And should I just remove all rows for that show, and let it identify it as a new show on it's own when it finds the next episode? or just leave one row for it in the DB? library.db file, MediaItems table. This is not officially supported so make sure to back it up first. Thanks. Link to comment Share on other sites More sharing options...
pmac 132 Posted March 1, 2019 Author Share Posted March 1, 2019 (edited) library.db file, MediaItems table. This is not officially supported so make sure to back it up first. Thanks. I've made a backup of my library.db, but I'm not familiar with SQlite; when I try and delete the rows containing the duplicate series, I get "Error deleting record: FOREIGN KEY constraint failed". I've found the two rows I'd like to remove, but I'm not sure how to get around this error. EDIT: Changing the values in those rows to NULL seemed to fix the issue for me. I no longer have duplicates in the auto-organize series list. Thanks! Edited March 1, 2019 by pmac Link to comment Share on other sites More sharing options...
Luke 37254 Posted March 1, 2019 Share Posted March 1, 2019 Thanks for the feedback. Link to comment Share on other sites More sharing options...
pmac 132 Posted March 1, 2019 Author Share Posted March 1, 2019 Thanks for the feedback. Looks like I spoke too soon; changing the values to NULL rather than deleting the rows (I couldn't figure out how to remove rows without getting an error) seems to have broken Auto-Organize for anything that doesn't have a smart match. All of my other shows failed to organize with an error saying the value can't be null, so I've reverted to my backup library.db. Is there any other way I could remove those duplicates without breaking anything? If I delete the library.db and do a full scan, will I still retain all of my watched states and other important data? or is there another way I should be doing this? Having these duplicates is very frustrating (mainly for my wife, who can't watch her show when she wants to unless I manually sort it), so I'm really hoping there's a fix for this. Link to comment Share on other sites More sharing options...
Luke 37254 Posted March 1, 2019 Share Posted March 1, 2019 You would have to just delete them from the db rather than changing their values. Link to comment Share on other sites More sharing options...
pmac 132 Posted March 1, 2019 Author Share Posted March 1, 2019 You would have to just delete them from the db rather than changing their values. For some reason I was getting an error ( "Error deleting record: FOREIGN KEY constraint failed") when I tried deleting rows. I don't really know SQL, so it's likely something simple I just don't understand. I'm using DB Browser for SQlite. Link to comment Share on other sites More sharing options...
Luke 37254 Posted March 1, 2019 Share Posted March 1, 2019 Oh yes that's right. Other rows from other tables referencing the Id column will have to be deleted first. That means this is not going to be easy, sorry. Link to comment Share on other sites More sharing options...
pmac 132 Posted March 1, 2019 Author Share Posted March 1, 2019 Oh yes that's right. Other rows from other tables referencing the Id column will have to be deleted first. That means this is not going to be easy, sorry. No worries, I'll just play around with it and hopefully I'll eventually figure it out lol Link to comment Share on other sites More sharing options...
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