MythicalLibrarian, Media stubs

From Kodi
(Difference between pages)
Jump to: navigation, search
 
 
Line 1: Line 1:
[[Image:Librarianas.png|left|200px|diagram of how mythicalLibrarian works]]Newest version was released --[[User:Outleradam|Outleradam]] 23:54, 2 January 2010 (UTC)
+
{{:Adding videos to the library/Contents}}
[[Image:Libraraianlibraryfiles2.jpg|right|200px|actual picture from XBMC with recordings from MythTV ]]
+
As of v11 (Eden), XBMC now has support for offline media stub files. These are files that represent a media outside of the online digital infrastructure and allow XBMC's library to catalogue your "offline" media collection, as well as ask for the media when selected for playback.  By default these files have a .disc extension (modifiable via [[advancedsettings.xml|advancedsettings.xml]]).  In cooperation with Confluence Skin's (and possibly others) feature to search for words like DVD, Bluray, and HDDVD in the filename it is possible to create a disc stub file that will show correct media flags in the skin.  For example, if you have Finding Nemo on DVD, you could create an empty file called: "Finding Nemo (2003).dvd.disc" and add it to your library.  In the XBMC libray this file will show up with the DVD media flag in the Confluence Skin and when selected you will be prompted to insert the Finding Nemo DVD.
[[Image:Librararianlibraryfile.jpg|right|200px|actual picture from XBMC with recordings from MythTV ]]
+
'''The Missing Symlink'''
+
  
mythicalLibrarian will convert your recordings into a [[Video Library]].  You can see an example to the right.
 
  
 +
To mark a disc stub as BluRay add the words "bluray" or "bdrip" to the file name (as explained above).  For HDDVD add "hddvd".  For DVD add "dvd".  For TV add "pdtv", "hdtv", or "dsr".  For VHS add "vhs".
  
'''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 BoxeemythicalLibrarian 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.
+
You can also add a custom message to be displayed when attempting to play a Disc Stub fileThis is accomplished by treating the disc stub file as an xml file with the following layout:
  
mythicalLibrarian pulls information supplied by your [[MythTV]] program guide and, 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.
+
<source lang="xml">
 +
<discstub>
 +
  <message>Message to be displayed</message>
 +
</discstub>
 +
</source>
  
  
[[Image:Files.mythicalfilesystemthumb.jpg|right|thumb|250px|Click this link to see the big picture http://wiki.xbmc.org/images/5/5f/Files.mythicalfilesystem.gif ]]
+
The message will be displayed on the second line of the dialog box that asks you to insert a disc when selecting a disc stub file for playback. This added feature allows users who use a numbered library for their disc media to also take advantage of this new Disc Stub file support in XBMC.
'''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:
 
*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.
+
For more technical information on this new feature see [http://trac.xbmc.org/ticket/10384 here], [https://github.com/xbmc/xbmc/pull/76 here], and [https://github.com/xbmc/xbmc/pull/89 here].
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. 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, please post in this thread http://forum.xbmc.org/showthread.php?t=65769
+
 
+
 
+
==Installation of mythicalLibrarian==
+
 
+
*Get the current version of mythcalLibrarian from Google Code: [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
+
*Install dependencies
+
apt-get install curl agrep libnotify-bin
+
====Setting the Settings====
+
[[Image:MythicalsettingsThumbnail.jpg|right|thumb|200px| Click this link to see the big picture http://wiki.xbmc.org/images/1/15/Mythicalsett.jpg]]
+
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 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
+
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====
+
[[Image:Xbmc notification.jpg|right|http://www.xbmc.org 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====
+
[[Image:GNOMENotificationsthumbs.jpg|right|thumb|250px|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 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.
+
 
+
====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]]
+
[[category:PVR]]
+

Revision as of 12:39, 30 March 2012

The basic steps for adding
videos to the library:

1. Naming video files

2. Adding video sources
3. Set content and scan


Home icon grey.png   ▶ Video library ▶ Media stubs

To use your video files with "metadata" like summaries, cast info, DVD covers, thumbnails, and more, you need to add those video files to the video library.

Contents

1 Preparing files

To use your video files with "metadata" like summaries, cast info, DVD covers, thumbnails, and more, you need to add those video files to the video library.

There are a couple of important parts to getting things imported into your Kodi library. First, the metadata for the video file should exist someplace (the metadata are things like the title of the show, the plot description, the season and episode number if the video file happens to be an episode of a TV series, the actors, the director, cover art and episode art, etc.) The second part is naming the video files so the file gets matched up with the metadata available online.


Kodi uses plugins called scrapers to pull information from a video file and coordinate it with a source of metadata available someplace on the internet. For a TV show the scraper basically looks for the show name, season number, and episode number. The default scrapers look at TheTVDB.com (for TV shows) and TheMovieDB.org (for Movies).

If some video file is not scraping properly, the first step is to go to the website of the scraper you are using on that source and see if the video is already listed there. If you can't find an entry on one of those two sites for the video you're interested in, you can hunt for different scrapers which search other websites for metadata (and go through the same process of making sure your show is listed there, then naming the video files to match). Alternatively, you can create new entries on those sites with some basic information about your show, and then let the scrapers do their work. This is nice, because it means that other people will benefit from your work, and may contribute additional information about the show over time. Adding info to a site like TheTVDB.org is easy, but make sure you read the site rules before you start adding.

If none of that works, you can create .nfo files for each video by hand so that Kodi will bypass the normal looking online for information about your show. This is the least attractive option, though. It's a lot of work, and it doesn't benefit anyone else the way creating entries on the metadata sites does.

1.1 Naming files

In order for the media scrapers to pick up the correct information your file names must follow a certain format

1.2 NFO files

NFO files can be used to provide data for a video file in Kodi or influence the search behaviour of scrapers. In particular they are helpful if the information fetched from a web site does not match the video file, or data for that particular file does not exist.

2 Media sources

Media Sources are virtual links to the content you wish Kodi to use. When you enter any of the Videos, Music, Pictures or the Filemanager, you will see an entry for "Add Sources". When you first start with Kodi you should at least add one source, like a drive or directory on your Kodi device to get you started.

2.1 Adding video sources

A video source is a kind of media source. Media sources are the links that tell Kodi where your content is stored and what type of content is contained within each one.

You can have multiple sources for each media type.

3 Media stubs

As of v11 (Eden), Kodi has support for offline media stub files. These are files that represent a media outside of the online digital infrastructure and allow Kodi's library to catalogue your "offline" media collection, as well as ask for the media when selected for playback.

4 Internet streams

Various internet video and audio streams can be played back in Kodi as if they were locally stored on your media center by using STRM files. As long as the format and streaming-method (network-protocol) is supported by Kodi, stream can be added. These are basic text files that look like <name>.strm and contain a URL to the internet stream. STRM files can also be added to the video library and can have cover art, summaries, etc.

Some internet sites may have an add-on available that can also access these media streams, rather than having to manually create STRM files. See Add-ons for more information on how to find and install add-ons.

5 Setting content and scanning

When you "Set Content", you can set your video content as Music Videos, Movies, or TV Shows. Scroll through the options until you get to the correct one. If you did not "Set Content" when you added a source, you can do so later by selecting the source and bringing up the contextual menu (C on a keyboard by default).

5.1 Incorrect and missing videos

This page will show you how to add videos that got missed during the library scan, as well as how to fix mistakes that might have happened.

5.2 Custom video entries

Need to add videos such as home movies or other videos that are not normally found by Kodi's scrapers? This page will show you a few solutions on adding custom videos, such as home movies, clips, special editions, and more.

5.3 Updating or removing videos

This page will show you the various methods of updating library information for videos and how to remove videos.

6 Grouping media

6.1 File stacking


6.2 Movie sets

Kodi can optionally sort your movies into sets for better organization. Movies sets are for sequels or movies that are otherwise apart of a directly related series, rather than a genre or playlist. Movies can only be in one set at a time. Movie sets can be defined by the scraper, by NFO files, or by using Kodi's built-in sets editor.

6.3 Video library tags

Since v12 Frodo, Kodi supports "tags" which can be applied to movies, TV shows, and music videos. They are meant to supplement Movie sets which are (by design) limited in their usage. A movie or TV show can have multiple tags attached and a tag can contain multiple tags. They can be used as keywords, categories, filters, or whatever you want. Movies and TV shows can have multiple tags. Tags can be used to filter and navigate the library. Tags can be edited and managed directly from the Kodi GUI.

6.4 How to separate the library (cartoons, documentaries, anime, etc)

A common question people have after setting up their library is how can they separate their library so not everything is just in one big section, and how to have that as an option on the home screen in Kodi.

Kodi can already filter and separate library items using a number of methods mentioned above, and combined with a skin that supports custom home items, the library can be laid out exactly was you want, right from the home screen.

6.5 Playlists

  • Basic playlists - Kodi supports both basic playlists and smart playlists. A basic playlist is a normal text file that lists one or more media files (Audio or Video), and plays them in succession. You can either create your own or use existing playlists from other sources, such as a playlist generated from Winamp, iTunes, or other sources. Basic playlists can be created and edited directly from Kodi's GUI.
  • Smart playlists - Kodi supports smart playlists for all types of media (excluding pictures), which essentially use a set of rules to limit the results from the databases. This means that to be able to create a smart playlist in the GUI, music/video must first be added to the libraries using a scraper addon or by creating NFO files. Smart playlist can be created either by using the built-in GUI smart playlist editor accessible from the Playlists section, or by creating an XML file with the extension XSP (XBMC Smart Playlist).

6.6 Linking movies to TV shows

Movie linked to TV show.png

When you are in the Movies section of Kodi you can select a movie and bring up the contextual menu (C on a keyboard) and select "Link to TV show". This will bring up a list of TV shows that are currently in your library. When you link a movie to a TV show it will make that movie show up in the TV show's library view. Multiple movies can be linked to a TV show, but a movie can only be linked to one show at a time.

6.7 Video nodes

Video nodes are defined views that are used to organize your media from the videos menu. In the past Kodi has had a number of standard nodes such as Title, Director, Year, Studios, Countries, Genres that were hard coded. As of v12 Frodo, Kodi introduces the ability to customize these nodes using an XML file. Using XML files really gives great flexibility in how you display your media. Don't want your screaming kids stuff in your main movie node... exclude it. Want documentaries in a separate node, create it. Don't like how recently added is presented, change it.

To get full functionality from custom nodes, you need to use a skin that allows you to deploy them as you would like (e.g. latest builds of Aeon Nox). Confluence will show your nodes, but doesn't allow you to decide exactly where.

7 Alternative guides

7.1 Video guides


8 See also

As of v11 (Eden), XBMC now has support for offline media stub files. These are files that represent a media outside of the online digital infrastructure and allow XBMC's library to catalogue your "offline" media collection, as well as ask for the media when selected for playback. By default these files have a .disc extension (modifiable via advancedsettings.xml). In cooperation with Confluence Skin's (and possibly others) feature to search for words like DVD, Bluray, and HDDVD in the filename it is possible to create a disc stub file that will show correct media flags in the skin. For example, if you have Finding Nemo on DVD, you could create an empty file called: "Finding Nemo (2003).dvd.disc" and add it to your library. In the XBMC libray this file will show up with the DVD media flag in the Confluence Skin and when selected you will be prompted to insert the Finding Nemo DVD.


To mark a disc stub as BluRay add the words "bluray" or "bdrip" to the file name (as explained above). For HDDVD add "hddvd". For DVD add "dvd". For TV add "pdtv", "hdtv", or "dsr". For VHS add "vhs".


You can also add a custom message to be displayed when attempting to play a Disc Stub file. This is accomplished by treating the disc stub file as an xml file with the following layout:


<discstub>
  <message>Message to be displayed</message>
</discstub>


The message will be displayed on the second line of the dialog box that asks you to insert a disc when selecting a disc stub file for playback. This added feature allows users who use a numbered library for their disc media to also take advantage of this new Disc Stub file support in XBMC.


For more technical information on this new feature see here, here, and here.

Personal tools
Namespaces

Variants
Actions
Navigation
Wiki help
Toolbox