Jump to content
GoHuskies

How to remove duplicate Movie Genre

Recommended Posts

GoHuskies

I have two genres listed for comedy - "Comedy" and "comedy", and they contain the same movies. I've checked the genres for several of the movies in the "comedy" genre and in every case the genre is shown as "Comedy" with a capital "C". Any suggestions for how to eliminate the extraneous "comedy" genre?

 

Screen shot is attached. Thanks!

post-8433-0-12032600-1511627203_thumb.jpg

Share this post


Link to post
Share on other sites
Luke

Hi, this can be tricky but there's got to be a movie with the lowercase value

Share this post


Link to post
Share on other sites
Happy2Play

Haven't seen this reported in awhile.  If you have no media with a lowercase genre it then becomes a database issue and you either need to rebuild your database or use a database tool to edit the current database.

Share this post


Link to post
Share on other sites
PenkethBoy

and check the metadata that may be contained in the video file

Share this post


Link to post
Share on other sites
GoHuskies

I've searched the file contents for everything in my movies folder and come up empty. Every instance of "Comedy" (for the genre tags) in the movie.xml and .nfo files is upper-case.

 

Two questions - where is Emby actually pulling the genre info? PenkethBoy mentioned metadata for the video file, but I thought it was just pulling from the .nfo file (or maybe the movie.xml file). Second, how would I rebuild the database, as Happy2Play mentioned?

 

Thanks!

Share this post


Link to post
Share on other sites
nomatches4mikey

I had this show up after using the Genre Cleaner, it may be related to how it changes the genre data.

Share this post


Link to post
Share on other sites
GoHuskies

Hi, trying again to get rid of this duplicate "comedy" genre. I'm certain it's not due to a lowercase "comedy" genre tag in an nfo file, here's why - I moved all my movie folders to another location except for one comedy, re-scanned my library and confirmed the "comedy" genre (the duplicate) was still showing. I then moved that movie folder to another location, copied back a different comedy, re-scanned my library and still see the duplicate "comedy" genre. I looked at the genres for both test movies and both show uppercase "Comedy", not lowercase "comedy". Any ideas for what to try next?

 

Thanks!

Share this post


Link to post
Share on other sites
PenkethBoy

Emby does not delete genres even when no existing movie etc uses it - you need to delete it directly from the DB - i did this recently when cleaning up a few other loose ends - had about 25 unused genre entries

 

as for where the lower case came from - have you checked (as i suggested in November) all you media files for metadata e.g. mp3tag reads MP4 and MKV files besides mp3 - emby will pull data from the files themselves and genre is one of the few currently supported

Share this post


Link to post
Share on other sites
Luke

Emby does not delete genres even when no existing movie etc uses it - you need to delete it directly from the DB - i did this recently when cleaning up a few other loose ends - had about 25 unused genre entries

 

This isn't true. You don't need to do this.

Share this post


Link to post
Share on other sites
GoHuskies

Luke, can you give me an idea of what to try next? Is Emby looking for genre data in places other than just the .nfo files?

 

Thanks!

Share this post


Link to post
Share on other sites
GoHuskies

This issue has been resolved. As PenkethBoy suggested, I removed a record in library.db and that eliminated the duplicate genre (lowercase "comedy"). For anyone having the same issue, here are the details of what I did:

  • Before editing the library.db file, I saved a copy, just in case.
  • I used a database application (DbVisualizer, since I use it at work and am familiar with it) to open the library.db file. It's located in C:\Users\[username]\AppData\Roaming\Emby-Server\data\library.db. Note - Emby Server has to be stopped in order to edit library.db.
  • I queried the TypedBaseItems table to find the incorrect record. In my case, there was a record of type 'MediaBrowser.Controller.Entities.Genre' with a Name of 'comedy' (note the lowercase; the valid records had a Name of 'Comedy', uppercase). The Path for this record was "C:\Users\HTPC\AppData\Roaming\Emby-Server\metadata\Genre\comedy", which no longer existed on my system.
  • I then deleted this invalid record.
  • I restarted Emby Server and scanned my library. Once that was done the incorrect genre was gone.

Hope this helps.

Share this post


Link to post
Share on other sites
PenkethBoy

great that it worked for you :)

 

those type of "orphaned" entries are what i removed from my db

 

from a bit of testing the newer version (.60) of the server is better at keeping things in check

 

i suspect the entries we have had to delete were created with an older version of the server which did not have the new checks in place

Share this post


Link to post
Share on other sites
Luke

i suspect the entries we have had to delete were created with an older version of the server which did not have the new checks in place

 

I think this is correct, yes.

Share this post


Link to post
Share on other sites
dcol

I have this problem also, but I do not have a db editor, nor should I need one.

Share this post


Link to post
Share on other sites
Happy2Play

I have this problem also, but I do not have a db editor, nor should I need one.

 

So are you saying you see this on a NEW install?  How old is your server installation?

Share this post


Link to post
Share on other sites
dcol

So are you saying you see this on a NEW install? How old is your server installation?

Yes. 2 weeks

Share this post


Link to post
Share on other sites
Happy2Play

And did you find the metadata that was causing the issue?

Share this post


Link to post
Share on other sites
Happy2Play

@@dcol

 

I can't even add media with lowercase genre to reproduce this issue.  Only uppercase Genre is displayed on genre tab while lower case link in item exist.  So you may need to provide move information of your issue.

 

Windows v3.5.3.0

Share this post


Link to post
Share on other sites
dcol

Here is an example of what I have in the Genre listing.

Metadata was from the MovieDB, not me. Don't see a field for Genre in the Edit Metadata screen

5bd7218f3579d_Genre1.jpg

Edited by dcol

Share this post


Link to post
Share on other sites
Luke

did you explore the entire edit metadata screen?

Share this post


Link to post
Share on other sites
dcol

Yes, It shows what genre categories are assigned to the movie. I looked all all the metadata under the 'Science fiction' section and there were no duplicates and none had 'Science fiction' they were all 'Science Fiction'.

 

How do I get rid of this extra category? Or for that matter, how do I edit the genre categories to display only the ones I want.

Share this post


Link to post
Share on other sites
dcol

Bump... How do I get rid of this duplicate?

Do I really need to learn how to use a DB editor? If so, which one is recommended that's free.

Edited by dcol

Share this post


Link to post
Share on other sites
Happy2Play

Don't know how to reproduce this.  You currently have two options, do the manual edit or delete your entire database and start over. 

 

I use SQLiteDatabaseBrowserPortable.

Share this post


Link to post
Share on other sites
Luke

I don't believe this situation will happen anymore starting with the next release of the server, although it may not correct duplicates created by older versions. thanks.

Share this post


Link to post
Share on other sites
Gilgamesh_48

I use a plugin called "Genre Cleaner" to clean up my genres. With that I map things that, for me, are redundant like all the various "Audiobook" genres to just "AudioBooks."

 

That may or may not be the solution for others but it does do what I need.

Share this post


Link to post
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...