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

Add-on:Artwork Downloader

From Kodi
Revision as of 21:27, 28 August 2012 by NedBot (Talk)

Jump to: navigation, search

Artwork Downloader
Author: paddycarey, putneyj, Martijn

Type: Program
Version: 1.0.15
Repo: XBMC.org (v12)
XBMC.org (v11)

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

Contents

1 Installing

To install this add-on you must do so from the Add-on manager from within XBMC by going to:

  1. Settings
  2. Add-ons
  3. Get add-ons
  4. XBMC.org Add-ons
  5. Program Add-ons
  6. Artwork Downloader
  7. Install
Attention talk.png See the Artwork Downloader forum thread for help and issue report.

'Website: http://xbmctech.com'

2 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.



3 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.


4 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.

5 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

  • Dutch
  • English
  • French
  • German (needs updating)
  • Greek
  • Polish (needs updating)
  • Portuguese (Brazil)
  • Spanish

6 Artwork sources:

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

7 Naming conventions

7.1 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)

7.2 Foldernaming

7.2.1 Movies

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

7.2.2 TV Shows

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

7.3 Discart

The script uses several rules to check what discart to download.

7.3.1 Language

It uses the set language in add-on settings and if not found it will fall back to the English one available.


7.3.2 Filenames

If the filename contains any of the following that disctype will be downloaded. The uses check are case insensitive.

DVD:

  • dvd
  • extension .ifo
  • extension .vob


BluRay:

  • bluray
  • blu-ray
  • brrip
  • bdrip
  • extension .m2ts
  • extension .bdmv


3D movies:

  • 3d (so even when 3d-bluray or 3dbluray or 3dbd)

7.3.3 Streamdetails

When none of these are found in the filename the disctype will be determined by the streamdetails.

Streamdetails height:

  • <720 downloads DVD
  • =>720 downloads BluRay

8 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!


8.1 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>

8.2 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>


8.3 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
    • characterart


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

9 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.


9.1 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]


9.2 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>

9.3 Screenshots




Personal tools
Namespaces

Variants
Actions
Navigation
Wiki help
Toolbox