Add-on:Artwork Downloader and Template:Infobox: Difference between pages

From Official Kodi Wiki
(Difference between pages)
Jump to navigation Jump to search
>Wemcdonald
No edit summary
 
m (rvt - it is for me if it is for you)
 
Line 1: Line 1:
{{Addon
{| class="infobox bordered" style="width: 25em; text-align: left; font-size: 95%;"
|Name=Artwork Downloader
|+ style="font-size: larger;" | '''{{{name}}}'''
|provider-name=Martijn
|-
|ID=script.artwork.downloader
| colspan="2" style="text-align:center;" | [[Image:{{{image}}}|300px| ]]<br>{{{caption}}}
|latest-version=12.0.14
|-
|extension point=xbmc.python.script
! Data 1:
|provides=executable
| {{{data1}}}
|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
! Data 2:
Artwork sources:
| {{{data2|''this text displayed if data2 not defined''}}}
www.fanart.tv
|-
www.thetvdb.com
! Data 3 (data hidden if data3 empty or not defined):
www.themoviedb.org
| {{{data3|}}}
Remark:
{{qif|test={{{data4|}}}|then=<tr><th>Data 4 (row hidden if data4 empty):<td>{{{data4}}} }}
Check your skin to see what type of artwork is supported!
{{qif|test={{{na{{{data5|}}}me|}}}|then=<tr><th>Data 5 (row hidden if data5 not empty):<td>{{{data5}}} }}
Each TV Show/Movie must have its own folder!
|-
Skin integration:
| colspan="2" style="font-size: smaller;" | {{{footnotes|}}}
See readme file
|}<noinclude>
|Platform=all
|broken=
|icon url=http://mirrors.xbmc.org/addons/frodo/script.artwork.downloader/icon.png}}


{{forum link2|See the [[forum:114633|Artwork Downloader forum thread]] for help and issue report.}}
<br style="clear:both" />
== Usage ==
Copy this code


'''''Website: http://xbmctech.com'''''
<pre>
{| class="infobox bordered" style="width: 25em; text-align: left; font-size: 95%;"
|+ style="font-size: larger;" | '''{{{name}}}'''
|-
| colspan="2" style="text-align:center;" | [[Image:{{{image}}}|300px| ]]<br>{{{caption}}}
|-
! Data 1:
| {{{data1}}}
|-
! Data 2:
| {{{data2|''this text displayed if data2 not defined''}}}
|-
! Data 3 (data hidden if data3 empty or not defined):
| {{{data3|}}}
{{qif|test={{{data4|}}}|then=<tr><th>Data 4 (row hidden if data4 empty):<td>{{{data4}}} }}
{{qif|test={{{na{{{data5|}}}me|}}}|then=<tr><th>Data 5 (row hidden if data5 not empty):<td>{{{data5}}} }}
! Data 5 (row hidden if data5 not empty):
| {{{data5}}}
|-
| colspan="2" style="font-size: smaller;" | {{{footnotes|}}}
|}
</pre>


= 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. <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.
= 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.
* Project: [https://github.com/XBMC-Addons/script.artwork.downloader https://github.com/XBMC-Addons/script.artwork.downloader]
= 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: =
*[http://www.fanart.tv www.fanart.tv]
*[http://www.thetvdb.com www.thetvdb.com]
*[http://www.themoviedb.org www.themoviedb.org]
'''Please show your support to these sites by donating or contributing new artwork!'''
= Naming conventions =
== Filenaming ==
'''Movies:'''
*Poster ''(poster.jpg)''
*[[FanArt]] ''(fanart.jpg)''
*[[Extra_fanart]] ''(<image ID from provider>.jpg)''
*Extrathumbs ''(thumb1.jpg to thumb4.jpg)''
*Clearart ''(clearart.png)''
*Logo ''(logo.png)''
*Discart ''(disc.png)''
*[[Wide_Banner_Icons]] ''(banner.jpg)''
*Thumb 16:9 ''(landscape.jpg)''
'''TV Shows:'''
*Poster (poster.jpg)
*Season Posters ''(seasonx.jpg)''
*[[FanArt]] ''(fanart.jpg)''
*[[Extra_fanart]] ''(<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)''
*[[Extra_fanart]] ''(<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 ./
== 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 <u>insensitive</u>.
'''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.
'''''<u>All commands are case sensitive!</u>'''''
== 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]
== 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 ==
<gallery>
File:AD_GUI_Movies.jpg|Movie GUI menu
File:AD_GUI_Movies_Logo.jpg|Movie Clearlogo selection
File:AD_GUI_Movies_Discart.jpg|Movie Moviediscselection
File:Settings-General.png|Settings-General
File:AD_Settings-Limit-Artwork.png|Settings-Limit-Artwork
File:AD_Settings-Movies.png|Settings-Movies
File:AD_Settings-TVShows1.png|Settings-TVShows1
File:AD_Settings-TVShows2.png|Settings-TVShows2
File:AD_Settings-Musicvideo.png|Settings-Musicvideo
File:AD_Settings-Advanced.png|Settings-Advanced
File:AD_Settings-Info.png|Settings-Info
File:AD_GUI-Mode-TVShows-User-Interaction.png|GUI-Mode-TVShows-User-Interaction
File:AD_GUI-Mode-TVShows-Choose-Artwork.png|GUI-Mode-TVShows-Choose-Artwork
File:AD_GUI-Mode-TVShows-Choose-Download.png|GUI-Mode-TVShows-Choose-Download
File:AD_GUI-Mode-TVShows-Cleaning-up.png|GUI-Mode-TVShows-Cleaning-up
File:AD_GUI-Mode-TVShows-Confirmation.png|GUI-Mode-TVShows-Confirmation
File:AD_GUI-Mode-Movie-Menu.png|GUI-Mode-Movie-Menu
File:AD_GUI-Mode-Movie-Clearlogo-selection.png|GUI-Mode-Movie-Clearlogo-selection
File:AD_GUI-Mode-Movie-Disc-selection.png|GUI-Mode-Movie-Disc-selection
</gallery>
----
==See also==
==See also==
'''Development:'''
*[[Wikipedia:Infobox]]
* [[Skinning]]


[[Category:Development]]
[[Category:infobox templates|{{PAGENAME}}]]
[[Category:Skin Development]]


[[Category:Frodo add-on repository]]
[[zh:Template:Infobox]]
[[Category:Eden add-on repository]]
</noinclude>

Revision as of 05:32, 14 February 2006

{{{name}}}
[[Image:{{{image}}}|300px| ]]
{{{caption}}}
Data 1: {{{data1}}}
Data 2: this text displayed if data2 not defined
Data 3 (data hidden if data3 empty or not defined):

Template:Qif Template:Qif


Usage

Copy this code

{| class="infobox bordered" style="width: 25em; text-align: left; font-size: 95%;"
|+ style="font-size: larger;" | '''{{{name}}}'''
|-
| colspan="2" style="text-align:center;" | [[Image:{{{image}}}|300px| ]]<br>{{{caption}}}
|- 
! Data 1:
| {{{data1}}}
|- 
! Data 2:
| {{{data2|''this text displayed if data2 not defined''}}}
|- 
! Data 3 (data hidden if data3 empty or not defined):
| {{{data3|}}}
{{qif|test={{{data4|}}}|then=<tr><th>Data 4 (row hidden if data4 empty):<td>{{{data4}}} }}
{{qif|test={{{na{{{data5|}}}me|}}}|then=<tr><th>Data 5 (row hidden if data5 not empty):<td>{{{data5}}} }}
! Data 5 (row hidden if data5 not empty):
| {{{data5}}}
|- 
| colspan="2" style="font-size: smaller;" | {{{footnotes|}}}
|}

See also

zh:Template:Infobox