After running MythTV for many years, I recently switched to NextPVR, but still had over 50 unhelpfully named ts files in my MythTV recordings folder. It looked like the file names would also cause import challenges. FYI, file name "1411_20190721200000.ts" meant channel 41.1 recorded on 2019-07-21 at 20:00:00 - This would not tell NextPVR anything useful to it about the show.
This worked to import:
The result was to populate the interface, including in most cases, thumbnails and posters. I was not counting on art because the filenames were (and still are) as described above. In the one case I had where there was no art, I was able to manually add art to .npvr-data/media/shows and tweak the related catalog.xml files in that folder. There will examples in that folder. There may be a better/easier way to do this.
Here's an excerpt from my import xml file:
This worked to import:
- I accessed the MythTV mariadb sql database and exported the "recorded" view to an xml file. I had to relaunch mariadb, but then was able to access the data - in my case on a mac - with an app called sequel ace. There are many sql apps for many platforms.
- The recorded-view.xml file contained data for all of the shows in groups separated by a "row" tag. The data included the filename, show name, season, episode number, descriptions, episode names, etc. It was a simple matter to tidy up the file, delete unnecessary tags and rename the tags to match the nomenclature required by NextPVR. A key step was to prefix the MythTV filenames with the rest of the file path that NextPVR would need. All this was done with search and replace, using grep in some cases. For reference, I will include an excerpt, below, from the xml file I used for the successful import.
- I left the MythTV files in their original MythTV folder and used the import button in settings:general to locate the xml file and run the import.
The result was to populate the interface, including in most cases, thumbnails and posters. I was not counting on art because the filenames were (and still are) as described above. In the one case I had where there was no art, I was able to manually add art to .npvr-data/media/shows and tweak the related catalog.xml files in that folder. There will examples in that folder. There may be a better/easier way to do this.
Here's an excerpt from my import xml file:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<recordings>
<recording>
<channel>TVO</channel>
<status>READY</status>
<startTime>2020-06-23 07:00:00</startTime>
<endTime>2020-06-23 07:55:00</endTime>
<title>Employable Me</title>
<subtitle>Rick and Victor</subtitle>
<description>Rick struggles to find employment because of his Autism; Victor is determined to score a job, despite his lung condition.</description>
<season>0</season>
<episode>0</episode>
<genres>
<genre>Documentary</genre>
</genres>
<seriesid>EP02742054</seriesid>
<programid>EP027420540007</programid>
<size>6598843240</size>
<filename>/volumes/TV/MythTV/1191_20200623070000.ts</filename>
</recording>
<recording>
<channel>TVO</channel>
<status>READY</status>
<startTime>2019-07-22 03:00:00</startTime>
<endTime>2019-07-22 03:55:00</endTime>
<title>Employable Me</title>
<subtitle>Thomas and Nathalea</subtitle>
<description>Thomas aspires to independent employ and living; Nathalea used to be a registered nurse.</description>
<season>0</season>
<episode>0</episode>
<genres>
<genre>Entertainment</genre>
</genres>
<seriesid>EP02742054</seriesid>
<programid>EP027420540003</programid>
<size>6598782516</size>
<filename>/volumes/TV/MythTV/1191_20190722030000.ts</filename>
</recording>
<recording>
<channel>TVO</channel>
<status>READY</status>
<startTime>2019-07-08 03:00:00</startTime>
<endTime>2019-07-08 03:55:00</endTime>
<title>Employable Me</title>
<subtitle>Becca and Riley</subtitle>
<description>Becca looks for an accepting work environment; Riley has trouble with interviews.</description>
<season>0</season>
<episode>0</episode>
<genres>
<genre>Entertainment</genre>
</genres>
<seriesid>EP02742054</seriesid>
<programid>EP027420540001</programid>
<size>6601144736</size>
<filename>/volumes/TV/MythTV/1191_20190708030000.ts</filename>
</recording>
<recording>
<channel>TVO</channel>
<status>READY</status>
<startTime>2019-07-15 03:01:00</startTime>
<endTime>2019-07-15 03:55:00</endTime>
<title>Employable Me</title>
<subtitle>Melissa and Matt</subtitle>
<description>Melissa searches for a job where she can feel comfortable; Matt has trouble focusing at work.</description>
<season>0</season>
<episode>0</episode>
<genres>
<genre>Entertainment</genre>
</genres>
<seriesid>EP02742054</seriesid>
<programid>EP027420540002</programid>
<size>6481458108</size>
<filename>/volumes/TV/MythTV/1191_20190715030100.ts</filename>
</recording>
<!-- continued with many more recordings -->
</recordings>