Jump to content


Photo

Where is Parental Rating data stored?


  • Please log in to reply
5 replies to this topic

#1 honorkell OFFLINE  

honorkell

    Newbie

  • Members
  • 9 posts
  • Local time: 03:12 PM

Posted 01 September 2019 - 01:19 PM

Hi,

 

I have a bunch of channels in LiveTV (via IPTV m3u) that I don't want showing up in the guide.  The only way I've found to remove them is to change their parental rating to X and then put in parental access controls per user.  I'd like to do this en masse, so I want to write a script that will manually change the metadata stored on my server.  But I can;t seem to find where the parental rating data is stored.  Does anyone know where that is?

 

Thank you.

 

 

Edit: Nevermind I forgot about medatadata manager.

 

Edit2: Wait medatamanager can't do multiple selections at once?

 

Edit3: Fix figured out below:

 

 

So if anyone wants to mass block channels, first shutdown Emby then:

1) download DB browser for SQLite,

2) open the library.db file C:\users\YOURUSERNAME\AppData\Roaming\Emby-Server\programdata\data,

3) browse data,

4) select mediaItems,

5) filter by channel name,

6) change one channel's official rating to XXX and it's inheritedparentalratingvalue to 15

7) Copy and paste these to each entry (you can do multiple at once with shift+click)

8) Write changes, close DB browser, run Emby

 

Make sure your user's parental access blocks XXX.


Edited by honorkell, 02 September 2019 - 12:47 AM.


#2 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 138096 posts
  • Local time: 04:12 PM

Posted 01 September 2019 - 07:49 PM

Hi, no we currently don't have bulk editing features but it's something we're interested in for the future. Thanks.

#3 honorkell OFFLINE  

honorkell

    Newbie

  • Members
  • 9 posts
  • Local time: 03:12 PM

Posted 01 September 2019 - 08:25 PM

Well then I'll try writing a script.  Where is the parental data stored?



#4 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 138096 posts
  • Local time: 04:12 PM

Posted 01 September 2019 - 08:58 PM

In the library.db database. I would suggest using the API. Or if you have nfo metadata files, you could use a bulk text editor to edit them, then run a library scan.



#5 honorkell OFFLINE  

honorkell

    Newbie

  • Members
  • 9 posts
  • Local time: 03:12 PM

Posted 01 September 2019 - 09:30 PM

Ah ok thank you.

 

Edit:  Okay, I can easily edit library.db and add a tag en masse to the channels I want to hide (using parental access controls), and the changes to the db stick.  However, they aren't reflected in the channel's metadata when browsing the LiveTV channels.  I restarted the server with the edited library.db, but Emby is ignoring library.db's "tags": the changes don't show up in use, but do in the library.db.  Any idea what that could be?

 

Oh also - when i edit the tags from Emby and reinspect the db, the changes show up in the db editor.  So I'm a little confused why this seems to be a one way street.

 

Thank you.

 

 

Edit2:  parental ratings stick in the db too - and show up in the Emby metadata!  I marked the unwanted channels as XXX.  But Emby only hides the channel if I set it as XXX from Emby; it ignores the db again, even though the metadata rating shows up as XXX.

 

Edit3:  Got it.  I had to change the inherited parental rating to 15 as well.  Woot! 

 

So if anyone wants to mass block channels, first shutdown Emby then:

1) download DB browser for SQLite,

2) open the library.db file C:\users\YOURUSERNAME\AppData\Roaming\Emby-Server\programdata\data,

3) browse data,

4) select mediaItems,

5) filter by channel name,

6) change one channel's official rating to XXX and it's inheritedparentalratingvalue to 15

7) Copy and paste these to each entry (you can do multiple at once with shift+click)

8) Write changes, close DB browser, run Emby

 

Make sure your user's parental access blocks XXX.


Edited by honorkell, 02 September 2019 - 12:32 AM.


#6 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 138096 posts
  • Local time: 04:12 PM

Posted 02 September 2019 - 01:28 AM

Well, doing it that way is a hack but i guess it will work. Thanks for the feedback.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users