I know many folks have a use case using multiple lineups. I personally have both Cable and OTA, and wanted all the channels from both setups to show up.
Another option is now that HDHomeRun has released their Premium service, you’ll need to do something like this in order to use it with Plex and still get OTA.
BUGS:
- Tons of Programs get marked as Movies - No workaround
According to [ shea9872](XMLTV & Categories - #16 by shea9872):
“Plex requires some sort of episode numbering in order to identify TV shows, this could either be the original-air-date (as IceTV has) or it could be some sort of episode / season numbering”
-
‘Unable to load channel mappings’ error in Plex DVR Setup
I seem to get this when PMS is busy, specifically when adding the 2nd device. I usually wait and let it process entirely, before adding another device. -
‘Invalid or missing xml’ error in Plex DVR Setup
I’ve noticed PMS is weirdly path picky on the XML file. I’ve resorted to using /tmp and make sure the file has no spaces/etc. This can also be a URL. -
Processing takes quite awhile
The examples below utilize a .chl file, which allows you to have an inclusion/exclusion list to minimize processing needed for channels you don’t have. -
Tons of shows don’t have images
This is guide data provider dependent. If they include the URL for images in the XML, then Plex will pick it up.
NEEDED:
mc2xml - http://mc2xml.hosterbox.net/ - Supports multiple platforms.
Account with a supported EPG Provider - I am using Schedules Direct
Example commands:
mc2xml -D sfota.dat -C sfota.chl -o sfota.xml -J USER:PASS -g 94103 -c USA --sdjs-images
mc2xml -D sfcable.dat -C sfcable.chl -I sfota.xml -o sfcableota.xml -J USER:PASS -g 94103 -c USA --sdjs-images
Explanation:
-D is the dat file, you need to define this since you’re combining lineups
-C is the chl file, this is to have an inclusion OR exclusion list. See the webpage for example. I have channel ranges listed of the exact channels I have access too
-o is the XMLTV output file
-J is the logins needed for Schedules Direct
-g is my zipcode
-c is my country
–sdjs-images is to get cover/etc images for each program listing
-I is the flag to add another file. The output will be a combined XMLTV formatted file that Plex will accept.
You can repeat these for multiple lineups, SD supports up to 4.
Once you’ve ran these commands, you should have a fairly large (50-300mb+) file which has 14+ days of program data. You need to copy it to an easily accessible location (I use /tmp in Linux) or HTTP accessible.
PLEX SETUP:
Unfortunately, you will need to delete your DVR for this, but don’t fear, because Plex will remember all your scheduled recordings.
Go into Live DVR Setup and delete DVR in the upper right hand corner.
Then click ‘Set Up Plex DVR’. Pick your device and click Continue. IF needed do a channel scan, then Continue.
At the next screen, where you normally put in a zip code, look at the Orange text that says ‘Have an XMLTV guide on your server? Click here to use that instead’.
Add the path for your file and if it’s located after you click Continue it will switch to ‘Loading Channel Mappings’.
Every channel should be mapped, it should look like this:
And then click Continue and it’ll start processing. Once it finishes you should be good to go!
Besides the bug listed above where anything without episode numbers becomes a movie, functionality should not be different.
You’ll want to script this to run once a day or every few days, outputting the XMLTV file at the exact same location as you copied it, so Plex can continually update the guide data using that file.
I have not tested this with HDHomeRun Premium, nor any guide data provider beyond Schedules Direct, but it should work with them. Report back if it does for you!
UPDATE:
You can also use a fork of tv_grab_zz_sdjson_sqlite. This is what I’ve switched too.