X-post from SnapStream forum, http://forums.snapstream.com/vb/showthread.php?t=56055
So I've been working on a decent way to have my BTV Library available in Plex. Initially I thought renaming the files into the Plex format would be easy, but it was always a trouble to get the proper metadata for some recorded shows. So I went the other route and utilized the Plex Video Files scanner along with modifying the Metadata agent that scans for file details. And I think I came up with a decent solution, but I want feedback from users because I'm not the best python coder.
Details
This is a Metadata agent for Plex that scans an XML dump of your BeyondTV database and tries to match filename for filename and pull in the BeyondTV series, episode, description and original airdate details. This information is used to tag these files in a Plex library. THIS ONLY WORKS ON WINDOWS. If you want Linux support, I'll can work with you on coming up with a solution.
Installation
1- Extract BeyondTV.Bundle to your Plex App Data location, ie
C:\Users\me\AppData\Local\Plex Media Server\Plug-ins\BeyondTV.bundle\Contents\Resources\
2- Inside the bundle, edit Contents\Resources\Configuration.txt
a) Set your BeyondTV server information.
B) Set the path to where the database dump file will go. I keep it in the same location.
c) Staying inside the bundle, edit Contents\Code\__init__.py
d) Set the path where you are dumping the database to the variable on line 10, 'BTV_DB', making sure you include the 'r' in front of the path enclosed in double quotes.
3- Run BTVdb.exe process to make sure it works and creates the btvdB.xml file. Use BTVdbConsole.exe to debug.
4- Create library in Plex
a) Use Home Movies
B) Add your recording folders
c) For Scanner, use Plex Video Files Scanner
d) For Agent, use Beyond TV
Issues, Thoughts
1- Plex doesn't call the database dump process. I haven't figured out a way that it would do it only once before the metadata scan. It was calling it each time it scanned a file. There are two ways I'd update the database file:
a) Task Scheduler in Windows to run the file in the background. This is the best solution to get the exact library. I just haven't figured out a nice way to configure this.
B) Custom Post Process in Beyond TV to run the database dump process once a new file is added, but this wouldn't run when a file is deleted. Therefore, the database would be out of sync at times, however Plex should empty the trash for files that don't exist in the library.
2- Doesn't sort like TV Shows in Series/Episodes format. I couldn't figured out a decent way to use the TV Shows style of Plex to organize the shows. There ended up being a lot of missing information and just looked ugly. Again, this goes back to properly renaming the files before they get into Plex or writing a script that matches the data from a source like TheTVDB. But again, the motivation for this program was to pull data from Beyond TV, not another source.
3- Doesn't pull images to create nice thumbnails. It just uses a screen grab from the file. That's fine for me.
4- If anyone likes this and has thoughts or feedback, or wants to help me develop something better, let me know. I really want to figure out a better way to connect Plex to Beyond TV, but unfortunately Python in Plex doesn't have SOAP libraries to talk with the Beyond TV web services. So this is why I went this route. Plus, this method is much quicker than doing hundreds of BTV library dumps through web services.