LinHES Forums

Low power myth architecture
Page 2 of 3

Author:  outleradam [ Fri Apr 16, 2010 11:41 am ]
Post subject: 

Just to clarify, in case my last post was too vauge...

mythicalLibrarian will use the database in case the proper information is not available. If it uses the database, then the file is flagged for doover and when "mythicalLibrarian --doover" is run, the file is properly renamed with season and episode.

mythicalLibrarian also handles sports and news using strictly the database like this:
College football S2010E416 (tigers vs lions recorded @ 2010-04-16 12:00:00).mpg

mythicalLibrarian is the best soloution available.

Author:  marc.aronson [ Fri Apr 16, 2010 9:25 pm ]
Post subject: 

outleradam wrote:
mythicalLibrarian is the best soloution available.

Glad that you feel good about your script and I am sure that quite a few people out there find it very valuable.

I wanted a solution that did not depend on any form of "guessing" or "fuzzy logic" to get to the right outcome -- I wanted a guaranteed 100% correct-outcome rate. The script I've developed derives all info from the mythtv environment. It makes no attempt to figure out the series and episode number, but all shows are listed in the order they were recorded. I'm using the last 4 digits of the "programid" field as the episode number, which is a reasonable proxy. ie, This number increases as the season # and episode # increase. Episode title and synopsis come from the database and thumbnails come from the ".png" file generated by the myth backend.

mihanson, I'll provide you a copy in the next week or two -- I'm almost done. The newest version has a command line parser and built in help, which I think solves the "text based documentation" problem. Just need to nail down a final problem with character encoding that Nathan is hitting -- its not blowing up anymore, but looks like some of the characters aren't coming out right. Learning more about unicode, UTF-8 and character set translations than I intended to :-).

Author:  outleradam [ Wed Apr 28, 2010 12:13 pm ]
Post subject: 

Well, I'm working on a castrated database processor which will allow the same functionality of those other scripts. It is designed to process Japaneese programming as well as others, but the user will have the option if they have SchedulesDirect, Zap2it, tvguide, Tribune or any of the others which include Zap2it IDs.

Author:  marc.aronson [ Sun May 09, 2010 4:43 pm ]
Post subject: 

I just deleted my post from yesterday, so if you noticed it "came and go", sorry for the confusion.

Here are the instrucitons for using these scripts.

Mike (mihansen), there are a total of 3 scripts and they are ready to be put int the repository. The main script will provide instructions if called with the "--help" option:

# --help
usage: [options]

Generates various directories and files so that you can use XBMC as a front
end to your mythtv system. The best choice is to create a cronjob that runs
this script every 30 minutes. This will result in a subdirectory named XBMC
being created under each of your mythtv storage directories. In XBMC, create
one source for each mythtv storage directory and point it at the XBMC
subdirectory this script creates. When you update the XBMC library you will
see all of your recordings, complete with  thumbnail and episode synopsis.
Note that this scrpt and the scripts '' and '' must
all be placed in the same directory. For more details see

  --version             show program's version number and exit
  -h, --help            show this help message and exit
  --outdir=SUBDIR       Name of subdirectory for XBMC-friendly links. Default
                        is XBMC
  --moviedir=SUBDIR     Name of subdirectory where all movies should be
                        placed. Default is a separate subdirectory per movie.
                        Obtain mythtv data from mysql database DBNAME on HOST.
                        Defaults are HOST=localhost, DBNAME=mythconverg,
                        USERNAME=mythtv, PASSWORD=mythtv
  --update=HOST MAC     Sends request to HOST to update its XBMC library if
                        any new episodes have been added. Optionally send a
                        wake-on-LAN packet first if MAC address is provided.
                        If you don't want a WOL packet sent, specify a MAC
                        address of 0. Default = no library update is done.
  --force               Forces re-generation of existing NFO & commskip files.
                        Default behavior is to not do anything to existng NFO
                        & commskip files.
  -d, --debug           Turns on debug mode
  --noxqt               Don't create any directoreis or links -- just print
                        out debug info.
  --marc                For use only by the original author. Sets defaults
                        useful for my system.

Post updated at 17:22PST to reflect new URL for downloading the scripts.

Author:  nharris [ Sun May 09, 2010 5:30 pm ]
Post subject: 

This is awesome Marc! Thanks for the contribution.

Author:  marc.aronson [ Sun May 09, 2010 6:23 pm ]
Post subject: 

nharris wrote:
This is awesome Marc! Thanks for the contribution.

Nathan, glad you like it and thanks for your help sorting out the character encoding problems!

Author:  mihanson [ Sun May 09, 2010 6:52 pm ]
Post subject: 

Thanks marc. I'll probably get to this tomorrow afternoon PDT.

Author:  mihanson [ Mon May 10, 2010 10:55 pm ]
Post subject: 

Now a part of the mythtv-contrib package in LinHES 6.02 testing repos.

Author:  outleradam [ Sat May 22, 2010 10:28 am ]
Post subject: 

You really should be using mythicalLibrarian.

adam@adam-desktop:~$ mythicalLibrarian --help
 mythicalLibrarian --:invalid pattern

usage: mythicalLibrarian 'path/to/file' ['title'] ['subtitle']
usage: mythicalLibrarian --mode [parameter] [parameter]
 items in brackets are [context sensitve]

Author: Adam Outler outleradam(at)

  diagnostics: tests functions of mythicalLibrarian
  eg. mythicalLibrarian --mythicalDiagnostics

-s|--scan filetype /path/to/folder
  scan: creates a library from an entire folder
  eg. mythicalLibrarian --scan mpg /home/mythtv/videos

  doMaintenance: removes FOLDER DISCONNECTED errors from logs
  eg. mythicalLibrarian --doMaintenance

  update: mythicalLibrarian to the current version
  eg. sudo mythicalLibrarian --update

  eg. sudo mythicalLibrarian --doover
  doover: reruns previously failed jobs sequentially

  undo: returns all files to original states
  eg. sudo mythicalLibrarian --undo

  example: mythicalLibrarian --help
  Help: displays this message
 ensure you have set the user settings properly and run
 --mythicalDiagnostics before using mythicalLibrarian
 in --scan mode or as a UserJob.

to install
sudo apt-get install curl
mkdir ~/.mythicalLibrarian && mkdir ~/.mythicalLibrarian/mythicalSetup
cd ~/.mythicalLibrarian/mythicalSetup
sudo chmod +x ./ && sudo ./
and the script does the rest. You just have to specify that you want the user job to be run on each recording.

Author:  marc.aronson [ Sat May 22, 2010 12:19 pm ]
Post subject: 

outleradam wrote:
You really should be using mythicalLibrarian.


Author:  outleradam [ Sat May 29, 2010 8:25 am ]
Post subject: 

well, you can review all the revisions here:

...or you can take my word that the commercial skipping, database extraction, naming conventions, RSS feeds, POSIX compliance, File management, cleanup routines, NFO files, updater, showTranslations, categoric naming, MythTV, XBMC and Boxee compatibility is fully unmatched by any commercial or free application available... All features are fire-and-forget. You set it up properly, and it runs. It's perfect for a distribution.

Author:  marc.aronson [ Sun Jun 13, 2010 8:57 am ]
Post subject: 

Updated version of xbmc_mythlink.tgzavailable -- change log at top of describes the changes. Most significant fix is to properly clean up dead links when multiple storage groups OR multiple directories are used within any storage group.

Author:  outleradam [ Thu Jun 17, 2010 7:33 pm ]
Post subject: 

if you tell mythicalLibrarian during setup that you do not have a supported guide data type, then it will operate like mythlink on steroids.

Author:  outleradam [ Wed May 25, 2011 1:50 pm ]
Post subject: 

Just wanted to add this..

I've revised mythicalLibrarian to use a 10 point confidence matching algorythem. The confidence algorythem goes from -6 to +4. Anything lower then +1 is automatically placed in que to be rematched at a later time. Generally, 0 should be considered a good match.

The points are based on
Zap2It ID match
Original Airdate

In the event that a Zap2It ID match is made, the Title is matched to add a +2 to the rating, or a +1 if fuzzy logic is used if both searches align up. In the event that an Original Airdate was matched, the Subtitle is matched...

In the event that 2 shows have the same original airdate, there is an instance match performed.

Instead of just relying on fuzzy logic, confidence levels are assigned. generally mythicalLibrarian sees a +4 confidence level.

CONFIDENCE:4 LOGIC PATH:  Attempted Match On Zap2itID: Sucessful; Attemped match on OriginalAirDate: Sucessful;  Verified with Standard logic; Verified with Fuzzy logic;
JOB: mythicalLibrarian '/home/mythtv/recorded/2074_20101228151000.mpg' 'Ghost Whisperer' 'On Thin Ice'
TARGET SET:/home/mythtv/recorded/Episodes/Ghost Whisperer/Season 5/Ghost Whisperer S05E17 (On Thin Ice).mpg
MOVED: /home/mythtv/recorded/2074_20101228151000.mpg
TO: /home/mythtv/recorded/Episodes/Ghost Whisperer/Season 5/Ghost Whisperer S05E17 (On Thin Ice).mpg 

This quite literally changes the "black art" of tv show matching into a science.

You can make a user job in mythicalLibrarian to notify you if the confidence level on a show is below +3.... But, even if it's not possible to match an episode, you still get a great naming convention of Title(S0E0)Subtitle.mpg

Author:  outleradam [ Wed May 25, 2011 1:53 pm ]
Post subject: 

If you'd like more information about the new matching scheme, click here: ... ry-part-2/

Page 2 of 3 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group