Question regarding the SQLLiteDB

UPDATE: DAMMIT just saw I posted in Channel develoment like the newb I am, I apologize.



The sqlite db you can find under “C:\Users\username\AppData\Local\Plex Media Server\Plug-in Support\Databases” is this the main database that the media server uses? The pathname confuses me as it implies its only used for plugins, my main question is: would a change in this file be reflected in the actual media server. And if so is this advice-able (kinda know the answer to this one :P)



I ask because I got tired of working with a webinterface which does not respond very well and started on a .NET management tool for windows. Additionally I was hoping to add some extra features with use of a secondary database but before I start thinking of that I need to know how this file is actually used by plex media server.



The info inside seems to be up to date and atm can browse through all my episodes etc. Can extract all info I need from it but for some reason I have a feeling I am missing something. It cant be this easy otherwise there would be a management tool no?



Regards,

Yuushi

Yes, that’s the database location, but it’s probably not a good idea to modify it directly, since this could result in corruption. You’d be far better off using the same HTTP API the web interface uses :slight_smile: There’s very little documentation for it currently (sorry) but you should be able to figure out what’s going on fairly easily from the log files. Using the proper API would also allow you to interact with the media scanners and metadata agents.

thank you for your reply, I had not considered the HTTP API which indeed is a better alternative. In fact it will make things a little easier as I don’t have to interpret the database. I’ll dig into that first check the performance and see if that is acceptable. thank you!



Regards,

Yuushi

Going to sleep on it a little but so far the way the http API displays and structures the data I am running in issues regarding the display of titles / seasons & episodes. To be more concrete I want a quick and easy way to navigate through large libraries (meaning preloaded trees and leafs to at least season level preferably episode level). When I use the database to display this information up until season level it loads fast, episode level would need some smart coding.



I just implemented it based on the HTTP API and came to the following conclusion

  • 1 call to get the sections (Total calls: 1)
  • 1 call per sections to get series (2 in my case) (Total Calls: 2)
  • 1 call per series to get seasons(500 in my case) (Total Calls: 503)
  • 1 call per episode in season (avg seasons of 3 == 3 x 500) ( Total calls 2003)



    Meaning I think I will attempt to open the database as readonly to extract the required information and handle this sort of stuff and from there on use the HTTP API. Not ideal but should in theory at least work as iirc SQLite supports multiple reads but only 1 write user access.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.