First off - HUGE fan of PLEX!
I love getting everyone I know on the bandwagon.
I would like to know if anyone has any ideas on how to batch assign items to a Plex "Collection" either by some command line tool, or directly in the SQLite database.
Until Plex adds the functionality to have "sub-libraries" or "sub-folder" management to group like titles together, we will use the Collection feature.
As some know, in Windows we like to group our movies together in one folder, like "Star Trek" or "Rocky Movies" where we will group all sequels in one sub-folder underneath the main Plex Library folder.
My immediate project, is that I would like to group all Stand Up Comedy together, without creating a new Library just for that category.
So I will create a Collection named "Stand Up Comedy" under the Library "Comedy".
I've got a couple of hundred titles in its own Windows folder specifically named "Stand Up Comedy".
Is there a way where I can batch assign the entire structure of this folder to the Collection "Stand Up Comedy"?
I haven't been able to find a command line tool to do this, but what I have found in SQLite is the following:
select * from tags where tag_type=2
I believe that "tag_type=2" represents "Collections"
This will give me the tag id number for the Collection "Stand Up Comedy" that I'm interested in.
Let's call it tag id = 19113
Then I am also able to run this query:
select * from section_locations where library_section_id=6
This gives me the specific ID of the Windows path where "Stand Up Comedy" is stored.
Let's call it section_location ID = 49
I then run this query:
SELECT FROM `media_items` WHERE `section_location_id` ='49'
This will give me a list of all the items stored in Windows under my "Stand Up Comedy" folder.
So what I'm missing is this: Is there a way in the DB (or command line tool) that I can assign everything that has a this specific path (ID=49) to a specific Collection (ID=19113)?
I realize this may be a little to involved, and I will just have to do it manually at the end of the day, but if anyone has any advice on how to do this, it would be very much appreciated.