Release - myth2kodi -- generate Kodi friendly file-names from MythTV recordings.

  Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
stuartk Offline
Junior Member
Posts: 49
Joined: Dec 2016
Reputation: 9
Post: #91
(2017-08-08 02:17)triminmotion Wrote:  myth2kodi Version 1.5.0-beta7

You hoped correctly. Nice catch.

Code:
[email protected]:~$ sed -r "s/[^[:alnum:] &,.)(-:']//g" <<< "A Title: of-sorts & it's? + Garbage >^#@{}[42]A/B*C."
sed: -e expression #1, char 26: Invalid range end
[email protected]:~$ sed -r "s/[^[:alnum:] &,.)(:'-]//g" <<< "A Title: of-sorts & it's? + Garbage >^#@{}[42]A/B*C."
A Title: of-sorts & it's  Garbage 42ABC.

That's great, a fix is now in the repo so if you feel like trying it out you can pull the latest from GitHub and copy the new myth2kodi script into place (once installed it should report Version 1.5.0-beta8).
Let me know if you run into any other issues.
And, thanks for helping me catch a bug before release.
find quote
triminmotion Offline
Junior Member
Posts: 9
Joined: Jun 2014
Reputation: 2
Post: #92
The fix worked. Thanks for maintaining this tool.

Now I can get back to architecting all this. Kodi + Myth isn't easy...
find quote
mayaco Offline
Junior Member
Posts: 11
Joined: Jan 2014
Reputation: 0
Post: #93
(2017-06-24 08:57)stuartk Wrote:  
(2017-06-22 17:38)mayaco Wrote:  Sorry about the time. Just now able to get back to this. I have made numerous changes to that file to get it to work with what i need and don't really want to replace it. Can you give me a snippet of code to replace. If not, no biggie, I can compare and replace.

EDIT: Never mind...just realized there is a "User Settings" section that i can just replace.

Firstly, if by changes you just mean user settings then I'd strongly recommend using a configuration file (myth2kodi.conf) in myth2kodi's working directory, so that your settings survive an update. That way, when a new release is available with bug fixes, etc, you can easily update using the install script.

I'm in the middle of a major clean-up at the moment, so the current master is not well tested. So if you have or intend to grab an updated version from the repo, you are probably best with the "Quick-fix" commit I made shortly after your previous message, that is, this commit, which, as you can see is a fairly small change and corresponds to this version of the myth2kodi file.

If you happen to have already grabbed a more recent copy from master it would be interesting to know how it is working for you? (It will probably be a few weeks before I've finished making and have thoroughly tested the current clean-up and it is ready for a new release.)

i used the latest file to match an episode and now it fails always

Quote:[2017-08-08T21:35:51] ERROR: 'FailSafeDir' is not a directory: /home/mythtv/FailSafe
@@@@ PROCESSING RECORDING: 2017-08-08 21:35:51-05:00 @@@@
myth2kodi Version 1.5.0-beta8 on Linux
[2017-08-08T21:35:51] INFO: Processing: /var/lib/mythtv/recordings/2026_20170803000000.ts
[2017-08-08T21:35:51] INFO: Accessing MythTV DataBase Using PythonBindings.
mythdb_access: WARNING:__main__:No comskip information found.
[2017-08-08T21:35:52] INFO: Processing MythTV database info as SchedulesDirect.
[2017-08-08T21:35:52] INFO: No existing info for: 'MasterChef'
[2017-08-08T21:35:52] INFO: SEARCHING: http://www.TheTVDB.com for 'MasterChef'
[2017-08-08T21:35:54] INFO: Found: "MasterChef" ID#: '84489' with CONFIDENCE:'1'
[2017-08-08T21:35:54] INFO: Identified TVMAZE_SERIESID='7186' for TVDB_SERIESID='84489'.
[2017-08-08T21:35:54] WARNING: Fuzzy subtitle match too fuzzy.
[2017-08-08T21:35:55] WARNING: get_absolute_episode_number_fuzzy_plot(): AbsoluteEpisodeNumber guess from full Plot failed or too fuzzy, trying chunked match.
[2017-08-08T21:35:55] WARNING: This version of agrep limits PATTERN to < 32 characters, so cannot do complete Plot match.
[2017-08-08T21:35:55] WARNING: multi_match_check(): Called with empty Absolute Episode Number guess.
[2017-08-08T21:35:55] WARNING: get_absolute_episode_number_fuzzy_plot(): Chunked Plot match is still too fuzzy, failed to guess AbsoluteEpisodeNumber.
[2017-08-08T21:35:55] WARNING: Failed to identify episode.
[2017-08-08T21:35:55] WARNING: Low episode-confidence-rating (-7), requiring doover.
[2017-08-08T21:35:56] INFO: ################ OPERATION SUMMARY ################
JOB: myth2kodi '/var/lib/mythtv/recordings/2026_20170803000000.ts' "" "" "" ''
CALLER=mythtv-
PROCESS_RECORDING_MODE=MOVE-
SYMLINK=Enabled-
RECORDING_PATH=/var/lib/mythtv/recordings/2026_20170803000000.ts-
TVDB_SERIESID=84489-
TVMAZE_SERIESID=7186-
TITLE=MasterChef-
SUBTITLE=Holy Cannoli-
SEASON=-
EPISODE=-
MoveFileSize=6290 MB
ConfidenceRating=-6-
ConfidenceReasoning= Attempted Title match on Standard Logic: Successful; Attempted SUBTITLE exact match: Failed; Attempted SUBTITLE fuzzy match: Failed; Attempted match on ORIGINALAIRDATE: Failed. Attempted Plot fuzzy match: Failed;-
MDB_STARTTIME=2017-08-02 18:00:00-06:00-
MDB_PROGRAMID=EP012513470232-
MDB_STORAGEGROUP=Default-
MDB_CATEGORY=Reality-
ProgramIDType=Series With Episode Data-
Zap2itSeriesID=1251347-
Plot=The cooks prepare dishes for a roomful of guests using the guests own ingredients the losing team prepares cannolis in the pressure test.-
[2017-08-08T21:35:56] INFO: ################ END OF OPERATION SUMMARY ################
[2017-08-08T21:35:56] WARNING: Episode could not be matched with supplied information.
@@@@ COMPLETE: 2017-08-08 21:35:56-05:00 @@@@
[2017-08-08T21:35:56] WARNING: NAME COULD NOT BE ASSIGNED BASED UPON DATA SUPPLIED
find quote
stuartk Offline
Junior Member
Posts: 49
Joined: Dec 2016
Reputation: 9
Post: #94
(2017-08-09 04:39)mayaco Wrote:  i used the latest file to match an episode and now it fails always

Quote:[2017-08-08T21:35:51] ERROR: 'FailSafeDir' is not a directory: /home/mythtv/FailSafe
@@@@ PROCESSING RECORDING: 2017-08-08 21:35:51-05:00 @@@@
myth2kodi Version 1.5.0-beta8 on Linux
[2017-08-08T21:35:51] INFO: Processing: /var/lib/mythtv/recordings/2026_20170803000000.ts
[2017-08-08T21:35:51] INFO: Accessing MythTV DataBase Using PythonBindings.
mythdb_access: WARNING:__main__:No comskip information found.
[2017-08-08T21:35:52] INFO: Processing MythTV database info as SchedulesDirect.
[2017-08-08T21:35:52] INFO: No existing info for: 'MasterChef'
[2017-08-08T21:35:52] INFO: SEARCHING: http://www.TheTVDB.com for 'MasterChef'
[2017-08-08T21:35:54] INFO: Found: "MasterChef" ID#: '84489' with CONFIDENCE:'1'
[2017-08-08T21:35:54] INFO: Identified TVMAZE_SERIESID='7186' for TVDB_SERIESID='84489'.
[2017-08-08T21:35:54] WARNING: Fuzzy subtitle match too fuzzy.
[2017-08-08T21:35:55] WARNING: get_absolute_episode_number_fuzzy_plot(): AbsoluteEpisodeNumber guess from full Plot failed or too fuzzy, trying chunked match.
[2017-08-08T21:35:55] WARNING: This version of agrep limits PATTERN to < 32 characters, so cannot do complete Plot match.
[2017-08-08T21:35:55] WARNING: multi_match_check(): Called with empty Absolute Episode Number guess.
[2017-08-08T21:35:55] WARNING: get_absolute_episode_number_fuzzy_plot(): Chunked Plot match is still too fuzzy, failed to guess AbsoluteEpisodeNumber.
[2017-08-08T21:35:55] WARNING: Failed to identify episode.
[2017-08-08T21:35:55] WARNING: Low episode-confidence-rating (-7), requiring doover.
[2017-08-08T21:35:56] INFO: ################ OPERATION SUMMARY ################
JOB: myth2kodi '/var/lib/mythtv/recordings/2026_20170803000000.ts' "" "" "" ''
CALLER=mythtv-
PROCESS_RECORDING_MODE=MOVE-
SYMLINK=Enabled-
RECORDING_PATH=/var/lib/mythtv/recordings/2026_20170803000000.ts-
TVDB_SERIESID=84489-
TVMAZE_SERIESID=7186-
TITLE=MasterChef-
SUBTITLE=Holy Cannoli-
SEASON=-
EPISODE=-
MoveFileSize=6290 MB
ConfidenceRating=-6-
ConfidenceReasoning= Attempted Title match on Standard Logic: Successful; Attempted SUBTITLE exact match: Failed; Attempted SUBTITLE fuzzy match: Failed; Attempted match on ORIGINALAIRDATE: Failed. Attempted Plot fuzzy match: Failed;-
MDB_STARTTIME=2017-08-02 18:00:00-06:00-
MDB_PROGRAMID=EP012513470232-
MDB_STORAGEGROUP=Default-
MDB_CATEGORY=Reality-
ProgramIDType=Series With Episode Data-
Zap2itSeriesID=1251347-
Plot=The cooks prepare dishes for a roomful of guests using the guests own ingredients the losing team prepares cannolis in the pressure test.-
[2017-08-08T21:35:56] INFO: ################ END OF OPERATION SUMMARY ################
[2017-08-08T21:35:56] WARNING: Episode could not be matched with supplied information.
@@@@ COMPLETE: 2017-08-08 21:35:56-05:00 @@@@
[2017-08-08T21:35:56] WARNING: NAME COULD NOT BE ASSIGNED BASED UPON DATA SUPPLIED

The series being matched (because it is the title provided by your guide data) is "MasterChef", which is a British series.
Based on the subtitle, I assume what you are recording is "MasterChef (US)", so for this series to process correctly you will need to add a show-translation entry to correct your guide data. That is, add an entry like:
Code:
MasterChef = MasterChef (US)
to a file called showTranslations in myth2kodi's working directory (m2kdir).

Once you have added a show-translation, try processing the recording again and let me know if there are any issues.
find quote
mayaco Offline
Junior Member
Posts: 11
Joined: Jan 2014
Reputation: 0
Post: #95
Dang it! I knew about the show translations as I have to use it a lot. Can't believe I forgot all about that. The show will record tonight. I will let you know how it goes. Thanks
find quote
mayaco Offline
Junior Member
Posts: 11
Joined: Jan 2014
Reputation: 0
Post: #96
Quote:The series being matched (because it is the title provided by your guide data) is "MasterChef", which is a British series.
Based on the subtitle, I assume what you are recording is "MasterChef (US)", so for this series to process correctly you will need to add a show-translation entry to correct your guide data. That is, add an entry like:
Code:
MasterChef = MasterChef (US)
to a file called showTranslations in myth2kodi's working directory (m2kdir).

Once you have added a show-translation, try processing the recording again and let me know if there are any issues.


Yep. Still have issues.

Quote:@@@@ PROCESSING RECORDING: 2017-08-09 22:05:27-05:00 @@@@
myth2kodi Version 1.5.0-beta8 on Linux
[2017-08-09T22:05:27] INFO: Processing: /var/lib/mythtv/recordings/2026_20170810000000.ts
[2017-08-09T22:05:27] INFO: Accessing MythTV DataBase Using PythonBindings.
mythdb_access: WARNING:__main__:No comskip information found.
[2017-08-09T22:05:28] INFO: Processing MythTV database info as SchedulesDirect.
[2017-08-09T22:05:28] INFO: We have existing info for: 'MasterChef'
[2017-08-09T22:05:29] WARNING: Fuzzy subtitle match too fuzzy.
[2017-08-09T22:05:29] WARNING: This version of agrep limits PATTERN to < 32 characters, so cannot do complete Plot match.
[2017-08-09T22:05:29] WARNING: get_absolute_episode_number_fuzzy_plot(): AbsoluteEpisodeNumber guess from full Plot failed or too fuzzy, trying chunked match.
[2017-08-09T22:05:29] WARNING: multi_match_check(): Called with empty Absolute Episode Number guess.
[2017-08-09T22:05:29] WARNING: get_absolute_episode_number_fuzzy_plot(): Chunked Plot match is still too fuzzy, failed to guess AbsoluteEpisodeNumber.
[2017-08-09T22:05:29] WARNING: Failed to identify episode.
[2017-08-09T22:05:29] WARNING: Low episode-confidence-rating (-7), requiring doover.
JOB: myth2kodi '/var/lib/mythtv/recordings/2026_20170810000000.ts' "" "" "" ''
[2017-08-09T22:05:30] INFO: ################ OPERATION SUMMARY ################
CALLER=mythtv-
PROCESS_RECORDING_MODE=MOVE-
SYMLINK=Enabled-
RECORDING_PATH=/var/lib/mythtv/recordings/2026_20170810000000.ts-
TVDB_SERIESID=84489-
TVMAZE_SERIESID=7186-
TITLE=MasterChef-
SUBTITLE=The MasterChef Returns-
SEASON=-
EPISODE=-
MoveFileSize=6310 MB
ConfidenceRating=-6-
ConfidenceReasoning= Have existing series info; Attempted SUBTITLE exact match: Failed; Attempted SUBTITLE fuzzy match: Failed; Attempted match on ORIGINALAIRDATE: Failed. Attempted Plot fuzzy match: Failed;-
MDB_STARTTIME=2017-08-09 18:00:00-06:00-
MDB_PROGRAMID=EP012513470233-
MDB_STORAGEGROUP=Default-
MDB_CATEGORY=Reality-
ProgramIDType=Series With Episode Data-
Zap2itSeriesID=1251347-
Plot=The cooks prepare dishes using ingredients chosen by Shaun ONeale, the reigning champion a coconut-themed elimination challenge.-
[2017-08-09T22:05:30] INFO: ################ END OF OPERATION SUMMARY ################
[2017-08-09T22:05:30] WARNING: Episode could not be matched with supplied information.
[2017-08-09T22:05:30] WARNING: NAME COULD NOT BE ASSIGNED BASED UPON DATA SUPPLIED
@@@@ COMPLETE: 2017-08-09 22:05:30-05:00 @@@@

Show Translations

Quote:##############################################################

#My Guide Show Title = http://www.TheTvDb.com Show Title #
#Battlestar Gallactica = Battlestar Gallactica (2003) #
#The Office = The Office (US) #
#Millionaire = Who Wants To Be A Millionaire #
#Aqua teen Hungerforce = Aqua Teen Hunger Force #
Reckless = Reckless (2014)
How to Get Away With Murder = How to Get Away with Murder
Empire = Empire (2015)
The Odd Couple = The Odd Couple (2015)
Teachers = Teachers (2016)
Timeless = Timeless (2016)
Conviction = Conviction (2016)
The Flash = The Flash (2014)
#MasterChef = MasterChef Junior
MasterChef = MasterChef (US)

##############################################################
(This post was last modified: 2017-08-10 17:21 by mayaco.)
find quote
stuartk Offline
Junior Member
Posts: 49
Joined: Dec 2016
Reputation: 9
Post: #97
(2017-08-10 17:20)mayaco Wrote:  Yep. Still have issues.

Quote:@@@@ PROCESSING RECORDING: 2017-08-09 22:05:27-05:00 @@@@
myth2kodi Version 1.5.0-beta8 on Linux
[2017-08-09T22:05:27] INFO: Processing: /var/lib/mythtv/recordings/2026_20170810000000.ts
[2017-08-09T22:05:27] INFO: Accessing MythTV DataBase Using PythonBindings.
mythdb_access: WARNING:__main__:No comskip information found.
[2017-08-09T22:05:28] INFO: Processing MythTV database info as SchedulesDirect.
[2017-08-09T22:05:28] INFO: We have existing info for: 'MasterChef'
[2017-08-09T22:05:29] WARNING: Fuzzy subtitle match too fuzzy.
[2017-08-09T22:05:29] WARNING: This version of agrep limits PATTERN to < 32 characters, so cannot do complete Plot match.
[2017-08-09T22:05:29] WARNING: get_absolute_episode_number_fuzzy_plot(): AbsoluteEpisodeNumber guess from full Plot failed or too fuzzy, trying chunked match.
[2017-08-09T22:05:29] WARNING: multi_match_check(): Called with empty Absolute Episode Number guess.
[2017-08-09T22:05:29] WARNING: get_absolute_episode_number_fuzzy_plot(): Chunked Plot match is still too fuzzy, failed to guess AbsoluteEpisodeNumber.
[2017-08-09T22:05:29] WARNING: Failed to identify episode.
[2017-08-09T22:05:29] WARNING: Low episode-confidence-rating (-7), requiring doover.
JOB: myth2kodi '/var/lib/mythtv/recordings/2026_20170810000000.ts' "" "" "" ''
[2017-08-09T22:05:30] INFO: ################ OPERATION SUMMARY ################
CALLER=mythtv-
PROCESS_RECORDING_MODE=MOVE-
SYMLINK=Enabled-
RECORDING_PATH=/var/lib/mythtv/recordings/2026_20170810000000.ts-
TVDB_SERIESID=84489-
TVMAZE_SERIESID=7186-
TITLE=MasterChef-
...

From the log you posted, no translation is being found in your showTranslations file, and so myth2kodi is still trying to match against the British series ('MasterChef').

I copy-pasted the showTranslations file from your post and for me it works as expected, so the entry you added is correct. Are you certain that you have added the new entry to the correct file on your system? If you are using the default working directory then for your 'mythtv' user it should evaluate to '/home/mythtv/.myth2kodi/showTranslations'.

Once you have double checked that you have edited the correct file, as a next step, could you run the following commands -- you'll just need to replace '/full/path/to/your' with the directory path you have set as myth2kodi's working-directory (m2kdir).
Code:
TITLE="MasterChef"
grep "^$TITLE = " "/full/path/to/your/showTranslations" | sed "s/$TITLE = //g"
This should produce
Code:
MasterChef (US)
as output, let me know what you get.
find quote
stuartk Offline
Junior Member
Posts: 49
Joined: Dec 2016
Reputation: 9
Post: #98
Updated Release Available (v1.5.0):

Features
  • Changes the access methods for TheTVDB from the v1 API to the v2 API.
    NOTE: The v1 API will be discontinued on October 1st, 2017. At that point, code using the old API will stop getting updated data from TheTVDB. This affects myth2kodi for versions < 1.5.0 and mythicalLibrarian.
  • Adds a hierarchy for user-defined exit-jobs, see the documentation for details.
  • Adds user settings to optionally disable some processing that was previously done unconditionally (see release notes and comments near the new settings for details).

Bug Fixes
  • Consistently handles season=0,episode=0 for all guide-data types.

Other Changes
This release represents the largest code change since the initial release.
There are two important changes to be aware of:
  • With this release the formatting of some of myth2kodi's internal data files has been changed. Conversion from versions <= 1.5.0 will be done automatically, however, downgrading to a previous version after the update is NOT supported. So, it is a good idea to make a backup of myth2kodi's working directory before the update.
  • A large number of myth2kodi's variables have been renamed. So, if you have created a user job that makes use of any of myth2kodi's variables, you should look carefully through the commit history and the new script to determine what changes, if any, you need to make.
For more details see the release notes and the commit history between release 1.4.2 and 1.5.0.


The links provided in the original post of this thread always point to the latest version of myth2kodi.
find quote
stuartk Offline
Junior Member
Posts: 49
Joined: Dec 2016
Reputation: 9
Post: #99
Bug-fix Release Available (v1.5.1):

Bug Fixes
  • Fixes jq option specification for older versions of jq (affects processing of info from TheTVDB and tvmaze).
  • Prevents Kodi password from being emitted in ordinary (non-development) logs.


The links provided in the original post of this thread always point to the latest version of myth2kodi.
find quote
Post Reply