Simple question - Is there any official documentation on how to write add ons for Plex?
Very sorry if it's on an FAQ somewhere. If it is please point me at it as I've just spent half an hour looking for it and come up with nothing other than other users posts on bit's they've discovered.
I'm looking at add some features to Plex. The bit's I'm initially interested in are;
- Reading / Writing to the database media library
- Integration with the server UI. (ie can I add a control panel for my feature?)
Is there anything out there or do I really have to code things blind and hope that the next release of Plex doesn't break me?
I can see how the channel plugins are good for presenting new content. Unless I am missing something what I'm trying to do (I think) is simply affect the database.
Without knowing very much about Plex internals I believe what I need do is create a new library on the media info table based upon a subset of an existing library. All the links to the poster media etc will be the same as the original. Or those I'll duplicate those as well depending how they're linked.
This should let me create a new library based on an sql select of an existing one.
I'd rather do this via some sort of API in case the DB format changes.
Without knowing very much about Plex internals I believe what I need do is create a new library on the media info table based upon a subset of an existing library. All the links to the poster media etc will be the same as the original. Or those I'll duplicate those as well depending how they're linked.
This should let me create a new library based on an sql select of an existing one.
It is a lot more complicated then that to create a library. The library name is stored in library_sections. Then the main folder(s) it points to is(are) in section_locations. Then any subfolder to the main folder(s) is in directories. Then there is the actual media info, which is also spread out over several tables. I have been messing around with the database a lot and this is 1 task I have not attempted due to its complexity. I would be interested in seeing your progress.
It is a lot more complicated then that to create a library. The library name is stored in library_sections. Then the main folder(s) it points to is(are) in section_locations. Then any subfolder to the main folder(s) is in directories. Then there is the actual media info, which is also spread out over several tables. I have been messing around with the database a lot and this is 1 task I have not attempted due to its complexity. I would be interested in seeing your progress.
Hi MovieFan
My aim is to 'auto-sort' movies in to libraries by duplicating the main movies library. So no doubt over simplifying it massively;
- Create a new library called 'Movies-Adults'
- Copy the media info from the main Movies library over to the new one for all films where age rating >= 18
(Repeat for other variations, such as Movies-safe, movies-teen-safe)
Which should then let me allocate the correct mix of libraries to the plex-users on my system. Whilst still maintaining a master single library
The bit's I'm trying to avoid is having to sort on the file system. Also means that anyone who's old enough to watch anything just sees the master library.