Archive:MythicalLibrarian and Add-on:Artwork Downloader: Difference between pages

From Official Kodi Wiki
(Difference between pages)
Jump to navigation Jump to search
 
>Martijn
 
Line 1: Line 1:
{{Addon
|Name=Artwork Downloader
|provider-name=paddycarey, putneyj, Martijn
|ID=script.artwork.downloader
|latest-version=1.0.7
|extension point=xbmc.python.script
|provides=executable
|Summary=Downloads Artwork for TV shows, Movies and Musicvideos in your library
|Description=
Downloads all available artwork for TV shows, Movies and Musicvideos in your library. Check the options for supported artwork


'''
Artwork sources:
--this page is under construction'''
www.fanart.tv
www.thetvdb.com
www.themoviedb.org


Remark:
Check your skin to see what type of artwork is supported!
Each TV Show/Movie must have its own folder!


[[Image:Librarianas.png|left|200px|diagram of how mythicalLibrarian works]]Newest version was released --[[User:Outleradam|Outleradam]] 00:54, 8 January 2010 (UTC)
Skin integration:
[[Image:Libraraianlibraryfiles2.jpg|right|200px|actual picture from XBMC with recordings from MythTV ]]
See readme file
[[Image:Librararianlibraryfile.jpg|right|200px|actual picture from XBMC with recordings from MythTV ]]
'''The Missing Symlink'''
|Platform=all
|broken=
|icon url=http://mirrors.xbmc.org/addons/eden/script.artwork.downloader/icon.png}}


mythicalLibrarian will convert your recordings into a [[Video Library]], free of commercials, automatically after recording.  You can see an example to the right.
{{forum link2|See the [[forum:114633|Artwork Downloader forum thread]] for help and issue report.}}


= Summary =
This add-ons searches through your library for all your currently added Movies, TV Shows and Musicvideos and then searches for avaiable artwork. This then is downloaded to the folder location where that media is stored.


'''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.
= Bug and issue reports =


MythicalLibrarian was designed to run under Ubuntu Karmic Koala OS through BASH2.
* If anyone finds any bugs or has any suggestions please add them to issues on github or let us know here. <u>'''DO NOT'''</u> post parts of you debug log directly. <u>'''ONLY'''</u> use [http://paste.ubuntu.com/ http://paste.ubuntu.com/] or [http://pastebin.com/ http://pastebin.com/] and post the link together with a description of the problem in the forum thread.
* If you fail to follow this you <u>'''WONT'''</u> get help!
* Incorrect (language) Artwork downloaded? Check one of the source sites and see why. Usually it 's because some-one set it wrong.




[[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 ]]
= Github =
'''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 you can get the latest code and .zip install for testing purpose.
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.
Remember these are BETA version and can break.
mythicalLibrarian will rename your movies to: "'''''/Movie Name/movie title (Year).ext'''''"


Stable version is available in XBMC repo.


'''Additional Information'''
* Project: [https://github.com/paddycarey/script.artwork.downloader https://github.com/paddycarey/script.artwork.downloader]
*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 
* Downloads: [https://github.com/paddycarey/script.artwork.downloader/downloads https://github.com/paddycarey/script.artwork.downloader/downloads]
*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




==Installation Setup and Use of mythicalLibrarian==
= Current Features =
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.


====Installation====
'''Download artwork'''
This section covers installation of mythicalLibrarian. 
*Movies
*TV Shows
*Musicvideos


===== Manual Installation =====
This section covers manual installation
*Install dependencies
sudo 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]
'''Limit artwork'''
*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


[[Image:Mythicalsetthumb.jpg|right|thumb|250px| Click this link to see the big picture http://wiki.xbmc.org/images/4/4e/Mythicalsettingss.jpg]]
* Maximum extrafanart
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.
* Minimum rating
*MoveDir - this is your primary episode move dir.
* Preferred language ''(fall-back is always English)''
*AlternateMoveDir- this is the folder where episodes will be moved if movedir cannot be used
* Exclude fanart that has text ''(only available on thetvdb.com)''
*FailSafeDir- folder to place links if files cannot be moved
* Minimum fanart size Movies ''(also for Musicvideos)''
*PrimaryMovieDir-Folder to place movies
* Minimum fanart size TV Shows
*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
=====Automatic Installation=====
This section covers automatic installation and upgrade. Automatic upgrade will upgrade you to the SVN version of mythicalLibrarian There may be installation difficulties.


*type the following:
''Note: Extrafanart will be automaticly deleted when it is found below the limit settings''
sudo apt-get install curl
mkdir ~/.mythicalLibrarian && mkdir ~/.mythicalLibrarian/mythicalSetup && cd ~/.mythicalLibrarian/mythicalSetup
curl http://mythicallibrarian.googlecode.com/svn/trunk/mythicalLibrarian >./mythicalSetup.sh
sudo chmod +x ./mythicalSetup.sh && sudo ./mythicalSetup.sh
*mythicalSetup will run you through a series of prompts and perform the setup of mythicalLibrarian and all of it's features


=====Automatic Upgrade=====
This section covers upgrading of mythicalLibrarian


*type the following
'''Overwrite all'''
sudo mythicalLibrarian --upgrade
*mythicalLibrarian will download the newest version of mythicalSetup and perform the upgrade


* This will overwrite all current files with the ones that fit the limiter. This option will automatic reset after a download run.


====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
'''Interface translated in'''
*Download librarian-notify-send and put it on your desktop: http://mythicallibrarian.googlecode.com/files/librarian-notify-send
* English
*Type the following into a terminal
* Dutch
sudo apt-get install curl agrep libnotify-bin
* Polish ''(needs updating)''
sudo mkdir /home/mythtv /home/mythtv/mythicalLibrarian /home/mythtv/Episodes /home/mythtv/Movies /home/mythtv/Videos /home/mythtv/FailSafe
* German ''(needs updating)''
sudo chown -R mythtv:mythtv /home/mythtv /home/mythtv/mythicalLibrarian /home/mythtv/Episodes /home/mythtv/Movies /home/mythtv/Videos /home/mythtv/FailSafe
* Greek
sudo mv ~/Desktop/mythicalLibrarian.sh /home/mythtv/mythicalLibrarian/mythicalLibrarian.sh
* Spanish
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


===== MythTV settings =====
= Artwork sources: =
See use of mythicalLibrarian on MythTV Applications for setting up mythtv here: http://wiki.xbmc.org/index.php?title=MythicalLibrarian&action=edit&section=4
*[http://www.fanart.tv www.fanart.tv]
sudo adduser *Your User Name here* mythtv
*[http://www.thetvdb.com www.thetvdb.com]
*Click System/Administration MythTV Baclend setup
*[http://www.themoviedb.org www.themoviedb.org]
*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: /usr/local/bin/mythicalLibrarian "%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====
'''Please show your support to these sites by donating or contributing new artwork!'''
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


= Naming conventions =


==Using the command line ==
mythicalLibrarian has many command line switches.  This section covers command line use of mythicalLibrarian.


=====mythicalLibrarian --help=====
== Filenaming ==
This section covers -h|--help
mythicalLibrarian --help
--help will display a help message containing helpful information
=====mythicalLibrarian --scan=====
This section covers -s|--scan
mythicalLibrarian --scan mpg /home/mythtv/Videos
mythicalLibrarian --scan ext /path/to/video/files
--scan will search for files automatically and process them.
--scan has three parmaters.  The first parameter is the extension of the files to search.  The seccond parameter is the folder to search.
=====mythicalLibrarian --doover=====
This section covers -d|--doover
mythicalLibrarian --doover
mythicalLibrarian keeps track of each file which fails while it runs.  At any time you can type "mythicalLibrarian --doover" and all previously failed files will be processed. This process cannot be interrupted for any reason or data loss may occour.
=====mythicalLibrarian --undo=====
This section covers -u|--undo
mythicalLibrarian --undo
mythicalLibrarian keeps track of every file which has been moved.  At any time you can type mythicalLibrarian --undo and all files will be reverted to their original state. There is no indication that --doover is running until it completes.  This process cannot be interrupted or data loss may occour.
=====mythicalLibrarian --update=====
This section covers --update
sudo mythicalLibrarian --update
--update is a complicated process. First, mythicalLibrarian will download a copy of the mythicalSetup from the SVN repository.  Next, it will download a copy of mythicalLibrarian from the SVN repository. mythicalSetup will then separate the program from the user settings.  mythicalSetup perform several checks and bring up a GUI.  The GUI will ask the user for preferences. mythicalSetup will attempt to set permissions and settings to appropriate defaults based upon user settings and the system.  mythicalSetup will then combine the user settings with the separated program and place the file in /usr/local/bin.  mythicalSetup will then call mythicalLibrarian --mythicalDiagnostics.  Once complete, mythicalDiagnostics, mythicalSetup and update are closed and results are returned to the user.
=====mythicalLibrarian --mythicalDiagnostics=====
This section covers -m|--mythicalDiagnostics
mythcalLibrarian --mythicalDiagnostics
--mythicalDiagnostics is a step-by-step functions check of mythicalLibrarian which will test functionality.  It tests for all '''known''' causes of failure. This is a good troubleshooting tool for you to work the kinks out of your settings.


==Librarian Interfaces ==
'''Movies:'''
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
*Poster ''(poster.jpg)''
*Fanart ''(fanart.jpg)''
*Extrafanart ''(<image ID from provider>.jpg)''
*Extrathumbs ''(thumb1.jpg to thumb4.jpg)''
*Clearart ''(clearart.png)''
*Logo ''(logo.png)''
*Discart ''(disc.png)''


====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====
'''TV Shows:'''
[[Image:GNOMENotificationsthumbs.jpg|right|thumb|250px|Another Sucessful library addition ]]
*Poster (poster.jpg)
* mythicalLibrarian requires no-password sudo access to send GNOME notifications.
*Season Posters ''(seasonx.jpg)''
*Fanart ''(fanart.jpg)''
*Extrafanart ''(<image ID from provider>.jpg)''
*Clearart ''(clearart.png)''
*Characterart ''(character.png)''
*Logo ''(logo.png)''
*[[Wide_Banner_Icons]] ''(banner.jpg)''
*Season Banners ''(seasonbannerx.jpg)''
*Thumb 16:9 ''(landscape.jpg)''
*Season Thumb 16:9 ''(seasonx-landscape.jpg | seasonall-landscape.jpg)''


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.
'''Musicvideos:'''
*Poster ''(poster.jpg)''
*Fanart ''(fanart.jpg)''
*Extrafanart ''(<image ID from provider>.jpg)''
*Extrathumbs ''(thumb1.jpg to thumb4.jpg)''
*Clearart ''(clearart.png)''
*Logo ''(logo.png)''
*Discart ''(disc.png)''


* Get the current version of librarian-notify-send from Google Code [http://mythicallibrarian.googlecode.com/files/librarian-notify-send download link]
== Foldernaming ==
* 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.
Movies
|
---Movie 1
    |
    ---extrafanart
    ---extrathumbs


TV Shows
|
---TV Show 1
    |
    ---extrafanart
    ---Season 1
    ---Season 2
    ---Season ....


== Troubleshooting ==
= Skin integration for running the script =
While mythicalLibrarian is designed to run fully autonomously, configuration issues come up from time to time. This section deals with these set-up issues
This add-on support different kind of skin integration methods. This allows skins to use buttons to download different kinds of artwork for a single media item or in bulk mode.


'''''<u>All commands are case sensitive!</u>'''''




=== '''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
==== mythicalLibrarian works from terminal, but not from user job ====
"mythtv" is the user calling the user job.  If the user running mythicalLibrarian does not have access to the file, then mythicalLibrarian will not have access to the file.  MythTV users can troubleshoot by changing your username with "sudo su mythtv", then running mythicalLibrarian.
==== mythcialLibrarian will not copy to my NFTF/FAT/EXT3 mounted drive ====
Additonal file systems may require editing the /etc/fstab file to change permissions.  Search your OS documentation for information on how to mount a file system under a different username. Alternately, you may wish to add the user running mythicalLibrarian to your user group.


== Solo mode ==
This downloads for a single media item depending from what section of XBMC this is gonna be used from.


=== '''XBMC library is not updated''' ===
'''Run script for single media item'''
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 within mythicalLibrarian.sh
*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


This downloads all available artwork that has been enable in the add-on settings.


Script command:
    XBMC.RunScript(script.artwork.downloader, mediatype=?, medianame=?)


=== '''OS Speciffic issues''' ===
Skin example:
This section of Troubleshooting is designated for OS Specific issues
    <item id="8">
==== Gentoo ====
        <description>Get Artwork</description>
Gentoo OS requires upgrade of many packages. For sure you will need the package TRE. See here for version information: http://forum.xbmc.org/showpost.php?p=495697&postcount=62
        <label>$LOCALIZE[31316]</label>
        <onclick condition="Container.Content(tvshows)">XBMC.RunScript(script.artwork.downloader, mediatype=tvshow, medianame=$ESCINFO[ListItem.TVShowTitle])</onclick>
        <onclick condition="Container.Content(movies)">XBMC.RunScript(script.artwork.downloader, mediatype=movie, medianame=$ESCINFO[ListItem.Title],mediapath=$ESCINFO[ListItem.Path])</onclick>
        <onclick condition="Container.Content(musicvideos)">XBMC.RunScript(script.artwork.downloader, mediatype=musicvideos, medianame=$ESCINFO[ListItem.Title],mediapath=$ESCINFO[ListItem.Path])</onclick>
        <visible>[Container.Content(tvshows)|Container.Content(movies)|Container.Content(musicvideos)]+system.hasaddon(script.artwork.downloader)</visible>
    </item>


=== '''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)


'''Runs script in GUI dialog mode'''


=== '''Episode recognition problems''' ===
A menu is displayed with available artwork type. When a artwork type is selected the image list with available images will be displayed. ''This won't take the add-on settings into account.''
==== Series title is not properly recognized ====
TheTvDb.com does not have the proper Zap2it id included. Edit it. 
The program guide uses a generic name. Apply a showtranslation.  See documentation included within mythicalLibrarian.sh.
=== Episode title was not properly recognized ===
TheTvDb.com is down. Wait for TheTvDb.com to resume and then run the doover.sh file generated by mythicalLibrarian
Ensure the data at TheTvDb is accurate. Correct if needed.


The selected image will automaticly overwrite the current one when present.


=== '''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


Script command:
    XBMC.RunScript(script.artwork.downloader, mode=gui, mediatype=?, medianame=?)


=== Guide Data errors ===
Skin example:
for SchedulesDirect/Tribune/Zap2it set the GuideDataType setting in mythicalLibrarian.sh to "SchedulesDirect"
    <item id="8">
==== Currently Unsupported Guide data types ====
        <description>Get Artwork</description>
Support for guide data will be available with help from you. See this post: http://forum.xbmc.org/showpost.php?p=496721&postcount=90
        <label>$LOCALIZE[31316]</label>
        <onclick condition="Container.Content(tvshows)">XBMC.RunScript(script.artwork.downloader, mode=gui, mediatype=tvshow, medianame=$ESCINFO[ListItem.TVShowTitle])</onclick>
        <onclick condition="Container.Content(movies)">XBMC.RunScript(script.artwork.downloader, mode=gui, mediatype=movie, medianame=$ESCINFO[ListItem.Title],mediapath=$ESCINFO[ListItem.Path])</onclick>
        <onclick condition="Container.Content(musicvideos)">XBMC.RunScript(script.artwork.downloader, mode=gui, mediatype=musicvideo, medianame=$ESCINFO[ListItem.Title],mediapath=$ESCINFO[ListItem.Path])</onclick>
        <visible>[Container.Content(tvshows)|Container.Content(movies)|Container.Content(musicvideos)]+system.hasaddon(script.artwork.downloader)</visible>
    </item>


=== Upgrade Issues ===
'''Runs script in custom mode'''
This section deals with issues relating to upgrading mythicalLibrarian
==== COMSKIP files are not being deleted ====
The comskip tracking file has been upgraded to be an overall file tracking system where all created files are linked to a single master file. When the master file is deleted manually or because mythtv required extra free space, the associated files will be deleted on the next run of mythicalLibrarian.  See this post for the upgrade tool. http://forum.xbmc.org/showpost.php?p=507770&postcount=209


==Notes==
In this mode you can specify an artwork type that you want to download for a specific media item.
mythicalLibrarian is a spawn from the project BashSExx and [[MythSExx]].
When only one image is found it will be just downloaded. When multiple images are found the image selection dialog will be shown for user selection. You can specify multiple artwork types for downloading however this won't show the image selection dialog.
The image dialog is also disabled for ''extrathumbs'' and ''extrafanart''.


[[MythSExx]] can be used if you are strictly trying to rename episodes
''This won't take the add-on settings into account except for extrafanart/extrathumbs.''


mythicalLibrarian is currently in advanced beta stage.
Script command:
    XBMC.runscript(script.artwork.downloader, mode=custom, mediatype=?,medianame=?, <art_type>)


[[category:Linux]]
    XBMC.runscript(script.artwork.downloader, mode=custom, mediatype=?,medianame=?, <art_type>, <art_type>, <art_type>)
[[category:File Sharing|Sources]]
 
Skin example:
    <item id="8">
        <description>Get Artwork</description>
        <label>$LOCALIZE[31316]</label>
        <onclick condition="Container.Content(tvshows)">XBMC.RunScript(script.artwork.downloader, mode=custom, mediatype=tvshow, medianame=$ESCINFO[ListItem.TVShowTitle], extrafanart)</onclick>
        <onclick condition="Container.Content(movies)">XBMC.RunScript(script.artwork.downloader, mode=custom, mediatype=movie, medianame=$ESCINFO[ListItem.Title],mediapath=$ESCINFO[ListItem.Path], extrafanart)</onclick>
        <onclick condition="Container.Content(musicvideos)">XBMC.RunScript(script.artwork.downloader, mode=custom, mediatype=musicvideo, medianame=$ESCINFO[ListItem.Title],mediapath=$ESCINFO[ListItem.Path], extrafanart)</onclick>
        <visible>[Container.Content(tvshows)|Container.Content(movies)|Container.Content(musicvideos)]+system.hasaddon(script.artwork.downloader)</visible>
    </item>
 
== Bulk mode ==
 
'''Run script for multiple media items'''
 
This downloads all available artwork that has been enable in the add-on settings.
 
Script command:
    XBMC.RunScript(script.artwork.downloader, mediatype=?)
 
 
This downloads all available artwork that has been specified in the script command.
 
Script command:
    XBMC.RunScript(script.artwork.downloader, mode=custom, <art_type>,<art_type>,<art_type>)
 
    XBMC.RunScript(script.artwork.downloader, mode=custom, mediatype=?,<art_type>,<art_type>,<art_type>)
 
 
Skin example:
    <item id="8">
        <description>Get Artwork</description>
        <label>$LOCALIZE[31316]</label>
        <onclick condition="Container.Content(tvshows)">XBMC.RunScript(script.artwork.downloader, mediatype=tvshow)</onclick>
        <onclick condition="Container.Content(movies)">XBMC.RunScript(script.artwork.downloader, mediatype=movie)</onclick>
        <onclick condition="Container.Content(musicvideos)">XBMC.RunScript(script.artwork.downloader, mediatype=musicvideos)</onclick>
        <visible>[Container.Content(tvshows)|Container.Content(movies)|Container.Content(musicvideos)]+system.hasaddon(script.artwork.downloader)</visible>
    </item>
 
 
 
== Script options ==
 
 
'''Modes'''
 
These are the available mode like they where explained before
* mode=gui
* mode=custom
* silent=true
 
Script example:
    XBMC.runscript(script.artwork.downloader, mode=custom, extrafanart)
 
    XBMC.runscript(script.artwork.downloader, mode=custom, mediatype=movie, extrafanart)
 
 
'''Silent mode:'''
 
This will run the script in background mode. It will only display the starting and finish notification dialog. Only useful when used for bulk mode.
 
Script bool:
    silent=true
 
Script example:
    XBMC.runscript(script.artwork.downloader, mode=custom, silent=true, extrafanart)
 
    XBMC.runscript(script.artwork.downloader, mode=custom, mediatype=movie, silent=true, extrafanart)
 
 
'''Mediatypes'''
 
Available media types to used in the script command:
* mediatype=movie
* mediatype=tvshow
* mediatype=musicvideo
 
 
'''Medianames'''
 
Available medianame usage for skins:
* Movies:
** medianame=$ESCINFO[ListItem.Title]
** medianame=$ESCINFO[ListItem.Title], mediapath=$ESCINFO[ListItem.Path] ''(This prevents using the wrong library item when multiple versions are found of this movie)''
** medianame=Avatar
* TV Shows:
** medianame=$ESCINFO[ListItem.TVShowTitle]
** medianame=House
* Musicvideos:
** medianame=$ESCINFO[ListItem.Title]
** medianame=$ESCINFO[ListItem.Title], mediapath=$ESCINFO[ListItem.Path] ''(This prevents using the wrong library item when multiple versions are found of this musicvideo)''
** medianame=Adele - Live At The Royal Albert Hall (2011)
 
 
'''Art types'''
 
This are the available art types that can be used in the scrip command.
 
* Movies:
** poster
** fanart
** extrafanart
** extrathumbs
** clearlogo
** clearart
** discart
 
 
* TV Show:
** poster
** seasonposter
** fanart
** extrafanart
** extrathumbs
** clearlogo
** clearart
** tvthumb
** seasonthumb
** banner
** seasonbanner
 
 
* Musicvideos:
** poster
** fanart
** extrafanart
** extrathumbs
** clearlogo
** clearart
** discart
 
= Skin integration for using the images =
 
These are some code examples on how to use some different kind of artwork.
All artwork is downloaded to the TV Show main folder or the Movie folder which contains the media files.
 
These examples are made with the assumption that all TV Show episodes are in season folders. If not you will have to make the necessary adjustments to the code.
 
 
== General ==
 
Replace the '''fanart.jpg''' with the filename found in the filenaming conventions section.
 
'''Skin code examples'''
 
* TV Show and season level:
    $INFO[ListItem.FilenameAndPath,,/fanart.jpg]
 
* TV Show episode level:
    $INFO[ListItem.FilenameAndPath,,../fanart.jpg]
 
* Movie:
    $INFO[ListItem.Path,,fanart.jpg]
 
* Musicvideo:
    $INFO[ListItem.Path,,fanart.jpg]
 
 
 
== Season artwork ==
 
Season artwork is downloaded in the main TV Show folder. The skin must call them from there.
Below are some examples given on how to use season posters. Just replace the filename with the one you want to use.
 
This method applies to:
* poster  (seasonx-poster.jpg)
* banner  (seasonx-banner.jpg)
* thumb 16:9  (seasonx-landscape.jpg)
* thumb 16:9  (seasonall-landscape.jpg)
 
x = single digit seasonnumber
 
'''Skin code examples'''
 
* Season level in library:
    <imagepath background="true">$INFO[ListItem.Path]$INFO[ListItem.Season,season,-poster.jpg]</imagepath>
 
* Episode level in library:
    <imagepath background="true">$INFO[Player.Folderpath]$INFO[VideoPlayer.Season,../season,-poster.jpg]</imagepath>
 
* While playing episode:
    <imagepath background="true">$INFO[Player.Folderpath]$INFO[VideoPlayer.Season,../season,-poster.jpg]</imagepath>
 
== Screenshots ==
 
 
 
----
 
[[Category:Eden add-on repository]]

Revision as of 00:38, 18 March 2012

Artwork Downloader
http://mirrors.xbmc.org/addons/eden/script.artwork.downloader/icon.png

See this add-on on the kodi.tv showcase

Author: paddycarey, putneyj, Martijn

Type: Program
Repo:

Summary: Downloads Artwork for TV shows, Movies and Musicvideos in your library
Home icon grey.png   ▶ Add-ons ▶ Artwork Downloader

Downloads all available artwork for TV shows, Movies and Musicvideos in your library. Check the options for supported artwork

Artwork sources:
www.fanart.tv
www.thetvdb.com
www.themoviedb.org

Remark:
Check your skin to see what type of artwork is supported!
Each TV Show/Movie must have its own folder!

Skin integration:
See readme file

Installing

This add-on is installed from the Add-on browser located in Kodi as follows:

  1. Settings
  2. Add-ons
  3. Install from repository
  4. Program Add-ons
  5. Artwork Downloader
  6. Install
Attention talk.png See the Artwork Downloader forum thread for help and issue report.

Summary

This add-ons searches through your library for all your currently added Movies, TV Shows and Musicvideos and then searches for avaiable artwork. This then is downloaded to the folder location where that media is stored.


Bug and issue reports

  • If anyone finds any bugs or has any suggestions please add them to issues on github or let us know here. DO NOT post parts of you debug log directly. ONLY use http://paste.ubuntu.com/ or http://pastebin.com/ and post the link together with a description of the problem in the forum thread.
  • If you fail to follow this you WONT get help!
  • Incorrect (language) Artwork downloaded? Check one of the source sites and see why. Usually it 's because some-one set it wrong.


Github

Here you can get the latest code and .zip install for testing purpose.

Remember these are BETA version and can break.

Stable version is available in XBMC repo.


Current Features

Download artwork

  • Movies
  • TV Shows
  • Musicvideos


Limit artwork

  • Maximum extrafanart
  • Minimum rating
  • Preferred language (fall-back is always English)
  • Exclude fanart that has text (only available on thetvdb.com)
  • Minimum fanart size Movies (also for Musicvideos)
  • Minimum fanart size TV Shows

Note: Extrafanart will be automaticly deleted when it is found below the limit settings


Overwrite all

  • This will overwrite all current files with the ones that fit the limiter. This option will automatic reset after a download run.


Interface translated in

  • English
  • Dutch
  • Polish (needs updating)
  • German (needs updating)
  • Greek
  • Spanish

Artwork sources:

Please show your support to these sites by donating or contributing new artwork!

Naming conventions

Filenaming

Movies:

  • Poster (poster.jpg)
  • Fanart (fanart.jpg)
  • Extrafanart (<image ID from provider>.jpg)
  • Extrathumbs (thumb1.jpg to thumb4.jpg)
  • Clearart (clearart.png)
  • Logo (logo.png)
  • Discart (disc.png)


TV Shows:

  • Poster (poster.jpg)
  • Season Posters (seasonx.jpg)
  • Fanart (fanart.jpg)
  • Extrafanart (<image ID from provider>.jpg)
  • Clearart (clearart.png)
  • Characterart (character.png)
  • Logo (logo.png)
  • Wide_Banner_Icons (banner.jpg)
  • Season Banners (seasonbannerx.jpg)
  • Thumb 16:9 (landscape.jpg)
  • Season Thumb 16:9 (seasonx-landscape.jpg | seasonall-landscape.jpg)


Musicvideos:

  • Poster (poster.jpg)
  • Fanart (fanart.jpg)
  • Extrafanart (<image ID from provider>.jpg)
  • Extrathumbs (thumb1.jpg to thumb4.jpg)
  • Clearart (clearart.png)
  • Logo (logo.png)
  • Discart (disc.png)

Foldernaming

Movies

|
---Movie 1
   |
   ---extrafanart
   ---extrathumbs

TV Shows

|
---TV Show 1
   |
   ---extrafanart
   ---Season 1
   ---Season 2
   ---Season ....

Skin integration for running the script

This add-on support different kind of skin integration methods. This allows skins to use buttons to download different kinds of artwork for a single media item or in bulk mode.

All commands are case sensitive!


Solo mode

This downloads for a single media item depending from what section of XBMC this is gonna be used from.

Run script for single media item

This downloads all available artwork that has been enable in the add-on settings.

Script command:

   XBMC.RunScript(script.artwork.downloader, mediatype=?, medianame=?)

Skin example:

   <item id="8">
       <description>Get Artwork</description>
       <label>$LOCALIZE[31316]</label>
       <onclick condition="Container.Content(tvshows)">XBMC.RunScript(script.artwork.downloader, mediatype=tvshow, medianame=$ESCINFO[ListItem.TVShowTitle])</onclick>
       <onclick condition="Container.Content(movies)">XBMC.RunScript(script.artwork.downloader, mediatype=movie, medianame=$ESCINFO[ListItem.Title],mediapath=$ESCINFO[ListItem.Path])</onclick>
       <onclick condition="Container.Content(musicvideos)">XBMC.RunScript(script.artwork.downloader, mediatype=musicvideos, medianame=$ESCINFO[ListItem.Title],mediapath=$ESCINFO[ListItem.Path])</onclick>
       <visible>[Container.Content(tvshows)|Container.Content(movies)|Container.Content(musicvideos)]+system.hasaddon(script.artwork.downloader)</visible>
   </item>


Runs script in GUI dialog mode

A menu is displayed with available artwork type. When a artwork type is selected the image list with available images will be displayed. This won't take the add-on settings into account.

The selected image will automaticly overwrite the current one when present.


Script command:

   XBMC.RunScript(script.artwork.downloader, mode=gui, mediatype=?, medianame=?)

Skin example:

   <item id="8">
       <description>Get Artwork</description>
       <label>$LOCALIZE[31316]</label>
       <onclick condition="Container.Content(tvshows)">XBMC.RunScript(script.artwork.downloader, mode=gui, mediatype=tvshow, medianame=$ESCINFO[ListItem.TVShowTitle])</onclick>
       <onclick condition="Container.Content(movies)">XBMC.RunScript(script.artwork.downloader, mode=gui, mediatype=movie, medianame=$ESCINFO[ListItem.Title],mediapath=$ESCINFO[ListItem.Path])</onclick>
       <onclick condition="Container.Content(musicvideos)">XBMC.RunScript(script.artwork.downloader, mode=gui, mediatype=musicvideo, medianame=$ESCINFO[ListItem.Title],mediapath=$ESCINFO[ListItem.Path])</onclick>
       <visible>[Container.Content(tvshows)|Container.Content(movies)|Container.Content(musicvideos)]+system.hasaddon(script.artwork.downloader)</visible>
   </item>

Runs script in custom mode

In this mode you can specify an artwork type that you want to download for a specific media item. When only one image is found it will be just downloaded. When multiple images are found the image selection dialog will be shown for user selection. You can specify multiple artwork types for downloading however this won't show the image selection dialog. The image dialog is also disabled for extrathumbs and extrafanart.

This won't take the add-on settings into account except for extrafanart/extrathumbs.

Script command:

   XBMC.runscript(script.artwork.downloader, mode=custom, mediatype=?,medianame=?, <art_type>)
   XBMC.runscript(script.artwork.downloader, mode=custom, mediatype=?,medianame=?, <art_type>, <art_type>, <art_type>)

Skin example:

   <item id="8">
       <description>Get Artwork</description>
       <label>$LOCALIZE[31316]</label>
       <onclick condition="Container.Content(tvshows)">XBMC.RunScript(script.artwork.downloader, mode=custom, mediatype=tvshow, medianame=$ESCINFO[ListItem.TVShowTitle], extrafanart)</onclick>
       <onclick condition="Container.Content(movies)">XBMC.RunScript(script.artwork.downloader, mode=custom, mediatype=movie, medianame=$ESCINFO[ListItem.Title],mediapath=$ESCINFO[ListItem.Path], extrafanart)</onclick>
       <onclick condition="Container.Content(musicvideos)">XBMC.RunScript(script.artwork.downloader, mode=custom, mediatype=musicvideo, medianame=$ESCINFO[ListItem.Title],mediapath=$ESCINFO[ListItem.Path], extrafanart)</onclick>
       <visible>[Container.Content(tvshows)|Container.Content(movies)|Container.Content(musicvideos)]+system.hasaddon(script.artwork.downloader)</visible>
   </item>

Bulk mode

Run script for multiple media items

This downloads all available artwork that has been enable in the add-on settings.

Script command:

   XBMC.RunScript(script.artwork.downloader, mediatype=?)


This downloads all available artwork that has been specified in the script command.

Script command:

   XBMC.RunScript(script.artwork.downloader, mode=custom, <art_type>,<art_type>,<art_type>)
  
   XBMC.RunScript(script.artwork.downloader, mode=custom, mediatype=?,<art_type>,<art_type>,<art_type>)
  

Skin example:

   <item id="8">
       <description>Get Artwork</description>
       <label>$LOCALIZE[31316]</label>
       <onclick condition="Container.Content(tvshows)">XBMC.RunScript(script.artwork.downloader, mediatype=tvshow)</onclick>
       <onclick condition="Container.Content(movies)">XBMC.RunScript(script.artwork.downloader, mediatype=movie)</onclick>
       <onclick condition="Container.Content(musicvideos)">XBMC.RunScript(script.artwork.downloader, mediatype=musicvideos)</onclick>
       <visible>[Container.Content(tvshows)|Container.Content(movies)|Container.Content(musicvideos)]+system.hasaddon(script.artwork.downloader)</visible>
   </item>


Script options

Modes

These are the available mode like they where explained before

  • mode=gui
  • mode=custom
  • silent=true

Script example:

   XBMC.runscript(script.artwork.downloader, mode=custom, extrafanart)
   XBMC.runscript(script.artwork.downloader, mode=custom, mediatype=movie, extrafanart)


Silent mode:

This will run the script in background mode. It will only display the starting and finish notification dialog. Only useful when used for bulk mode.

Script bool:

   silent=true

Script example:

   XBMC.runscript(script.artwork.downloader, mode=custom, silent=true, extrafanart)
   XBMC.runscript(script.artwork.downloader, mode=custom, mediatype=movie, silent=true, extrafanart)


Mediatypes

Available media types to used in the script command:

  • mediatype=movie
  • mediatype=tvshow
  • mediatype=musicvideo


Medianames

Available medianame usage for skins:

  • Movies:
    • medianame=$ESCINFO[ListItem.Title]
    • medianame=$ESCINFO[ListItem.Title], mediapath=$ESCINFO[ListItem.Path] (This prevents using the wrong library item when multiple versions are found of this movie)
    • medianame=Avatar
  • TV Shows:
    • medianame=$ESCINFO[ListItem.TVShowTitle]
    • medianame=House
  • Musicvideos:
    • medianame=$ESCINFO[ListItem.Title]
    • medianame=$ESCINFO[ListItem.Title], mediapath=$ESCINFO[ListItem.Path] (This prevents using the wrong library item when multiple versions are found of this musicvideo)
    • medianame=Adele - Live At The Royal Albert Hall (2011)


Art types

This are the available art types that can be used in the scrip command.

  • Movies:
    • poster
    • fanart
    • extrafanart
    • extrathumbs
    • clearlogo
    • clearart
    • discart


  • TV Show:
    • poster
    • seasonposter
    • fanart
    • extrafanart
    • extrathumbs
    • clearlogo
    • clearart
    • tvthumb
    • seasonthumb
    • banner
    • seasonbanner


  • Musicvideos:
    • poster
    • fanart
    • extrafanart
    • extrathumbs
    • clearlogo
    • clearart
    • discart

Skin integration for using the images

These are some code examples on how to use some different kind of artwork. All artwork is downloaded to the TV Show main folder or the Movie folder which contains the media files.

These examples are made with the assumption that all TV Show episodes are in season folders. If not you will have to make the necessary adjustments to the code.


General

Replace the fanart.jpg with the filename found in the filenaming conventions section.

Skin code examples

  • TV Show and season level:
   $INFO[ListItem.FilenameAndPath,,/fanart.jpg]
  • TV Show episode level:
   $INFO[ListItem.FilenameAndPath,,../fanart.jpg]
  • Movie:
   $INFO[ListItem.Path,,fanart.jpg]
  • Musicvideo:
   $INFO[ListItem.Path,,fanart.jpg]


Season artwork

Season artwork is downloaded in the main TV Show folder. The skin must call them from there. Below are some examples given on how to use season posters. Just replace the filename with the one you want to use.

This method applies to:

  • poster (seasonx-poster.jpg)
  • banner (seasonx-banner.jpg)
  • thumb 16:9 (seasonx-landscape.jpg)
  • thumb 16:9 (seasonall-landscape.jpg)

x = single digit seasonnumber

Skin code examples

  • Season level in library:
   <imagepath background="true">$INFO[ListItem.Path]$INFO[ListItem.Season,season,-poster.jpg]</imagepath>
  • Episode level in library:
   <imagepath background="true">$INFO[Player.Folderpath]$INFO[VideoPlayer.Season,../season,-poster.jpg]</imagepath>
  • While playing episode:
   <imagepath background="true">$INFO[Player.Folderpath]$INFO[VideoPlayer.Season,../season,-poster.jpg]</imagepath>

Screenshots