Hey all.
I've been doing some updates on jncl's great script. He's pulled in one of my requests (ability to specify a remote MySQL server), but hasn't posted an update here yet. You can get this update my pulling joncl's master branch.
I also have a few more fixes which he hasn't pulled yet, including a small bug that prevented TTVDB lookups for working properly at all with the inetref and a fix for an issue where some (but not all) artwork existed for a show on TTVDB. Now it will download whatever artwork is available (previously it seemed to be an all or nothing affair for downloaded artwork). As well, the option to specify a symlink or a hardlink for the destination.
Note There is a configuration change that will affect you with this: the old symlinks_dir configuration item has been renamed to destination_dir.
Note 2: This is not highly tested by me. It works for what I'm doing, but YMMV :-) This is all in my master branch:
https://github.com/TravellingGuy/myth2kodi
ALSO, as I was working on this stuff, I got to thinking that (for my purposes anyway), the myth2kodi script was trying to do too much. For me, I'm only using MythTV backend (not the front-end). I'll only ever watch recorded shows imported into the Kodi library. This started me down a road of gutting large bits of the script, and I'm calling it myth2kodi-simplified. If you want to track this, it's the simplified branch in my github.
What's different?
In short, I'm letting Kodi handle all the heavy lifting when it comes to downloaded metadata and artwork.
To this end, some of the changes:
- write out Kodi compatible filenames. Format: <title> - S##E## - <subtitle>.ext
- use the tv show title as it comes from TTVDB, not from MythTV. This allows Kodi to easily find a match and download everything it needs.
- it requires that you're MythTV recordings have a ttvdb inetref.
- it's not trying to create "safe" title names. This may break things (especially on Windows), but I don't use Windows, just Linux and so far so good.
- a fix to ignore recordings in the "Deleted" recording group.
- the clean() function is gone
- option to use hardlinks or symlinks when linking the file to Kodi. For me, hardlinks are preferred, as once a file gets into the Kodi library, the recording can be deleted from MythTV.
Caveats:
- the movie lookup stuff is not something I have used at all, it may be completely broken!
- as mentioned above, I'm not trying to use "safe" title names for filenames...this may break things if a title has very strange characters, but if we can keep the original title as much as possible, it helps Kodi find a match when it's looking for metadata and artwork.
- it "works for me", but most scenarios are not well tested (if tested at all), so things may break for you.
- lots of extraneous code is still in place, lots of cleanup yet to be done.
Once again, I need to thank jncl for the original script, or this would not have happened. He did all the heavy lifting ahead of me!