Add-on:Artwork Downloader

From Official Kodi Wiki
Jump to navigation Jump to search
Artwork Downloader
icon.png

See this add-on on the kodi.tv showcase

Author: Martijn

Type: Program
Repo:

Source: Source code
Summary: Downloads Artwork for TV shows, Movies and Musicvideos in your library
Home icon grey.png   ▶ Add-ons ▶ Artwork Downloader
Attention talk.png Need help with this add-on? See here.

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

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

Artwork sources:

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

Naming conventions

Filenaming

Movies:

  • Poster (poster.jpg)
  • Artwork (fanart.jpg)
  • Artwork (<image ID from provider>.jpg)
  • Extrathumbs (thumb1.jpg to thumb4.jpg)
  • Clearart (clearart.png)
  • Logo (logo.png)
  • Discart (disc.png)
  • Banner (banner.jpg)
  • Thumb 16:9 (landscape.jpg)

TV Shows:

  • Poster (poster.jpg)
  • Season Posters (seasonx.jpg)
  • Artwork (fanart.jpg)
  • Artwork (<image ID from provider>.jpg)
  • Clearart (clearart.png)
  • Characterart (character.png)
  • Logo (logo.png)
  • Banner (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)
  • Artwork (fanart.jpg)
  • Artwork (<image ID from provider>.jpg)
  • Extrathumbs (thumb1.jpg to thumb4.jpg)
  • Clearart (clearart.png)
  • Logo (logo.png)
  • Discart (disc.png)
See: Artwork

Foldernaming

Movies

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

TV Shows

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

Discart

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

Language

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


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)

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

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: Eden

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>


Solo mode: Frodo

As of XBMC v12 Frodo:

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=?, dbid=?)

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, dbid=$INFO[ListItem.DBID])</onclick>
       <onclick condition="Container.Content(movies)">XBMC.RunScript(script.artwork.downloader, mediatype=movie, dbid=$INFO[ListItem.DBID])</onclick>
       <onclick condition="Container.Content(musicvideos)">XBMC.RunScript(script.artwork.downloader, mediatype=musicvideos, dbid=$INFO[ListItem.DBID])</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=?, dbid=?)

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, dbid=$INFO[ListItem.DBID])</onclick>
       <onclick condition="Container.Content(movies)">XBMC.RunScript(script.artwork.downloader, mode=gui, mediatype=movie, dbid=$INFO[ListItem.DBID])</onclick>
       <onclick condition="Container.Content(musicvideos)">XBMC.RunScript(script.artwork.downloader, mode=gui, mediatype=musicvideo, dbid=$INFO[ListItem.DBID])</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=?,dbid=?, <art_type>)
   XBMC.runscript(script.artwork.downloader, mode=custom, mediatype=?,dbid=?, <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, dbid=$INFO[ListItem.DBID], extrafanart)</onclick>
       <onclick condition="Container.Content(movies)">XBMC.RunScript(script.artwork.downloader, mode=custom, mediatype=movie, dbid=$INFO[ListItem.DBID], extrafanart)</onclick>
       <onclick condition="Container.Content(musicvideos)">XBMC.RunScript(script.artwork.downloader, mode=custom, dbid=$INFO[ListItem.DBID], 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)


The use of medianames is removed and replaced by:

   dbid=$INFO[ListItem.DBID]

Art types

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

  • Movies:
    • poster
    • fanart
    • extrafanart
    • extrathumbs
    • clearlogo
    • clearart
    • discart
    • thumb
    • banner
  • TV Show:
    • poster
    • seasonposter
    • fanart
    • extrafanart
    • extrathumbs
    • clearlogo
    • clearart
    • tvthumb
    • seasonthumb
    • banner
    • seasonbanner
    • characterart


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

Frodo-only infolabels, supported from Artwork Downloader 12.0.2 onwards

  • Movies:
   $INFO[ListItem.Art(clearlogo)]
   $INFO[ListItem.Art(clearart)]
   $INFO[ListItem.Art(banner)]
   $INFO[ListItem.Art(landscape)]
   $INFO[ListItem.Art(discart)]
  • TV shows (at TV show and season level)
   $INFO[ListItem.Art(clearlogo)]
   $INFO[ListItem.Art(clearart)]
   $INFO[ListItem.Art(banner)]
   $INFO[ListItem.Art(landscape)]
   $INFO[ListItem.Art(characterart)]
  • TV shows (at episode level)
   $INFO[ListItem.Art(tvshow.clearlogo)]
   $INFO[ListItem.Art(tvshow.clearart)]
   $INFO[ListItem.Art(tvshow.banner)]
   $INFO[ListItem.Art(tvshow.landscape)]
   $INFO[ListItem.Art(tvshow.characterart)]


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