Archive:MythicalLibrarian

From Official Kodi Wiki
Revision as of 21:44, 1 January 2010 by >Outleradam
Jump to navigation Jump to search

This page is under constructions and experiencing technical difficulties --Outleradam 21:21, 31 December 2009 (UTC)

Libraraianlibraryfiles2.jpg
Librarianas.png
Librararianlibraryfile.jpg

The Missing Symlink

MythicalLibrarian will convert your recordings into a library


About The Program mythicalLibrarian is a highly versitile tool designed to assign season and episode numbers to television shows based on show title and episode title so they are easily recognized by XBMC or Boxee. mythicalLibrarian interfaces with TheTvDb to gain information about the target file. mythicalLibrarian also has the ability to interface with MythTV's local database, XBMC's command interface, and Ubuntu GNOME desktop to provide a all-around recording recognition/managing engine which will run in the background of your back-end computer to update your library and provide status updates upon each completed job.

mythicalLibrarian pulls information supplied by your MythTV program guide and, for episodes, makes a fuzzy logic match out of the supplied data. If fuzzy logic is not enough, it will match original air date. For Movies, mythicalLibrarian will rename your MythTV recordings based upon information obtained from the program guide database on your computer. If you allow commercial data to be generated for your shows, mythicalLibrarian will also copy this data with the recordings. mythicalLibrarian allows MythTV to remain in control of the files, so there is no reason not to process your recordings for boxee and XBMC.


mythicalLibrarian will rename your recognizable episodes to:

Show Name.SxxExx (episode title).ext

mythicalLibrarian will rename your movies to

movie title (Year).ext
  • although mythicalLibrarian has no known issues at the present time, mythicalLibrarian is in beta until it goes one month without problem reports.

Please report problems here in the XBMC Forum thread: http://forum.xbmc.org/showthread.php?p=470402#post470402


Installation of mythicalLibrarian

mythicalLibrarian will generate several files of it's own while running. It must have it's own working directory. To the right, you can see an example of the layout of /mythicalLibrarian, the files which it creates and their purposes.

  • Get the current version of mythcalLibrarain from sourceforge [1]
  • Place mythicalLibrarian.sh in /home/mythtv/mythicalLibrarian
mkdir /home/mythtv/mythicalLibrarian
cp /home/yourusername/downloads/mythicallibrarian.sh /home/mythtv/mythicalLibrarian
  • Make mythicalLibrarian executable by typing the following:
sudo chmod +x /home/mythtv/mythicalLibrarian

setting the settings

[Click this link to see the big picture http://wiki.xbmc.org/images/3/39/Mythicalsettings.gif

The user settings are located within the file mythicalLibrarian.sh. In order to change the settings you can edit the file with your favorite text editor. You can see a picture of the settings to the left. To make mythicalLibrarian work to rename and move your library while allowing mythtv or iTivo to remain in control, set the following settings.

  • MoveDir - this is your primary episode move dir.
  • AlternateMoveDir- this is the folder where episodes will be moved if movedir cannot be used
  • FailSafeDir- folder to place links if files cannot be moved
  • PrimaryMovieDir-Folder to place movies
  • AlternateMovieDir- this is where movies will be placed if PrimaryMovieDir fails
  • Database username and password should be mythtv or root by default, but can be tested by opening a terminal and typing
mysql -u*username* -p*password*  #replace *username* and *password* with your mysql username and password

You can leave the rest as default

Use of mythicalLibrarian on MythTV applications

  • Click System/Administration MythTV Baclend setup
  • Select "1. General" then select next until you get to screen 3
  • Check "Follow symbolic links when deleting files".
  • Select next until you get to screen 8
  • Check "Allow user job #1 Jobs"
  • Select next until you get to screen 10
UserJob #1 Description: MythSExx
User Job #1 Command: /home/mythtv/MythSExx/MythSExx.sh  "%TITLE%" "%SUBTITLE%" "%DIR%/%FILE%"
  • Select Finish to exit
  • Select 6. Storage Directories
  • Select Default
  • Add a recording folder to which MythTV has access ie. /home/mythtv/Videos
  • Add additional folders if required.
  • Remove folders to which MythTV cannot run move jobs such as /lib or /var

Use of mythicalLibrarian on non-MythTV Applications

  • edit mythicalLibrarian.sh and set Database=Disabled
  • Set mythicalLibrarian up to run the job as follows:
/home/mythtv/mythicalLibrarian/mythicalLibrarian.sh "Show name" "Show Title" "File to rename"
  • see Setting the Settings in this section

Librarian Interfaces

mythicalLibrarian has the capability to send notifications to the Ubuntu GNOME desktop and keep your XBMC library up-to-date and clean.

XBMC commands

Another Sucessful library addition

mythicalLibrarain can keep XBMC's library up to date, clean out deleted files and send a notification upon a completed job.

  • edit mythicalLibrarian.sh in your text editor
  • set XBMCUpdate, XBMCClean, and XBMCNotify to the desired settings, either Enabled, or Disabled
  • Set the IP and port under XBMCIP eg.
XBMCIP=192.168.1.110:8080

GNOME Desktop notifications

Another Sucessful library addition
  • mythicalLibrarian requires no-password sudo access to send GNOME notifications. this can be a security risk.

GNOME Desktop notifications are used on the back-end machine by mythicalLibrarian to let you know that a file move operation is in process or an operation has completed. The external script librarian-notify-send becomes the specified username and sends a GNOME desktop notification. librarian-notify-send requires the user mythtv to have access to the sudo command without a password if run as a user job.


  • Get the current version of librarian-notify-send from sourceforge [2]
  • place the file in /usr/local/bin
  • add mythtvall group
sudo addgroup mythtvall
  • add mythtv to the mythtvall group
sudo adduser mythtv mythtvall
  • edit the sudoers file
sudo visudo
  • add the following line to the sudoers
%mythtvall ALL=(ALL) NOPASSWD:ALL
  • hit ctrl-x and then y, then enter to write out and quit visudo
  • make librarian-notify-send executable by typing
sudo chmod +x /usr/local/bin/librarian-notify-send
  • edit mythicalLibrarian and set Notify=Enabled and NotifyUserName=*your user name*

You are done.

Notes

[mythicalLibrarian] is a spawn from the project BashSExx and MythSExx. MythSExx can be used if you are strictly trying to rename episodes