Jump to content


Photo

Two genres for the price of one

genre double genre duplicate genre

  • Please log in to reply
34 replies to this topic

#21 Happy2Play OFFLINE  

Happy2Play

    Trial and Error

  • Moderators
  • 15084 posts
  • Local time: 06:43 AM
  • LocationWashington State

Posted 12 March 2017 - 06:16 PM

@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, 12 March 2017 - 06:17 PM.

  • khodges747 likes this

#22 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 134563 posts
  • Local time: 09:43 AM

Posted 12 March 2017 - 06:19 PM

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.


  • Happy2Play likes this

#23 khodges747 OFFLINE  

khodges747

    Advanced Member

  • Members
  • 190 posts
  • Local time: 09:43 AM
  • LocationAlexandria, VA

Posted 12 March 2017 - 11:10 PM

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?



#24 ebr OFFLINE  

ebr

    Chief Bottle Washer

  • Administrators
  • 46046 posts
  • Local time: 09:43 AM

Posted 13 March 2017 - 09:25 AM

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.



#25 khodges747 OFFLINE  

khodges747

    Advanced Member

  • Members
  • 190 posts
  • Local time: 09:43 AM
  • LocationAlexandria, VA

Posted 13 March 2017 - 09:37 AM

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?



#26 ebr OFFLINE  

ebr

    Chief Bottle Washer

  • Administrators
  • 46046 posts
  • Local time: 09:43 AM

Posted 13 March 2017 - 09:42 AM

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

 

I can't guarantee that because we generate a unique ID for everything in the library and this ID would be based on the name and I'm not sure which version of the name would be correct.



#27 khodges747 OFFLINE  

khodges747

    Advanced Member

  • Members
  • 190 posts
  • Local time: 09:43 AM
  • LocationAlexandria, VA

Posted 13 March 2017 - 09:44 AM

OK, appreciate the help and the honest answer.

 

I'll post again if I get any new results to share.



#28 khodges747 OFFLINE  

khodges747

    Advanced Member

  • Members
  • 190 posts
  • Local time: 09:43 AM
  • LocationAlexandria, VA

Posted 13 March 2017 - 11:52 AM

I modded the db and nothing changed.

 

First I deleted all entries that had both Comedy or comedy and were Virtual entries. Then I verified all remaining comedy entries for lowercase c. I found none (but the filter isn't case sensitive, so I could have missed something). I then did the same routine for Western and western.

 

I saved the db, restarted MB Server and did a clean database followed by a new scan.

 

Nothing is different in Theater.

 

I reopened the db to check if the mods were still there, and the deleted entries have not been added again, so I don't know where the lowercase genres are hidden. I must be missing an entry somewhere. 

 

If I could do a case-sensitive filter...anybody know how to do that?



#29 Happy2Play OFFLINE  

Happy2Play

    Trial and Error

  • Moderators
  • 15084 posts
  • Local time: 06:43 AM
  • LocationWashington State

Posted 13 March 2017 - 02:39 PM

Did you delete the record I showed above in screenshot?

 

The Server Configuration Backup can restore users watched status if needed.


  • khodges747 likes this

#30 khodges747 OFFLINE  

khodges747

    Advanced Member

  • Members
  • 190 posts
  • Local time: 09:43 AM
  • LocationAlexandria, VA

Posted 13 March 2017 - 04:39 PM

To be honest, I didn't understand exactly what you had done. But on reading more closely and doing exactly the same I fixed the problem.

 

Thank you for your help!!


  • Happy2Play likes this

#31 Happy2Play OFFLINE  

Happy2Play

    Trial and Error

  • Moderators
  • 15084 posts
  • Local time: 06:43 AM
  • LocationWashington State

Posted 13 March 2017 - 04:45 PM

Now if that comes back then there is a genre somewhere in your collection that contains a lower case entry.



#32 khodges747 OFFLINE  

khodges747

    Advanced Member

  • Members
  • 190 posts
  • Local time: 09:43 AM
  • LocationAlexandria, VA

Posted 13 March 2017 - 05:51 PM

Well, that didn't last long. After the 1st library scan the lowercase genres were back.

 

So I went back into the db and deleted the items you specified again, then filtered the genre for comedy. There are 1763 lines to verify. I've done it twice now and I find not one entry with a lowercase c. I can't look at it any more - I'll go blind or crazy.

 

For western, there are far fewer lines and I found 2 lower case entries, which I changed to uppercase. After the rescan of the library the lowercase genre was back again.

 

WTF?



#33 Happy2Play OFFLINE  

Happy2Play

    Trial and Error

  • Moderators
  • 15084 posts
  • Local time: 06:43 AM
  • LocationWashington State

Posted 13 March 2017 - 06:27 PM

That is because the library scan sees a mismatch between metadata and database and is rewriting the lowercase entries where ever they are back to the database.


Edited by Happy2Play, 13 March 2017 - 06:28 PM.


#34 Happy2Play OFFLINE  

Happy2Play

    Trial and Error

  • Moderators
  • 15084 posts
  • Local time: 06:43 AM
  • LocationWashington State

Posted 13 March 2017 - 06:29 PM

Crazy question but do you have any media with embedded metadata?

 

Well I guess it shouldn't matter since that info would be written to nfo metadata.


Edited by Happy2Play, 13 March 2017 - 06:30 PM.


#35 khodges747 OFFLINE  

khodges747

    Advanced Member

  • Members
  • 190 posts
  • Local time: 09:43 AM
  • LocationAlexandria, VA

Posted 13 March 2017 - 10:41 PM

No embedded metadata.

 

I finally fixed it by modifying the entries in the db that define the genres. It turns out that if you simply change the lowercase c of comedy to uppercase, both in entry for the address of the metadata and for its name, you end up with a genre called Comedy instead of comedy.

 

I did it for both genres and it seems to be holding, including after library scans.

 

Thanks for all your help.







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

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users