Mythimport/mythexport beta compatible with 0.28 now ready

For discussion related to MythTV which doesn't belong in another forum.

Moderator: Forum Moderators

Post Reply
fe31nz
Newcomer
Posts: 3
Joined: Wed Mar 29, 2017 9:36 am
New Zealand

Mythimport/mythexport beta compatible with 0.28 now ready

Post by fe31nz »

Since MythTV 0.28 came out, mythimport has not been properly compatible due to the new recorded.recordedid field. I have been working on a new version and it is now available for beta testing should anyone like to try it. As well as fixing the recordedid problem, I have tried to make it much more rugged, so it should now be able to be used without having it crash in the middle of an import.

It can be downloaded from my personal web server:

http://www.jsw.gen.nz/mythtv/mythimport.html

If you are reporting a problem, please let me know the version of MythTV, mythimport, and MySQL or MariaDB you are using, and a send a copy of the mythimport.log file.
frederickjh
Newcomer
Posts: 2
Joined: Sat Aug 26, 2017 5:50 pm
Switzerland

Re: Mythimport/mythexport beta compatible with 0.28 now read

Post by frederickjh »

Hi @fe31nz !

I recently upgrade MythTV and MythExport to 0.28. MythExport was not working. In troubleshooting this I had to turn on debugging in the mythexport-daemon. Event the debug was not giving me any helpful insight as to why the jobs were failing. I copied the SQL select from lines 361 - 363 added in the looked up values from the debug for chanid and starttime. To my surprise I found that it returned 0 results. I then examined the start time and found that it was UTC and not local time. Readjusting the starttime for the difference between local time and UTC and then rerunning the SQL query return exactly one result.

Changing my userjob to use

Code: Select all

mythexport_addjob starttime=%STARTTIMEUTC% chanid=%CHANID% config=mpeg2losslesstranscode deleteperiod= podcastname=MythCast
instead of

Code: Select all

mythexport_addjob starttime=%STARTTIME% chanid=%CHANID% config=mpeg2losslesstranscode deleteperiod= podcastname=MythCast
and restarting the Mythbackend with

Code: Select all

sudo service mythtv-backend restart
fixed this issue for me.

I post this information here for anyone here that may run into the same issue.

I am not sure if there is an issue queue for Mythexport but I think it would be good to add code to check to see if the number of results to the SQL select query equals 1. If not it should log a message to this effect, possibly with the information that %STARTTIMEUTC% should be used in the user job and not %STARTTIME%. It should then clean up the bad job and abort.

Thanks for your hard work on MythExport!
Frederick
frederickjh
Newcomer
Posts: 2
Joined: Sat Aug 26, 2017 5:50 pm
Switzerland

Re: Mythimport/mythexport beta compatible with 0.28 now read

Post by frederickjh »

Hi again @fe31nz !

I also forgot to mention in my debugging that mythexport-daemon was getting as the input file name /var/lib/mythtv/banners

Excerpt from /var/log/mythtv/mythexport.log:

Code: Select all

/usr/bin/mythexport-daemon:439:[export]:	    my $returnCode:0 = $object:{mpeg2losslesstranscode: '_notes'=>'May be big but it does not take much CPU. It also cuts marked sections out.';'_inputFile'=>'/var/lib/mythtv/banners/';'_extension'=>'.m4v';'_version'=>1.0;'_devices'=>'MPEG2 Lossless transcode SD 720 x 576 px resolution';'_outputFile'=>'/mythxfs2/Mythexport/SRF-1---20170825195200';'_description'=>'MPEG2 Lossless transcode'}->checkOutput();
The only place that I find /var/lib/mythtv/banners is the first item in video_dirs.

Excerpt from /var/log/mythtv/mythexport.log:

Code: Select all

video_dirs'=>'/var/lib/mythtv/banners','/var/lib/mythtv/coverart','/var/lib/mythtv/db_backups','/mythxfs1','/mythxfs2',
'/var/lib/mythtv/recordings','/var/lib/mythtv/fanart','/var/lib/mythtv/livetv',' . . . 
So it the end what was passed on to the mythexport configuration was

Code: Select all

starttime='' chanid='banners'
I would try and figure out how to code a check into this for the number of results from the SQL query but Perl is not a language I know well.

God bless!
Frederick
Post Reply