Jump to content

Auto-Organize issues


pmac

Recommended Posts

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

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

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

rbjtech

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 by rbjtech
Link to comment
Share on other sites

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

pmac

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 by pmac
Link to comment
Share on other sites

pmac

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

You would have to just delete them from the db rather than changing their values.

Link to comment
Share on other sites

pmac

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

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

pmac

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...