(2017-05-05 02:37)whysyn Wrote: Hi guys, this is exactly what I was looking for but I'm very new to MythTV and I'm not sure I'm getting things plugged in correctly.
I installed the script as my myth user and it runs OK by hand.
I went into MythTV settings, general, and set "Allow User Job #1 jobs" enabled in the 8th screen, then set in the 10th screen:
When a scheduled recording happens it doesn't even seem to try running. Here's a mythbackend log excerpt: https://paste.ubuntu.com/24514141/
Two possibilities I can think of:
When you scheduled the recording, did you tick the box that tells mythbackend to run the myth2kodi user job on completion of the recording? If you use mythweb you could try going to the page for a recording and clicking the button to run myth2kodi on that recording. If that works then it means you just didn't specify that the myth2kodi user job should run as part of the recording schedule.
If you can't run myth2kodi on a recording through mythweb then it could be a permission issue. Are you certain that the user running mythbackend is the same user that you are using at the command line? When you call user jobs from MythTV they run as the user running the mythbackend
(2017-05-05 02:37)whysyn Wrote: I have a minor, secondary issue as well. The files moved by the myth2kodi script are mode 644. My kodi install (which runs over the network and accesses the share with a different username) is unable to delete files when I'm done watching them.
The permissions are set that way intentionally. If you are using a default configuration, then the recordings processed by myth2kodi
are still connected to MythTV. If you just manually delete the processed recording file (with Kodi or any other mechanism that is unaware of MythTV) then your MythTV database will contain a reference to a recording that no longer exists -- you don't want this to happen.
There are two approaches you could take, either: 1)
use a MythTV aware delete; or 2)
configure myth2kodi to disconnect successfully processed recordings from MythTV.
you can use either mythweb as a GUI option or at a command line use myth2kodi --delete.
one approach would be to set SYMLINK='Disabled' in your myth2kodi.conf file. This has the side effect of disconnecting the recording from MythTV and expanding the permission of the processed recording file to 664, which should be sufficient to allow Kodi to delete it. NOTE: Once a recording is disconnected from MythTV the myth2kodi processing can no longer be undone as the information about the recording has been delete from your MythTV-DB.
If you always delete your recordings after watching them, that is you have no interest in building up a library of your recordings, then the functionality of the MythTV PVR addon for Kodi might be sufficient for what you are trying to achieve.