Kodi Community Forum
mythicalLibrarian - a tool to build Movie and TV Show library from MythTV recordings - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116)
+--- Thread: mythicalLibrarian - a tool to build Movie and TV Show library from MythTV recordings (/showthread.php?tid=65644)



- am4c130d - 2010-02-03

I am running Ubuntu Karmic x64 Server edition where I am running mythicalLibrarian - I believe you are also on Karmic yes?

The checks, now that you have explained them, are actually not relevant to me, but I do see why you want them - my XBMC TV directory is on the same filesystem as my mythtv directory - so if there is enough space to create them in myth, then there's enough to move them. However, I'll make the changes you suggested and let you know which worked.

I am running in to three other problems - not related to this one.

1. All Shows with have a EPID of SHxxxxx are simply ignored, I have a few specials for my kids that are present on TheTVDB, but the script exits when that EPID is detected without trying TheTVDB.
2. No sports programs seem to work. I watch Rugby on Setanta, and TheTVDB refuses to host sports programs, so there is no validation, other than the entry in Myth. However, Schedules Direct does seem to do a pretty good job of capturing the match names etc., so all the info I care (tournament, participants, game date - that should be enough to create a unique entry) about is there. I suspect that I will need to do more than capture the commerical skips and move the file, will probably need an NFO for XBMC in library mode to recognise the show and display it (don't have the experience to be 100% yet) - do you have plans for that?
3. This is a weird one - more details later. But basically, when I have a new show, that has no episode information in Myth, the script works well, and captures all the relevant stuff from TheTVDB. When the next episode in the same series comes along, the script claims not enough information. If, however, I delete the directory entry from ~/mythicalLibrarian of the show, then rerun the script it works straight away. There seems to be something in creating the show directory in the database that is needed.

Anyway, from my perspective, still making excellent progress - thanks for the pointers.


- outleradam - 2010-02-03

to address your problems:

problem1: mythicalLibrarian will only handle shows which can be filed in a library, namely XBMC's library. Movies and episodes are given a MV Identification type and Episodes are given a EP Identification Type. When you have a generic episode, it is given a SH Identification Type. mythicalLibrarian cannot handle SHIT because there is no way to file it into the XBMC library. I have code written to assign a NFO file to the SHITs but for now, there is no way to put SHIT into the library.

problem2: same as problem1. XBMC does not handle SHIT in it's library. Only MVIT and EPIT are allowed.

problem3: Was this a first run issue only? The mythicalLibrarian database structure changed substantially recently, which requires removal of all database and working files.

I hope to see the results of your testing soon. I cannot reproduce them on my end, or this would have been corrected a long time ago.


- am4c130d - 2010-02-04

OK tested all three scenarios - all failed. Went back to original code - echo'ed out the values in the check perms subroutine - all were clearly the right values - so your variables were always passed correctly internally.

Went back to looking at the first if statement - which was where the problem seemed to be to me. In the version I have, first "if" reads

Code:
if [ "$2" = "" ] && [ "$1" != "" ] && [ $1 -lt $2 ]; then
Which I now understands, if there is no disk space, and the file size is not zero, and the file size is smaller than the available disk space, then excute. This can obviously never be true.

Changed it to invert the test on the file system - i.e. if there is space
Code:
if [ "$2" != "" ] && [ "$1" != "" ] && [ $1 -lt $2 ]; then

which is more logical - now works as expected!

I would guess that I had hacked it, broke it and had lousy tracking (all of which I am liable to do) if Watson540 wasn't experiencing the same problem. Is it worth checking what's posted? The version info on mine is

Code:
#! /bin/bash
#mythicalLibrarian by Adam Outler
#Wed, 29Jan2010 2155
#email: [email protected]
#Software the way it should be: Free and Open Source
#Please contact me with any bug reports
#Tech Support: http://forum.xbmc.org/showthread.php?p=470402#post470402
#Feature Request: http://forum.xbmc.org/showthread.php?tid=65769

To my three problems
1. OK, so being on TvDB is not enough, it has to be an episode of a season of a show, OR a movie - if its a one off show - tough - until your NFO code is ready.
2. As I feared - so, let me know if you want to try your NFO code out on a guinea pig, I'd be happy to help. I can run this just against the sports events which only I care about so no one else impacted.
It seems to me for both 1 and 2, an NFO with show name, episode (though nothing in 1), plot and original airdate could all be obtained from the Myth database- and a file so named would ensure uniqueness. The only thing missing would be specific art info - which for saved shows, personally I'd be happy to manually edit, for time shifted shows - I don't care. I also appreciate I'm not doing the work, so this is my wish list!
3. Cleaned out the directories, I record Daily Show and Colbert Report nightly - both of which failed last night once I upgraded. I just tested a show that should have failed, and worked - so I expect this to work.

Very good - things are moving along really nicely with mythicalLibrarian - thanks for writing this! Please do let me know if you want some testing help on the NFO stuff. I may look at it myself - but I know my scripting skills are pretty poor.


- outleradam - 2010-02-04

^^ Holy hole in a doughnut!!! Grab the SVN and it will work fine. I don't know how that ! got erased. I will change that tonight.

I am trying to find out how to implement NFOs.
http://forum.xbmc.org/showthread.php?tid=69441

The problem is that a library has to be categorically filed and the XBMC library depends on season and episode number, or movie title.


- outleradam - 2010-02-04

Fixed. Added a whoami and guide data type to the logs. optimized logging data.
new version here: http://mythicallibrarian.googlecode.com/files/mythicalLibrarian.sh
SVN Here:http://mythicallibrarian.googlecode.com/svn/trunk/mythicalLibrarian.sh

Let me know if anything needs changing.


- watson540 - 2010-02-04

have you worked in the mc2xml stuff yet? i havent been running thhe script as i turned it off until stuff works out.
i would like to integrate the scripts once more once the mc2xml stuff is in. i dont care about adding info to generic names and episodees (like s[pngebob) I just need some sort of failsafe where it will still add it to the library (if anything, you could have it added to a different folder)


- outleradam - 2010-02-04

The problem with generic episodes is that they are not supported by XBMC. TeamXBMC is working on a unified PVR front-end project now. I started this thread http://forum.xbmc.org/showthread.php?tid=69441
That's really all I can do about generic shows. As of right now, Shows are not able to be put into the library and nickelodeon has a bunch of those SpongeBob shows. I filter out generic shows from being recorded through mythweb.

I'm expecting information very soon on how to properly add shows to the library, but as of right now, I can only get the information in place. I would rather not do it wrong.

I'm still working on the mc2xml data.


- am4c130d - 2010-02-04

Thanks for flagging this upwards - or to a broader community.

I've been thinking about the sports nfos, or at least played with it a little - I'll give it more thought and post to your new thread. I had a solution that met my goals - you mentioned I had to have a season and episode - oh well.

For the one offs, I simply linked them across, created an nfo with a URL to IMDB - works great. Unwittingly I put them in my movie repository, so I guess I was lucky...


- watson540 - 2010-02-04

let me know if you need anything else exported out of my mythconverg databsase to help you on our way


- outleradam - 2010-02-04

I think we are good to go: http://forum.xbmc.org/showthread.php?tid=65769&page=4

Just about to add the code.


- outleradam - 2010-02-04

Added MC2XML support

With MC2XML support came a fix for random MV/SH data at TheTvDb.com. So, this is even better. Upgrade, and make sure you delete ALL working files/database leave only: *.tracking, doover.sh and showtranslations.

MC2XML is grouped with SchedulesDirect, Zap2it, Tribune, and Tivo.


- watson540 - 2010-02-04

awesome ..thanks


- watson540 - 2010-02-04

how about the EDL stuff , you never said wwhether that actually worked for you. anyone else care to comment on this??

Im sort of wary of going back to this, cause it doesnt add generic episodes in some way or the other, even with made up season and ep numbers..go for everything going in season 99 for all i care and have random made up episodes in season 99..

thing is, by the time i modded confluence to show the data already in my mythbackend (ok I cant take credit for that as all i did was use a download viewsfilemode.xml), and modded fonts.xml to show me a readable font from 20 feet away, I've got pretty much everything but the pretty scraped art. I can delete shows, and they really delete, I can watch a show, and it really skips commercials, and best of all, I can see all of my generic episodes..I have kids, kids love spongebob, so as much as id love to ignore generics like you, thats not what gets me my few hours of "peace and quiet" every day Smile

edit ps..i do gety SOME art as mythbackend shows me a snippet of the nuv preview file it makes Smile.its quite beautiful.starting to think all i needed all along was for someone to actually make a script with mythtv in mind


- outleradam - 2010-02-04

well, yeah, kids love spongebob, but with spongebob set to a -20 recording preference, over the last month I've recorded about 40 episodes of sponge bob. At one time I had 70. Between that, word girl and a few others, there's no need to record the generics, and after 70 episodes they've forgotten the first one anyways Wink That's beside the point though.

I'm still pushing the generic episode addition into XBMC. If ANYONE has a good idea of how to import a show, please tell me. I have no idea on how to manually import a show without episode data.

If I can manually edit the mysql and throw the file location in there, then I'd be more then happy to do so. I don't know the XBMC DB at all.


- watson540 - 2010-02-04

cant you just give it fake/random episode numbers and just keep it in season 99?