Jump to content
khodges747

Two genres for the price of one

Recommended Posts

khodges747

Hi guys,

I'm not a huge fan of the new way Emby Theater treats genres views, but I can live with it.

 

On my system it has a weird problem though, which I assume is a Server problem not a Theater problem: for 2 genres, namely Comedy and Western, there is a 2nd genre called comedy and western (with lower case "c" and "w"). The metadata directory for genres only shows Comedy and Western, but the artwork in those directories is used for the lower case genres and no artwork shows for the upper case ones. None of my films have the genre with a lower case c or w, according to the GenreCleaner plugin. All the other genres, including my custom genres, show up normally.

 

How do I combine Comedy and comedy?

 

 

post-1660-0-16517000-1489248698_thumb.png

 

Share this post


Link to post
Share on other sites
ebr

How do I combine Comedy and comedy?

 

It would need to be fixed at the source.  Meaning look at the items showing in the lower case one and edit their genres to be the upper case.

 

This is a little tricky just because some file systems preserve case so we can't just assume everything regardless of case is the same.

 

Genre Cleaner could probably fix this for you as well.

Share this post


Link to post
Share on other sites
khodges747

Thanks for the reply, but the problem is more pernicious than that.

 

When I click on the genre comedy I see exactly the same movies that I see when I click on Comedy.

 

I used westerns as a testbed because I have fewer western movies than comedies so it's quicker to verify things. I checked the genre with the metadata manager, and every one of my Western movies has the genre Western; none has the genre western.

 

I changed one movie from Western to western. It still shows up in both views (with genre western) after a library scan. 

 

Genre Cleaner only shows Western as a genre, not western.

 

BTW, the same problem exists in my TV shows, but I never sort them by genre so I don't care. But it's exactly the same problem for C/comedy, W/westerns, and S/sports.

Share this post


Link to post
Share on other sites
Luke

Ebr is still right though.

Share this post


Link to post
Share on other sites
khodges747

Maybe you're both right, but I don't understand and I don't know how to fix the problem. My questions:

1. Why can I not find a movie with a lowercase genre?

2. Why do all movies of a genre show up in both lowercase and uppercase views?

3. Genre Cleaner doesn't identify a lowercase genre?

4. Why does this only happen in Comedy and Westerns, not in any other genre, even those where I have many more movies and the likelihood of an error (lowercase d in Drama, for example) is higher?

5. Why did this not happen in older versions of Emby, including all the way back to MB2? Even in Theater 2.5.38 from last week the genre view only showed Comedy and Westerns and not the lowercase versions.

 

This is obviously not a major problem. I can live with 2 genres for the price of one, but I don't agree that it is a problem in the metadata.

Share this post


Link to post
Share on other sites
ebr

All of your questions above can be answered by the explanation I gave - some portion of the metadata has the lower case data. These views are built from the bottom up - meaning, we look at the source data and group the items accordingly as opposed to the other way around.

 

The reason you may not be able to tell in the metadata manager may be due to display logic within it (I'm not sure).  Try looking at the source data (.nfo files) for some of those items and see if you can find the lower case genres.

Share this post


Link to post
Share on other sites
khodges747

I understand how the view is built. Which means it is totally illogical for the same movie to be in the view Comedy and at the same time in the view comedy, when in the metadata all that can be seen is the genre Comedy for that movie.

Share this post


Link to post
Share on other sites
khodges747

I just discovered a much easier test case.

 

In my TV shows I have the same problem with the genres C/comedy and W/western. But I only have 3 TV shows in Western. All 3 show up in the genre view for both upper and lower case (i.e. 3 series with genre Western, the same 3 with genre western). All 3 have metadata (xml files) that show only the genre Western, with upper case W.

 

Please tell me what I need to change to make them all move into one single genre, Western.

Share this post


Link to post
Share on other sites
Happy2Play

What OS is the server on?  Do you have a custom Metadata location set?

 

Are there duplicate genre folders in Emby-Server\metadata\Genre?

Share this post


Link to post
Share on other sites
khodges747

The OS is Windows 10 Pro.

Yes, I have a custom metadata location.

In the metadata location, only the capitalized genre is present (Comedy but not comedy, Western but not western) and if I try to create a directory called "western" Windows tells me it already exists.

Share this post


Link to post
Share on other sites
ebr

My best guess at this point is that, at some point in time, the items had the lower case genre in the source metadata and that got saved to the database.  Try the following with your western ones:

 

1) Try a full refresh replacing all metadata and see if this removes that item from the two different places

 

2) If that doesn't work, try removing the genre and saving and then adding it back.

Share this post


Link to post
Share on other sites
khodges747

Good suggestions, thanks.

 

Refreshing and replacing all metadata, then rescanning the library did not help. All 3 TV series still showed in both genres W/western.

 

Removing the genre Western from the metadata in all 3 series, then rescan of library resulted in no genre named Western or western in genre view.

 

Adding back Western to the metadata in all 3 series brought back both genres, big W and small w. All 3 series were present in both genres even though their xml files contain only uppercase Western as genre.

 

Is there some place other than the xml file where genre data is cached?

Share this post


Link to post
Share on other sites
Happy2Play

@@Luke - Is this a database issue?

 

I just did a test from another post, and can not reproduce.

 

(v3.2.7.0 new install)

58c56ee7557ad_test.jpg

Share this post


Link to post
Share on other sites
khodges747

Luke and ebr have said from the beginning it's not a database issue.

 

On my machine it only happens for genres Western and Comedy, both in movies and TV. Can you test one of those please?

Share this post


Link to post
Share on other sites
Happy2Play

Luke and ebr have said from the beginning it's not a database issue.

 

On my machine it only happens for genres Western and Comedy, both in movies and TV. Can you test one of those please?

 

Adding "comedy" to a show added it to "Comedy".

 

How old is your installation?  That is why I asked if it could database issue.

 

 

Correction    It took awhile but I did get it to duplicate, it seemed to do it after I did a search.  Will see if I can reverse the effects now.

Edited by Happy2Play

Share this post


Link to post
Share on other sites
khodges747

Adding "comedy" to a show added it to "Comedy".

 

How old is your installation?  That is why I asked if it could database issue.

 

 

Correction    It took awhile but I did get it to duplicate, it seemed to do it after I did a search.  Will see if I can reverse the effects now.

This machine is about 3 years old and MB server has been installed from the beginning.

 

I'm glad you got it to happen, too. Now I know it's not some weird metadata problem in my files.

 

Keep us posted if you find a solution.

Share this post


Link to post
Share on other sites
Happy2Play

@@Luke

 

Are the genreids only in the database?

 

comedy

genreId=41e8c0ef8afd433f5059dda4bf964fd0

 

Comedy

genreId=5f58fc74bcc724cda94a1ff167b50bce

 

 

I can only get Comedy or Western to duplicate but not both at the same time.  Couldn't replicate on any other genres so far.

Share this post


Link to post
Share on other sites
Luke

how did you create the issue?

Share this post


Link to post
Share on other sites
Happy2Play

how did you create the issue?

 

Added lower case genre to item not already in genre for Comedy or Western.  Removing that lowercase genre didn't correct the issue.

Share this post


Link to post
Share on other sites
Happy2Play

Nuking the library.db resolves the issue in my case as I know there are no other lower case entries.

Share this post


Link to post
Share on other sites
Happy2Play

@@Luke

The database records are not being cleared properly.  I edited one item with lower case to cause the issue with Comedy then changed it to upper case.  Issue still present, shutdown server and opened library.db in SQLiteDatabaseBrowserPortable (not that I have any idea what I am looking at).  Went to TypeBasedItems and scrolled over to "Name" and typed comedy in filter to show both upper and lower case entries.

 

58c5c74ab5758_db.jpg

 

Since I knew there were no incorrect entries anymore I deleted the lowercase record, saved db, restarted server.  Issue resolved.

Edited by Happy2Play
  • Like 1

Share this post


Link to post
Share on other sites
Luke

I have a fix to normalize them before they get into the database, however, it will only apply to new installations only, as applying to existing installs will cause duplicates.

  • Like 1

Share this post


Link to post
Share on other sites
khodges747

Based on Happy2Play's work, I opened the library.db database and had a look around.

 

This is similar to giving a gun to an orangutan, but I found a couple things.

 

There are lots of lower case genre entries for comedy and westerns, but most of them show an address of NULL. I believe they are entries MB Server fetches for the "More like this" feature or whatever it's called. In any case, most of them do not refer to actual files on my system, although I also found a few entries which were part of my library.

 

Strangely, when I search for lowercase drama I also finds tons of entries, but when I filter by genre in Theater I don't have a genre drama, just Drama.

 

Any suggestions?

Share this post


Link to post
Share on other sites
ebr

I think this must be an issue of those items getting generated before the above fix Luke mentioned went into place.  The only solution may be to rebuild the library.db but, if you do that, take care because watched status is now in there too.

 

So be sure and back that up with the backup plugin first.

Share this post


Link to post
Share on other sites
khodges747

If I do anything, I'll do it on a copy of the db.

 

I can't stand the thought of watched status being reset on everything in the library, so I may try filtering the offending entries. I notice there's an entry for Virtual or Library which I can use with the genre to clean up a lot of this stuff. Then I'll only be left with the real items that have lowercase genre, which should be easier to handle.

 

If I do this, when I rescan the library this problem will not be recreated, because of Luke's fix, right?

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...