XBMC will be renamed to Kodi for v14. Read here for more details

HOW-TO:Set up a TV show library, MythicalLibrarian

From Kodi
(Difference between pages)
Jump to: navigation, search
 
(Troubleshooting)
 
Line 1: Line 1:
:<big>'''See [[Adding videos to the library]]''' for a recent (XBMC v11, Eden) guide on setting up the video library. </big>
+
[[Image:Librarianas.png|left|200px|diagram of how mythicalLibrarian works]]Newest version was released --[[User:Outleradam|Outleradam]] 00:54, 8 January 2010 (UTC)
{{outdated}}
+
[[Image:Libraraianlibraryfiles2.jpg|right|200px|actual picture from XBMC with recordings from MythTV ]]
XBMC may be confusing initially. This guide is for those new to XBMC or those who are having problems. The goal of this guide is to have an insanely easy guide to set up XBMC with a working database which fetches TV show information starting from nothing.
+
[[Image:Librararianlibraryfile.jpg|right|200px|actual picture from XBMC with recordings from MythTV ]]
 +
'''The Missing Symlink'''
  
== 1) Setting up the TV show Directory on your Computer ==
+
mythicalLibrarian will convert your recordings into a [[Video Library]], free of commercials, automatically after recording.  You can see an example to the right.
  
=== The Directory ===
 
* make a brand new directory ( for example, C:\TV)
 
  
 +
'''About The Program'''
  
=== The Subdirectories ===
+
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 an 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.
* for every TV show you have, make a New folder for it.
+
* Example: "Family Guy" or "30 Rock" or "The Office (US)"
+
* '''This may be painstaking. DO IT ANYWAY. you must'''... if you want to ensure this will work.
+
* So now we have a directory looking like "C:\TV\30 Rock" or "C:\TV\The Office (US)". Awesome.
+
* Even better would be to put the episodes in seperate season folders, several skins require that to show all artwork.
+
* Example: "C:\TV\30 Rock\Season 1\"
+
  
==== 'Special Cases' for Subdirectories ====
+
mythicalLibrarian pulls information supplied by your [[MythTV]] program guide for episodes, and 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.
* Your TV show is in a folder that doesn't match the TV Show title.
+
* For example I have my Star Trek episodes in a folder called "ST"
+
* This is still okay. But you will need to make a [[Import - Export Library#TV Shows|tvshow.nfo]] for it, so the scraper will know that in the ST folder you really mean Star Trek
+
  
=== Putting files into each appropriate TV Show folder ===
+
MythicalLibrarian was designed to run under Ubuntu Karmic Koala OS through BASH2.
{|
+
| valign="top" |
+
* Now you can go ahead and put each episode into its appropriate folder.
+
* Proper formatting of the name is important. You must make sure you follow the formatting which XBMC detects. look at [[TV Shows (Video Library)]] for more info
+
|
+
[[File:Directory.example.jpg|right]]
+
|}
+
  
== 2) Setting up the TV Show folder in XBMC ==
 
  
So now we want XBMC to recognize the TV shows we have. We want it to also grab show information like ratings, actors, episode summaries and so on.  
+
[[Image:Files.mythicalfilesystemthumb.jpg|right|thumb|250px|Click this link to see folder layout http://wiki.xbmc.org/images/5/5f/Files.mythicalfilesystem.gif ]][[Image:MythicalDBaseThumb.jpg|right|thumb|250px|Click this link to see an example database http://wiki.xbmc.org/images/e/ed/MythicalDBasea.jpg ]]
 +
'''How it works'''
  
=== Adding A video source ===
+
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.
* Depending on the version of XBMC you have and the skin this may differ somewhat, but the overall idea is the same
+
Here is the basic flow:
* In the main menu if you have a TV shows option, choose that. If you do not then simply go to the movies option and choose that.
+
*You put in- 'mythicalLibrarian.sh "episode or movie name" "episode name" "file/to/process.ext"'
* Now initially XBMC does not have a source to look for TV show content, so we need to set that.
+
*Episodes- mythicalLibrarian references TheTvDb to gain SeriesID. Get current time from TheTvDb  If the database is out-of-date or non existant, it will download the full series and parse it. Then, using fuzzy logic, it makes a match of the series name and gains season and episode information.  If this is not possible, it will attempt a match of original airdate from your MythTV program guide database.
* You need to go to the '''Add Source''' option while you are in the Movies or TV Shows menus.
+
mythicalLibrarian will rename your recognizable episodes to: "'''''/Show Name/Show Name.SxxExx (episode title).ext'''''"
* XBMC opens up a menu asking you to browse for a source, so in my case I will tell it to go to '''C://TV'''
+
* You can enter a name for the source, or just keep it to the default TV. It doesn't really matter.
+
* '''DO NOT CLICK OK YET'''.
+
  
=== Setting the content type ===
+
*Movies- mythicalLibrarian references your MythTV program guide database to verify it is a movie and then obtains the year for the movie.
* Now you can go ahead and click on the '''Set Content''' Button. This is where we tell XBMC that this is a TV show folder, opposed to it being a music folder or a movies folder.
+
mythicalLibrarian will rename your movies to: "'''''/Movie Name/movie title (Year).ext'''''"
* There should be a way to choose "TV Shows" so go ahead and click the arrow until you get to that option.
+
* You now have radio buttons with the option to choose which website the scraper gets all the TV show info from.
+
* People usually choose '''TheTVDB.com''' because its more of a 'for us by us thing' and the people who run the site acknowledge and allow XBMC to scrape the site. Whereas other websites officially dont really like this and might change their website to disallow this. This is partly why sometimes scrapes for other websites go down.
+
* Before you click ok make sure '''Run Automated Scan''' is clicked.
+
* Click OK. and then OK again to close the Add Source Menu.
+
  
  
=== It's Working ===
+
'''Additional Information'''
With All luck everything should be working now. You should see a little pop up box saying it is scanning for content. Even if you do the process wrong you may see that content box, but there is a difference when you do it wrong and do it right. when you do it wrong it wont take long and the pop up box is only for a few moments. If you do it right It will find each tv show then find each episode and download the information, so it takes a little longer and it shows that it is actually downloading information.
+
*Although mythicalLibrarian has no known issues at the present time, mythicalLibrarian is in beta until it goes one month without problem reports. There is a problem in the fuzzy logic "agrep" pacakage. While not fatal, it causes incorrect recognition of episode number in approximately 1 out of 400 episodes.  Please report problems here in the XBMC Forum thread:  http://forum.xbmc.org/showthread.php?p=470402#post470402 
 +
*If you would like to see additional features and functions, additional back-ends, or additional guide data, please post in this thread http://forum.xbmc.org/showthread.php?t=65769
  
  
== Showing the view in Library Mode ==
+
==Installation Setup and Use of mythicalLibrarian==
 +
This section covers installation, setup, and use of mythicalLibrarian.  After completing this section, mythicalLibrarian can run autonomously without user intervention.  See Librarian Interfaces for information on notifications and automation tasks.
  
I intend to work on this later.
+
====Installation====
 +
This section covers installation of mythicalLibrarian.
  
[[Category:How-to]]
+
*Install dependencies
 +
apt-get install curl agrep libnotify-bin
 +
dependencies breakdown:
 +
#curl downloads web pages as text. 
 +
#agrep provides fuzzy logic. 
 +
#libnotify-bin provides GNOME desktop notifications
 +
 
 +
*Download the current version of mythcalLibrarian from this [http://mythicallibrarian.googlecode.com/files/mythicalLibrarian.sh download link]
 +
*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====
 +
[[Image:Mythicalsetthumb.jpg|right|thumb|250px| Click this link to see the big picture http://wiki.xbmc.org/images/4/4e/Mythicalsettingss.jpg]]
 +
This section covers basic setup of mythicalLibrarian. To make mythicalLibrarian work, you will need to set the following settings located in text format within mythicalLibrarian.sh.You can see a picture of the settings to the right.
 +
*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/mythtv.  When installing MythTV a root user and password was assigned by the user.
 +
Leave the rest as default
 +
 
 +
====Use of mythicalLibrarian on MythTV Applications====
 +
This section covers setup of MythTV without any changes to mythicalLibrarian settings.  This will create only a basic setup.  Make sure to follow up by checking the /home/mythtv/mythicalLibrarian/output.log file after the first run.
 +
 +
*Download mythicalLibrarian.sh and put it on your desktop: http://mythicallibrarian.googlecode.com/files/mythicalLibrarian.sh
 +
*Download librarian-notify-send and put it on your desktop: http://mythicallibrarian.googlecode.com/files/librarian-notify-send
 +
*Type the following into a terminal
 +
sudo apt-get install curl agrep libnotify-bin
 +
sudo mkdir /home/mythtv /home/mythtv/mythicalLibrarian /home/mythtv/Episodes /home/mythtv/Movies /home/mythtv/Videos /home/mythtv/FailSafe
 +
sudo chown -R mythtv:mythtv /home/mythtv /home/mythtv/mythicalLibrarian /home/mythtv/Episodes /home/mythtv/Movies /home/mythtv/Videos /home/mythtv/FailSafe
 +
sudo mv ~/Desktop/mythicalLibrarian.sh /home/mythtv/mythicalLibrarian/mythicalLibrarian.sh
 +
sudo mv ~/Desktop/librarian-notify-send /usr/local/bin/librarian-notify-send
 +
sudo chmod +x /usr/local/bin/librarian-notify-send
 +
sudo chmod +x /home/mythtv/mythicalLibrarian/mythicalLibrarian.sh
 +
See use of mythicalLibrarian on MythTV Applications for setting up mythtv here: http://wiki.xbmc.org/index.php?title=MythicalLibrarian&action=edit&section=4
 +
sudo adduser *Your User Name here* mythtv
 +
*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: mythicalLibrarian
 +
User Job #1 Command: /home/mythtv/mythicalLibrarian/mythicalLibrarian.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====
 +
This section covers setup of non-MythTV applications.  Make sure permissions are set correctly.
 +
*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.  This section covers setup of notifications of the various platforms supported by mythicalLibrarian
 +
 
 +
====XBMC Commands====
 +
[[Image:Xbmc notification.jpg|right|http://www.xbmc.org Another Sucessful library addition]]
 +
This section covers setup of XBMC Commands. 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 XBMCIPs. Separate IP addresses with a space.  eg.
 +
XBMCIPs=( "192.168.1.110:8080 192.168.1.111:8080 XBOX:8080" )
 +
 
 +
====GNOME Desktop Notifications====
 +
[[Image:GNOMENotificationsthumbs.jpg|right|thumb|250px|Another Sucessful library addition ]]
 +
* mythicalLibrarian requires no-password sudo access to send GNOME notifications.
 +
 
 +
GNOME Desktop notifications can be turned on and off from within the script
 +
 
 +
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 Google Code [http://mythicallibrarian.googlecode.com/files/librarian-notify-send download link]
 +
* 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.
 +
 
 +
 
 +
== Troubleshooting ==
 +
While mythicalLibrarian is designed to run fully autonomously, configuration issues come up from time to time.  This section deals with these set-up issues
 +
 
 +
 
 +
 
 +
=== Permission Errors===
 +
This section of Troubleshooting is designated for permission errors.
 +
==== permission errors when run from terminal ====
 +
Ensure the user running mythicalLibrarian has permission to run mythicalLibrarian.  This includes read and write permissions to the working folder (default=~/mythicalLibrarian) 
 +
see this post for more information: http://forum.xbmc.org/showpost.php?p=489246&postcount=36
 +
==== mythicalLibrarian is not generating a log ====
 +
Make sure mythicalLibrarian.sh is executable.  You can set the permissions by typing "sudo chmod +x /path/to/mythicalLibrarian.sh"
 +
note: mythtv will be the user running mythicalLibrarian when run as a user job from MythTV
 +
see this post for more information: http://forum.xbmc.org/showpost.php?p=489246&postcount=36
 +
==== Files are not being renamed or moved, but they are owned my mythtv ====
 +
mythtv must have full access to the files.  the /var/ folder does not allow users to move files without special permissions.  Try moving your recording directory to your /home/ folder
 +
 
 +
 
 +
=== XBMC library is not being updated ===
 +
This section of Troubleshooting is designated for XBMC specific issues
 +
==== XBMC does not show notifications ====
 +
mythicalLibrarian requires the user to set the IP address of XBMC.
 +
*ensure you have a static IP set up in your router, see your router's manufacturer's website for more information
 +
*Open mythicalLibrarian.sh and edit the "XBMCIPs" setting to your XBMC IP.
 +
==== XBMC shows notifications but Library is not updated ====
 +
* Add a source http://wiki.xbmc.org/?title=Adding_Media_Sources
 +
* Set the content of your video library http://wiki.xbmc.org/?title=Set_Contents_%28Video_Library%29
 +
 
 +
 
 +
 
 +
=== OS Speciffic issues ===
 +
This section of Troubleshooting is designated for OS Specific issues
 +
==== Gentoo ====
 +
Gentoo OS requires upgrade of many packages.  See here for version information: http://forum.xbmc.org/showpost.php?p=495697&postcount=62
 +
 
 +
 
 +
 
 +
=== Problems after upgrade to new version ===
 +
This section of Troubleshooting is designated for issues after upgrade when the previous version was working
 +
==== Episodes are not identifed ====
 +
When episodes are not identified after an upgrade it is because the database handling has been upgraded, however, the database itself has not.  Delete all database folders to correct the issue  http://forum.xbmc.org/showpost.php?p=492001&postcount=40
 +
==== mythicalLibrarian does not generate any files in it's working directory====
 +
Ensure the user running mythicalLibrarian has permission to run mythicalLibrarian.  This includes read and write permissions to the working folder (default=~/mythicalLibrarian)
 +
 
 +
 
 +
 
 +
=== Gnome Desktop Notifications ===
 +
This section of Troubleshooting is designated for GNOME Desktop Notifications issues
 +
==== Gnome Desktop Notifications are not showing up ====
 +
Ensure you have Notify=Enabled set in mythicalLibrarian.sh  See this section for more information http://wiki.xbmc.org/index.php?title=MythicalLibrarian&action=submit#GNOME_Desktop_Notifications
 +
=== Guide Data errors ===
 +
for SchedulesDirect/Tribune/Zap2it set the GuideDataType setting in mythicalLibrarian.sh to "SchedulesDirect"
 +
==== Currently Unsupported Guide data types ====
 +
Support for guide data will be available with help from you. See this post: http://forum.xbmc.org/showpost.php?p=496721&postcount=90
 +
 
 +
==Notes==
 +
mythicalLibrarian is a spawn from the project BashSExx and [[MythSExx]]. 
 +
 
 +
[[MythSExx]] can be used if you are strictly trying to rename episodes
 +
 
 +
mythicalLibrarian is currently in advanced beta stage.
 +
 
 +
[[category:Linux]]
 +
[[category:File Sharing|Sources]]

Revision as of 15:20, 1 February 2010

diagram of how mythicalLibrarian works
Newest version was released --Outleradam 00:54, 8 January 2010 (UTC)
actual picture from XBMC with recordings from MythTV
actual picture from XBMC with recordings from MythTV

The Missing Symlink

mythicalLibrarian will convert your recordings into a Video Library, free of commercials, automatically after recording. You can see an example to the right.


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 an 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 for episodes, and 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 was designed to run under Ubuntu Karmic Koala OS through BASH2.


Click this link to see an example database http://wiki.xbmc.org/images/e/ed/MythicalDBasea.jpg

How it works

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. Here is the basic flow:

  • You put in- 'mythicalLibrarian.sh "episode or movie name" "episode name" "file/to/process.ext"'
  • Episodes- mythicalLibrarian references TheTvDb to gain SeriesID. Get current time from TheTvDb If the database is out-of-date or non existant, it will download the full series and parse it. Then, using fuzzy logic, it makes a match of the series name and gains season and episode information. If this is not possible, it will attempt a match of original airdate from your MythTV program guide database.

mythicalLibrarian will rename your recognizable episodes to: "/Show Name/Show Name.SxxExx (episode title).ext"

  • Movies- mythicalLibrarian references your MythTV program guide database to verify it is a movie and then obtains the year for the movie.

mythicalLibrarian will rename your movies to: "/Movie Name/movie title (Year).ext"


Additional Information

  • Although mythicalLibrarian has no known issues at the present time, mythicalLibrarian is in beta until it goes one month without problem reports. There is a problem in the fuzzy logic "agrep" pacakage. While not fatal, it causes incorrect recognition of episode number in approximately 1 out of 400 episodes. Please report problems here in the XBMC Forum thread: http://forum.xbmc.org/showthread.php?p=470402#post470402
  • If you would like to see additional features and functions, additional back-ends, or additional guide data, please post in this thread http://forum.xbmc.org/showthread.php?t=65769


Contents

1 Installation Setup and Use of mythicalLibrarian

This section covers installation, setup, and use of mythicalLibrarian. After completing this section, mythicalLibrarian can run autonomously without user intervention. See Librarian Interfaces for information on notifications and automation tasks.

1.1 Installation

This section covers installation of mythicalLibrarian.

  • Install dependencies
apt-get install curl agrep libnotify-bin

dependencies breakdown:

  1. curl downloads web pages as text.
  2. agrep provides fuzzy logic.
  3. libnotify-bin provides GNOME desktop notifications
  • Download the current version of mythcalLibrarian from this download link
  • 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

1.2 Setting the Settings

Click this link to see the big picture http://wiki.xbmc.org/images/4/4e/Mythicalsettingss.jpg

This section covers basic setup of mythicalLibrarian. To make mythicalLibrarian work, you will need to set the following settings located in text format within mythicalLibrarian.sh.You can see a picture of the settings to the right.

  • 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/mythtv. When installing MythTV a root user and password was assigned by the user.

Leave the rest as default

1.3 Use of mythicalLibrarian on MythTV Applications

This section covers setup of MythTV without any changes to mythicalLibrarian settings. This will create only a basic setup. Make sure to follow up by checking the /home/mythtv/mythicalLibrarian/output.log file after the first run.

sudo apt-get install curl agrep libnotify-bin
sudo mkdir /home/mythtv /home/mythtv/mythicalLibrarian /home/mythtv/Episodes /home/mythtv/Movies /home/mythtv/Videos /home/mythtv/FailSafe
sudo chown -R mythtv:mythtv /home/mythtv /home/mythtv/mythicalLibrarian /home/mythtv/Episodes /home/mythtv/Movies /home/mythtv/Videos /home/mythtv/FailSafe
sudo mv ~/Desktop/mythicalLibrarian.sh /home/mythtv/mythicalLibrarian/mythicalLibrarian.sh
sudo mv ~/Desktop/librarian-notify-send /usr/local/bin/librarian-notify-send
sudo chmod +x /usr/local/bin/librarian-notify-send
sudo chmod +x /home/mythtv/mythicalLibrarian/mythicalLibrarian.sh

See use of mythicalLibrarian on MythTV Applications for setting up mythtv here: http://wiki.xbmc.org/index.php?title=MythicalLibrarian&action=edit&section=4

sudo adduser *Your User Name here* mythtv
  • 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: mythicalLibrarian
User Job #1 Command: /home/mythtv/mythicalLibrarian/mythicalLibrarian.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

1.4 Use of mythicalLibrarian on non-MythTV Applications

This section covers setup of non-MythTV applications. Make sure permissions are set correctly.

  • 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

2 Librarian Interfaces

mythicalLibrarian has the capability to send notifications to the Ubuntu GNOME desktop and keep your XBMC library up-to-date and clean. This section covers setup of notifications of the various platforms supported by mythicalLibrarian

2.1 XBMC Commands

http://www.xbmc.org Another Sucessful library addition

This section covers setup of XBMC Commands. 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 XBMCIPs. Separate IP addresses with a space. eg.
XBMCIPs=( "192.168.1.110:8080 192.168.1.111:8080 XBOX:8080" )

2.2 GNOME Desktop Notifications

Another Sucessful library addition
  • mythicalLibrarian requires no-password sudo access to send GNOME notifications.

GNOME Desktop notifications can be turned on and off from within the script

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 Google Code download link
  • 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.


3 Troubleshooting

While mythicalLibrarian is designed to run fully autonomously, configuration issues come up from time to time. This section deals with these set-up issues


3.1 Permission Errors

This section of Troubleshooting is designated for permission errors.

3.1.1 permission errors when run from terminal

Ensure the user running mythicalLibrarian has permission to run mythicalLibrarian. This includes read and write permissions to the working folder (default=~/mythicalLibrarian) see this post for more information: http://forum.xbmc.org/showpost.php?p=489246&postcount=36

3.1.2 mythicalLibrarian is not generating a log

Make sure mythicalLibrarian.sh is executable. You can set the permissions by typing "sudo chmod +x /path/to/mythicalLibrarian.sh" note: mythtv will be the user running mythicalLibrarian when run as a user job from MythTV see this post for more information: http://forum.xbmc.org/showpost.php?p=489246&postcount=36

3.1.3 Files are not being renamed or moved, but they are owned my mythtv

mythtv must have full access to the files. the /var/ folder does not allow users to move files without special permissions. Try moving your recording directory to your /home/ folder


3.2 XBMC library is not being updated

This section of Troubleshooting is designated for XBMC specific issues

3.2.1 XBMC does not show notifications

mythicalLibrarian requires the user to set the IP address of XBMC.

  • ensure you have a static IP set up in your router, see your router's manufacturer's website for more information
  • Open mythicalLibrarian.sh and edit the "XBMCIPs" setting to your XBMC IP.

3.2.2 XBMC shows notifications but Library is not updated


3.3 OS Speciffic issues

This section of Troubleshooting is designated for OS Specific issues

3.3.1 Gentoo

Gentoo OS requires upgrade of many packages. See here for version information: http://forum.xbmc.org/showpost.php?p=495697&postcount=62


3.4 Problems after upgrade to new version

This section of Troubleshooting is designated for issues after upgrade when the previous version was working

3.4.1 Episodes are not identifed

When episodes are not identified after an upgrade it is because the database handling has been upgraded, however, the database itself has not. Delete all database folders to correct the issue http://forum.xbmc.org/showpost.php?p=492001&postcount=40

3.4.2 mythicalLibrarian does not generate any files in it's working directory

Ensure the user running mythicalLibrarian has permission to run mythicalLibrarian. This includes read and write permissions to the working folder (default=~/mythicalLibrarian)


3.5 Gnome Desktop Notifications

This section of Troubleshooting is designated for GNOME Desktop Notifications issues

3.5.1 Gnome Desktop Notifications are not showing up

Ensure you have Notify=Enabled set in mythicalLibrarian.sh See this section for more information http://wiki.xbmc.org/index.php?title=MythicalLibrarian&action=submit#GNOME_Desktop_Notifications

3.6 Guide Data errors

for SchedulesDirect/Tribune/Zap2it set the GuideDataType setting in mythicalLibrarian.sh to "SchedulesDirect"

3.6.1 Currently Unsupported Guide data types

Support for guide data will be available with help from you. See this post: http://forum.xbmc.org/showpost.php?p=496721&postcount=90

4 Notes

mythicalLibrarian is a spawn from the project BashSExx and MythSExx.

MythSExx can be used if you are strictly trying to rename episodes

mythicalLibrarian is currently in advanced beta stage.

Personal tools
Namespaces

Variants
Actions
Navigation
Wiki help
Toolbox