• 1
  • 4
  • 5
  • 6
  • 7
  • 8(current)
Release myth2kodi -- generate Kodi friendly file-names from MythTV recordings.
Welcome @Scansterz

Just to clarify, as I haven't kept track of MythTV lately, you mean that the new filename pattern is now:
Code:
CCCCC_YYYYMMDDhhmmss.*
where each 'C' indicates a digit between zero and nine -- there used to be 4 digits in this channel id part of the name but now there are 5?

If this is the case then, on line 872 of the myth2kodi script just replace {4} with {4,5} near the start of RECPATTERN. That is, to match both the old and new naming, line 872 should now be:
Code:
  RECPATTERN='[0-9]{4,5}_20[0-9]{2}[0-1][0-9][0-3][0-9][0-2][0-9][0-5][0-9]{3}\.'

There is one other instance in the script of pattern matching the MythTV filename, but, by dumb luck, it will still match the updated naming correctly, so does not need to be changed.
Reply
Posting in the hopes that @stuartk is listening. I saw that thetvdb is getting out of the free API business: https://www.mythtv.org/wiki/Metadata_Loo...March_2021

Any hopes that myth2kodi might be able to work with the new grabbers (or even a paid API key to thetvdb?)
Reply
You know 2 years have gone by and I researched this same topic and came up with your answer to my post and similar question. I am sure I understood what to do back then, and now of course I could not remember (after all we have the internet to look this stuff up). Well, now I came across the same issue after updating Ubuntu and MythTV and the above solution absolutely works. I hope you integrate that change in your code when we download it... because this stuff really works nicely. The only part I've added is to transcode the file with HandBrakeCLI with certain h264 parameters and move it into the Episodes directory - so my transcoding makes the file smaller and easier on the CPU and playback and of course storage.
 If any one is interested I added this code around line or after line 596 after 
    #Successful Completion of myth2kodi
    LinkModeSuccessful|MoveModeSuccessful|CopyModeSuccessful|FailSafeModeComplete)
      inform "SUCCESSFUL COMPLETION TYPE: $jobtype"
and before:
      exitstatus=0
      ;;
    #Information was not obtainable

I installed HandBrakeCLI and added this code:


inform "STARTING HANDBRAKE..."

inform "Running this command:"

inform "HandBrakeCLI -i $MoveDir/$ShowFileName.ts -o $MoveDir/$ShowFileName.mp4 --cfr -e x264 -b 1258 -f mp4 -Y 720 -a 1 -E, --aencoder copy:ac3 -R Auto -B 192"

#HandBrakeCLI -i "$MoveDir/$ShowFileName.ts" -o "$MoveDir/$ShowFileName.mp4" --preset="AppleTV 3"

HandBrakeCLI -i "$MoveDir/$ShowFileName.ts" -o "$MoveDir/$ShowFileName.mp4" --cfr -e x264 -b 1258 -f mp4 -Y 720 -a 1 -E, --aencoder copy:ac3 -R Auto -B 192 | tee -a /home/mythtv/.myth2kodi/myth2kodi.log ; test ${PIPESTATUS[0]} -eq 0

inform "ENDING HANDBRAKE..."

---------
WELL anyways, I never thought I'd look this up again, but I'm glad I found it; your script is brilliant. Thanks.
Scansterz
Reply
  • 1
  • 4
  • 5
  • 6
  • 7
  • 8(current)

Logout Mark Read Team Forum Stats Members Help
myth2kodi -- generate Kodi friendly file-names from MythTV recordings.2