Jump to content


Photo

How to remove duplicate Movie Genre

genre duplicate

  • Please log in to reply
34 replies to this topic

#1 GoHuskies OFFLINE  

GoHuskies

    Newbie

  • Members
  • 7 posts
  • Local time: 08:24 AM

Posted 25 November 2017 - 12:26 PM

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!

Attached Files



#2 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139743 posts
  • Local time: 08:24 AM

Posted 25 November 2017 - 12:54 PM

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

#3 Happy2Play OFFLINE  

Happy2Play

    Trial and Error

  • Moderators
  • 16056 posts
  • Local time: 05:24 AM
  • LocationWashington State

Posted 25 November 2017 - 06:10 PM

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.



#4 PenkethBoy ONLINE  

PenkethBoy

    Advanced Member

  • Members
  • 3408 posts
  • Local time: 01:24 PM
  • LocationWarrington,UK

Posted 25 November 2017 - 11:05 PM

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



#5 GoHuskies OFFLINE  

GoHuskies

    Newbie

  • Members
  • 7 posts
  • Local time: 08:24 AM

Posted 26 November 2017 - 07:15 PM

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!



#6 nomatches4mikey OFFLINE  

nomatches4mikey

    Member

  • Members
  • 17 posts
  • Local time: 01:24 PM

Posted 02 December 2017 - 07:29 PM

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



#7 GoHuskies OFFLINE  

GoHuskies

    Newbie

  • Members
  • 7 posts
  • Local time: 08:24 AM

Posted 13 January 2018 - 01:42 AM

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!



#8 PenkethBoy ONLINE  

PenkethBoy

    Advanced Member

  • Members
  • 3408 posts
  • Local time: 01:24 PM
  • LocationWarrington,UK

Posted 13 January 2018 - 04:51 AM

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



#9 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139743 posts
  • Local time: 08:24 AM

Posted 13 January 2018 - 05:44 PM

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.



#10 GoHuskies OFFLINE  

GoHuskies

    Newbie

  • Members
  • 7 posts
  • Local time: 08:24 AM

Posted 13 January 2018 - 06:23 PM

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!

#11 GoHuskies OFFLINE  

GoHuskies

    Newbie

  • Members
  • 7 posts
  • Local time: 08:24 AM

Posted 18 January 2018 - 12:50 AM

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.



#12 PenkethBoy ONLINE  

PenkethBoy

    Advanced Member

  • Members
  • 3408 posts
  • Local time: 01:24 PM
  • LocationWarrington,UK

Posted 18 January 2018 - 08:14 AM

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



#13 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139743 posts
  • Local time: 08:24 AM

Posted 18 January 2018 - 02:35 PM

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.



#14 dcol OFFLINE  

dcol

    Advanced Member

  • Members
  • 1074 posts
  • Local time: 06:24 AM
  • LocationTucson, Arizona

Posted 28 October 2018 - 07:33 PM

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



#15 Happy2Play OFFLINE  

Happy2Play

    Trial and Error

  • Moderators
  • 16056 posts
  • Local time: 05:24 AM
  • LocationWashington State

Posted 28 October 2018 - 07:59 PM

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?



#16 dcol OFFLINE  

dcol

    Advanced Member

  • Members
  • 1074 posts
  • Local time: 06:24 AM
  • LocationTucson, Arizona

Posted 28 October 2018 - 08:08 PM

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

Yes. 2 weeks

#17 Happy2Play OFFLINE  

Happy2Play

    Trial and Error

  • Moderators
  • 16056 posts
  • Local time: 05:24 AM
  • LocationWashington State

Posted 28 October 2018 - 08:10 PM

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



#18 Happy2Play OFFLINE  

Happy2Play

    Trial and Error

  • Moderators
  • 16056 posts
  • Local time: 05:24 AM
  • LocationWashington State

Posted 28 October 2018 - 08:23 PM

@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



#19 dcol OFFLINE  

dcol

    Advanced Member

  • Members
  • 1074 posts
  • Local time: 06:24 AM
  • LocationTucson, Arizona

Posted 29 October 2018 - 11:05 AM

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, 29 October 2018 - 11:10 AM.


#20 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139743 posts
  • Local time: 08:24 AM

Posted 29 October 2018 - 11:12 AM

did you explore the entire edit metadata screen?







Also tagged with one or more of these keywords: genre, duplicate

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users