MythSExx - A MythTV renamer tool for XBMC
#31
I'm working to make sure that the new version is still compatable with the Tivo, however, it wil not work with database mode enabled.

Here's a screenshot of a sucessful movie movement. All logs checked out today, over 30 recording, no failures with the exception of missing guide data.
Image
Use mythicalLibrarian to make a library out of your MythTV files. Leave the recording to MythTV and use XBMC as your library.
Installation and Instructions:http://wiki.xbmc.org/index.php?title=MythicalLibrarian
Technical Support:http://forum.xbmc.org/showthread.php?tid=65644
[url=http://forum.xda-developers.com/showthread.php?tid=1081892][/url]
Reply
#32
outleradam Wrote:I'm working to make sure that the new version is still compatable with the Tivo, however, it wil not work with database mode enabled.
Are you saying that the script will handle files downloaded from a TiVo? That would be fantastic!
Reply
#33
Yes, it does.
A quick search of the internet reveals
http://tivocommunity.com/tivo-vb/showthr...?p=7669755

However, I am currently working on a newer version of the script which is called mythicalLibrarian with better recognition. Still a few bugs to sort out on it though. You can find a beta here http://wiki.xbmc.org/?title=MythicalLibrarian

It is far superior, however, beta.
Use mythicalLibrarian to make a library out of your MythTV files. Leave the recording to MythTV and use XBMC as your library.
Installation and Instructions:http://wiki.xbmc.org/index.php?title=MythicalLibrarian
Technical Support:http://forum.xbmc.org/showthread.php?tid=65644
[url=http://forum.xda-developers.com/showthread.php?tid=1081892][/url]
Reply
#34
outleradam Wrote:Yes, it does.
A quick search of the internet reveals
http://tivocommunity.com/tivo-vb/showthr...?p=7669755

However, I am currently working on a newer version of the script which is called mythicalLibrarian with better recognition. Still a few bugs to sort out on it though. You can find a beta here http://wiki.xbmc.org/?title=MythicalLibrarian

It is far superior, however, beta.

Does either script use the metadata from the iTiVo program to rename the media files?
Reply
#35
No, not at all.

If you would like to branch the script in another direction, the only thing that will have to be rewritten is the "database" section.

Code:
#####GATHER INFORMATION FROM MYTHTV DATABASE#####

#Get information if database is enabled
if [ "$Database" = Enabled ]; then

#get chanid for recordings to identify program table
    ChanID=`mysql -u$MySQLuser -p$MySQLpass -e "use '$MySQLMythDb' ; select chanid from recorded where basename like '$FileBaseName';"|sed -n 2p|replace "chanid" ""|replace " " ""`
  
#get ProgramID from recorded to identify program
    ProgramID=`mysql -u$MySQLuser -p$MySQLpass -e "use '$MySQLMythDb' ; select programid from recorded where basename like '$FileBaseName' ; " |sed -n "2p"|replace "starttime" ""`
    mythicalLibrarianProgramIDCheck=${ProgramID:0:2}

#Extrapolate data from Programid
    echo Check: $mythicalLibrarianProgramIDCheck
    test "$mythicalLibrarianProgramIDCheck" = "SH" && ProgramIDType="Generic Episode With No Data"
    test "$mythicalLibrarianProgramIDCheck" = "MV" && ProgramIDType="Movie"
    test "$mythicalLibrarianProgramIDCheck" = "EP" && ProgramIDType="Series With Episode Data"

#if the ProgramID does not meet criteria, then end the program
    if [ "$ProgramIDType" = "Generic Episode With No Data" ]; then
        echo "PROGRAM GUIDE DATA IS NOT COMPLETE.  TYPE: $ProgramIDType">>"$mythicalLibrarian"/output.log
        echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%">>"$mythicalLibrarian"/output.log
        echo "%%%%%%%%%%GENERIC GUIDE DATA WAS SUPPLIED $1, $2">>"$mythicalLibrarian"/output.log
        echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%">>"$mythicalLibrarian"/output.log
          if [ $Notify = "Enabled" ]; then
            sudo -u "$NotifyUserName" /usr/local/bin/librarian-notify-send "mythicalLibrarian Guide error" "Could not obtain enough information for library: $ProgramIDType" error
        fi
          echo $mythicalLibrarian'/mythicalLibrarian.sh "'$1'" "'$2'" "'$3'"'>>$mythicalLibrarian/doover.sh
        exit 1
    fi



#get show start time to identify program ----future development
    ShowStartTime=`mysql -u$MySQLuser -p$MySQLpass -e "use '$MySQLMythDb' ; select starttime from recorded where basename like '$FileBaseName' ; " |sed -n "2p"|replace "starttime" ""`

#get category from recorded to identify program table -----future development
    ShowCategory=`mysql -u$MySQLuser -p$MySQLpass -e "use '$MySQLMythDb' ; select category from recorded where basename like '$FileBaseName' ; " |sed -n "2p"|replace "category" ""`

#get original air date for tv shows
    OriginalAirDate=`mysql -u$MySQLuser -p$MySQLpass -e "use '$MySQLMythDb' ; select originalairdate from recorded where basename like '$FileBaseName' ; "|sed -n "2p"|replace "originalairdate" ""`
    test "$OriginalAirDate" = "0000-00-00" && OriginalAirDate="$null"

#get year for movies
    MovieAirDate=`mysql -u$MySQLuser -p$MySQLpass -e "use '$MySQLMythDb' ; select airdate from recordedprogram where programid like '$ProgramID' and chanid like '$ChanID' ; "|replace "airdate" ""|sed -n "2p"|replace " " ""`

#Blank year if it is invalid
    if [ "$MovieAirDate" != "" ]; then
        if [ "$MovieAirDate" -lt "1900" ]; then
            MovieAirDate=""
        fi
    fi

#Report found data
    echo RECSTART:$ShowStartTime MOVIEYEAR:$MovieAirDate SERIESDATE:$OriginalAirDate
    echo PROGRAMID:$ProgramID ShowCategory:$ShowCategory

This is the section which is speciffic to mythtv support. If you can find a way to define those last 5 variables, from your Tivo, and generate a comskipstart frames file, and comskipstop frames file, then you will have full movie, error checking, and comskip functionality.

However, mythicalLibrarian, when finished, will function better then mythSExx for Tivo users as well. Just disable the database. The framework is in place, it just needs reworking. If you can obtain metadata from the Tivo, I will make database a tristate varaible, MythTV|iTivo|Disabled.
Use mythicalLibrarian to make a library out of your MythTV files. Leave the recording to MythTV and use XBMC as your library.
Installation and Instructions:http://wiki.xbmc.org/index.php?title=MythicalLibrarian
Technical Support:http://forum.xbmc.org/showthread.php?tid=65644
[url=http://forum.xda-developers.com/showthread.php?tid=1081892][/url]
Reply
#36
outleradam Wrote:No, not at all.
OK, no problem. But I am curious what you meant by this:

outleradam Wrote:I'm working to make sure that the new version is still compatable with the Tivo, however, it wil not work with database mode enabled.

What exactly do you mean by "...compatable with the Tivo..."? Like I said, just curious. Thanks!
Reply
#37
It will stil rename a file like it always has. It just will not work in database mode. It's very very tempting to make mythtv database a requirement, however, I have been testing along the way to make sure it is not. Rewriting blocks of code which require the database to being blocks of code that will work with or without the database is part of compatability.

For example... I undid a series of changes that made it possible for a mythtv user to call mythicalLibrarian <File Name>. The database could take care of the rest. It's more efficient, but incompatable with tivo. The next version may see a change from "title", "subtitle", "filename" to "filename" "title" "subtitle". that would make title and subtitle optional. The removed functionality was the same as mythrename. After making that change, I decided it was time to just debug and stop adding features. So I'm in the process of finalizing this script now.

what sort of metadata does the itivo use?
Use mythicalLibrarian to make a library out of your MythTV files. Leave the recording to MythTV and use XBMC as your library.
Installation and Instructions:http://wiki.xbmc.org/index.php?title=MythicalLibrarian
Technical Support:http://forum.xbmc.org/showthread.php?tid=65644
[url=http://forum.xda-developers.com/showthread.php?tid=1081892][/url]
Reply
#38
outleradam Wrote:It will stil rename a file like it always has. It just will not work in database mode. It's very very tempting to make mythtv database a requirement, however, I have been testing along the way to make sure it is not. Rewriting blocks of code which require the database to being blocks of code that will work with or without the database is part of compatability.

For example... I undid a series of changes that made it possible for a mythtv user to call mythicalLibrarian <File Name>. The database could take care of the rest. It's more efficient, but incompatable with tivo. The next version may see a change from "title", "subtitle", "filename" to "filename" "title" "subtitle". that would make title and subtitle optional. The removed functionality was the same as mythrename. After making that change, I decided it was time to just debug and stop adding features. So I'm in the process of finalizing this script now.

what sort of metadata does the itivo use?

OK I understand now. Thanks for clarifying.

Here's an example of the metadata file that's produced by iTiVo:

Code:
time : 2009-12-18T11:00:00Z
vActor : Ritter|John
vActor : DeLisle|Grey
vActor : Mitchell|Kel
vActor : Summer|Cree
vActor : Soucie|Kath
vActor : Clarke|Cam
vActor : Carson|Terrence "T.C."
vActor : Grey|Gary Leroi
description : The adventures of an oversized canine.
vProgramGenre : Animated
vProgramGenre : Kids
vProgramGenre : Educational
isEpisode : false
originalAirDate : 2000-09-04T00:00:00Z
vSeriesGenre : Animated
vSeriesGenre : Kids
vSeriesGenre : Educational
vSeriesGenre : Interests
vSeriesGenre : Kids
vSeriesGenre : Educational
seriesTitle : Clifford the Big Red Dog
title : Clifford the Big Red Dog
startTime : 2009-12-18T10:59:58Z
stopTime : 2009-12-18T11:29:58Z
seriesID = SH387968
displayMajorNumber = 26
callsign = WETA

So in this case two files are produced, the media file and the metadata file:

Code:
Clifford the Big Red Dog - 2592570.mpg
Clifford the Big Red Dog - 2592570.mpg.txt

It would be awesome if your script could parse the iTiVo metadata (originalAirDate) to rename the media file! You'd make a lot of iTiVo with Plex/XBMC/Myth users very happy! Smile
Reply
#39
where does Tivo get your guide data?

Here's the guide data I need: a couple of episodes with no identifiable information. a couple of movies, and a couple of episodes with episode information. a few episodes with special characters. a couple of combined episodes.

The channel NIK does not supply guide data for old episodes of Sponge Bob during the day.

Fairly oddparents and wordgirl combine their 15 minute episodes.

Startrek: the next generation has a special character

The news has no episode information ever

Movies... I need a few random examples.
Use mythicalLibrarian to make a library out of your MythTV files. Leave the recording to MythTV and use XBMC as your library.
Installation and Instructions:http://wiki.xbmc.org/index.php?title=MythicalLibrarian
Technical Support:http://forum.xbmc.org/showthread.php?tid=65644
[url=http://forum.xda-developers.com/showthread.php?tid=1081892][/url]
Reply
#40
... on seccond thought, it may be more beneficial for you to submit a feature request as tivo is a very common format, it should have native support.
Use mythicalLibrarian to make a library out of your MythTV files. Leave the recording to MythTV and use XBMC as your library.
Installation and Instructions:http://wiki.xbmc.org/index.php?title=MythicalLibrarian
Technical Support:http://forum.xbmc.org/showthread.php?tid=65644
[url=http://forum.xda-developers.com/showthread.php?tid=1081892][/url]
Reply
#41
outleradam Wrote:... on seccond thought, it may be more beneficial for you to submit a feature request as tivo is a very common format, it should have native support.

Submit a feature request to whom?
Reply
#42
Why, in this forum http://forum.xbmc.org/forumdisplay.php?fid=9

If there is no positive response I would be happy to build tivo support into mythicalLibrarian
Use mythicalLibrarian to make a library out of your MythTV files. Leave the recording to MythTV and use XBMC as your library.
Installation and Instructions:http://wiki.xbmc.org/index.php?title=MythicalLibrarian
Technical Support:http://forum.xbmc.org/showthread.php?tid=65644
[url=http://forum.xda-developers.com/showthread.php?tid=1081892][/url]
Reply
#43
I know I said there would not be any more features until the actual release, however I've added a couple for checking on jobs.
These features update the XBMC Library, Clean out the rubish in the XBMC Library that has been left behind when the files were deleted, and send notifications to the XBMC UI that it is updating the library.

These features are supported by all current users.
Use mythicalLibrarian to make a library out of your MythTV files. Leave the recording to MythTV and use XBMC as your library.
Installation and Instructions:http://wiki.xbmc.org/index.php?title=MythicalLibrarian
Technical Support:http://forum.xbmc.org/showthread.php?tid=65644
[url=http://forum.xda-developers.com/showthread.php?tid=1081892][/url]
Reply
#44
Hey, just browsing around the forum... I don't use Myth, but it was your sig that caught my eye. Funny, we both came from Hyundai forums (I started crookedh.com and subsequently sold it) and we're both making tools for XBMC.... small world. Wink I drive (well, used to) an 04 Tib: http://www.crookedh.com/forum/showthread.php?t=1523 It has been sitting in my driveway for a year after a return-to-stock-gone-bad. lol Missing 3 critical pieces and have been out of the H loop for so long I don't even know where to begin looking for them any more. *sigh* You have a nice car... what all have you done to it??

Anyway, sorry to OT your thread. Back to your regularly scheduled program....
_______________Ember Media Manager_______________
Website | Download | Report Issues/Feature Requests | Donate

______________Show Your Appreciation______________
Donate to XBMC | Donate to TMDB | Donate to theTVDB
Reply
#45
Well, I go by DTN or DrivingTibNaked on the Hyundai sites. I've won about 10 car shows with my car. I'm a forum moderator on Hyundai Aftermarket, I'm the #2 poster on RDTiburon.com with about 9500 posts and I'm a member of all the US Hyundai sites. Here's a link to my garage page on RDTiburon. http://www.rdtiburon.com/index.php?&auto...tem&CID=15
I havn't updated it in a while though and I need better pictures, but you get the idea, it's well rounded and heavily modified.
Oh, yeah, I also did most of the banner art for the site in the link.


I've run into some serious problems with recognition of certain shows.

1. Programs with the word "and" are being interperated as & by one of the steps along the way and read out as "&amp;" when catted back into the program, then when the file is renamed the word "and" comes out as "amp". So Futurama "Fry and the Slurm Factory" comes out as Futurama "Fry amp the Slurm Factory". I didn't notice it at first, but I consider this to be very serious so I will conduct testing with multiple key words to ensure that no other undesired translations occour.

2.The other issue is keeping track of comskip files. For some reason the comskip.track file (used to keep track and delete orphaned comskip files) is not keeping track of the comskip files. Either, the comskip.track is being overwritten each time the script runs, or the maintenance routine is killing the comskip.track

I am working to fix the problems soon, so I have my computer set up to record 48 1/2 hour block shows per day. This will ensure that I have proper data for testing... This could be considered a hard drive test as well!
Use mythicalLibrarian to make a library out of your MythTV files. Leave the recording to MythTV and use XBMC as your library.
Installation and Instructions:http://wiki.xbmc.org/index.php?title=MythicalLibrarian
Technical Support:http://forum.xbmc.org/showthread.php?tid=65644
[url=http://forum.xda-developers.com/showthread.php?tid=1081892][/url]
Reply

Logout Mark Read Team Forum Stats Members Help
MythSExx - A MythTV renamer tool for XBMC0