Artwork Downloader

  Thread Rating:
  • 13 Vote(s) - 4.31 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Milhouse Offline
Team-Kodi Member
Posts: 6,608
Joined: Jan 2011
Reputation: 182
Post: #2386
On texturecache,py you can create a log with @logfile=c:\tc.log. There's no log for mklocal.py apart from what you see on the screen, but if you add "--dryrun" then it shouldn't make any changes to the file system (changes to the media library only happen if you run the output from mklocal.py through "texturecache.py set").

Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
find quote
Dave the Minion Offline
Member
Posts: 81
Joined: Jun 2015
Reputation: 0
Post: #2387
(2015-07-09 01:23)Glorious1 Wrote:  You're right, it doesn't make a difference. So just name it disc.png and clearart.png, tell Artwork Downloader to import it to Kodi, and you're done. I don't see what the big problem is. Kodi does not recognize the extra artwork automatically, so people who download their own local artwork still need to use AD.

The difference is I don't need to run Artwork Downloader to scan through my entire library (over 10,000 items) just to add 3 pieces of artwork to 1 new movie. So I do it manually. It's my choice to do it manually and I enjoy doing it manually. But that's the reason I need files Kodi will recognize as well as files Artwork Downloader will find. To combine the 2 into 1 is the goal of my first post. Still working on that solution for myself which I hope to share with others and who knows if it can be worked into the add-on itself.
find quote
diedrichg Offline
Junior Member
Posts: 9
Joined: Aug 2014
Reputation: 0
Post: #2388
Hello authors, I am having an issue in Isengard 15.0 RC2 where I am unable to update the Thumb because the "Thumb 16:9" menu item is not the same as Thumb which is the image that is being displayed. You can see this by viewing Movies and setting the view to List. I'm not seeing a nice, large poster of the movie and am rather seeing some obscure image or movie clip.
(This post was last modified: 2015-07-16 21:21 by diedrichg.)
find quote
masinad Offline
Member
Posts: 57
Joined: Sep 2013
Reputation: 1
Post: #2389
(2013-05-25 06:54)Milhouse Wrote:  @Ghostdivision - do you have cron?

There's probably other scripts that can automate add-on execution but I've added such support to Texture Cache Maintenance utility:

Code:
cron@12:00: ./texturecache.py exec script.artwork.downloader silent=true mediatype=movie
cron@12:30: ./texturecache.py exec script.artwork.downloader silent=true mediatype=tvshow
and subsequently pre-loading your cache won't hurt either:
Code:
cron@01:00:./texturecache.py c video

Alternatively, you can write a script that is able to detect when each AD run has finished so that calls to AD can be run serialised without any delay.

Here's an example bash script that I use which initiates a video library scan, followed by calls to AD for movies then tvshows, and finally the texture cache is pre-loaded if any new items have been added (either a full library pre-load or just incremental depending on whether AD has added any new items).

Code:
#!/bin/bash
LOGFILE=/var/log/xbmcscan.log

function _log {
  [ -z "$1" ] && echo >> $LOGFILE || $PRINTF "$(date +"%Y-%m-%d %H:%M:%S"): $1\n" >> $LOGFILE
}

function waitForAD {
  XBMC="/mnt/share/xbmc/rpi1/Storage/.xbmc"
  XBMC_LOG="${XBMC}/temp/xbmc.log"
  AD_REPORT="${XBMC}/userdata/addon_data/script.artwork.downloader/downloadreport.txt"

  tail -fn0 "${XBMC_LOG}" | \
    while read line; do
      if [ -n "$(echo "$line" | grep "Artwork Downloader: script stopped")" ]; then
        kill $(ps -o pid,args | grep -v grep | grep "tail -fn0 ${XBMC_LOG}" | awk '{ print $1 }') 2>/dev/null
        break
      fi
    done

  echo $(grep -e '^ - Total Artwork: 0$' "${AD_REPORT}" | awk '{ print $4 }')
}

NEWITEMS=0

_log "$(/mnt/share/bin/texturecache.py update 2>/dev/null)"
VSCAN="$(/mnt/share/bin/texturecache.py vscan 2>/dev/null)"
RESULT=$?
_log "$(echo "${VSCAN}")"

/mnt/share/bin/texturecache.py exec script.artwork.downloader silent=true mediatype=movie
NEWITEMS=$(($NEWITEMS + $(waitForAD "movies")))
/mnt/share/bin/texturecache.py exec script.artwork.downloader silent=true mediatype=tvshow
NEWITEMS=$(($NEWITEMS + $(waitForAD "tvshows")))

if [ ${NEWITEMS} -ne 0 ]; then
  _log "New AD items downloaded - performing a full cache pre-load"
  _log "\n$(/mnt/share/bin/texturecache.py c movies 2>/dev/null)"
  _log "\n$(/mnt/share/bin/texturecache.py c tvshows 2>/dev/null)"
elif [ ${RESULT} -ne 0 ]; then
  _log "No new AD items - performing a partial cache pre-load"
  _log "\n$(/mnt/share/bin/texturecache.py lc movies 2>/dev/null)"
  _log "\n$(/mnt/share/bin/texturecache.py lc tvshows 2>/dev/null)"
else
  _log "Skipping cache pre-load - no new artwork items added"
fi

touch /tmp/texturecache.lastrun

/mnt/share/bin/texturecache.cfg:
Code:
xbmc.host=192.168.0.202
userdata=/mnt/share/xbmc/rpi1/Storage/.xbmc/userdata
cache.castthumb = yes
logfile=+/tmp/texturecache.log
lastrunfile=/tmp/texturecache.lastrun

I run this script automatically on a remote FreeNAS system that I rsync new media to, so it only runs once the new media has hit the remote server - a Raspberry Pi running OpenELEC with its /storage partition mounted on NFS is connected to the NAS.

This gives me some errors. some1 help me to fix this?

Code:
htpc@htpc-desktop:~/Kodi_scripts/Bash/Auto.call.scripts$ sudo ./Organice.library.v2.sh
./Organice.library.v2.sh: line 5: 2015-07-22 20:47:25: Rescanning library...\n: command not found
./Organice.library.v2.sh: line 5: 2015-07-22 20:47:52: Skipping cache pre-load - no new artwork items added\n: command not found
find quote
Milhouse Offline
Team-Kodi Member
Posts: 6,608
Joined: Jan 2011
Reputation: 182
Post: #2390
There's an error in the script, add PRINTF=printf at line 3. You also need to change the various filepaths to reflect your own system - this was an example/proof of concept (not particularly well written, I admit) based on my system at the time, so paths such as /mnt/share/bin/texturecache.py won't work on your system. Blindly copying the script won't work, you really need to understand what it's doing and adapt it to your own set up.

Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
(This post was last modified: 2015-07-22 20:09 by Milhouse.)
find quote
masinad Offline
Member
Posts: 57
Joined: Sep 2013
Reputation: 1
Post: #2391
Thank you, got it working now Smile

--EDIT--

Maybe you will find time and make an update for your old script NodAngel.
Is really useful, using this script whit xbmc.callbacks2 script.

Also thank you Blush
(This post was last modified: 2015-07-22 20:25 by masinad.)
find quote
kazak Offline
Junior Member
Posts: 15
Joined: Jun 2015
Reputation: 0
Post: #2392
In some cases, AD doesn't grab the most downloaded, highest rated poster. It some cases, it downloads the poster with 0 votes and almost no downloads. Why is it doing this and how can I change this behavior? I would like all my other addons and media clients using the same posters (most common ones) without any issue.
(This post was last modified: 2015-07-23 05:01 by kazak.)
find quote
Nukles Offline
Junior Member
Posts: 16
Joined: Feb 2014
Reputation: 0
Post: #2393
Hi all. After having to re-install Kodi from the start, my Artwork Downloader seems not to be working properly anymore. Previously after installing AEON MQ5, I got all the Logos/Clearart and Disc Arts downloaded automatically for all the Movies and TV Shows in my collection. Now this doesn't happen anymore and I don't know what I am doing wrong...

In order to get the Disc Art and Logo/Clearart, I have to do the following:
- For each Movie / TV Show
- Select the Movie
- Click on "C" (context menu)
- Click on "Get Logo/Clearart GUI Mode"
- Select the favourite Disc Art or Logo

So it's a manual process that needs to be done for each movie.

Is there a way to do it once and for all for all movies in my collection? I tried to remove the Movie Source and re-add it, selecting Themoviedb as a scraper, but it didn't work.

Thanks!
find quote
Frozin Online
Senior Member
Posts: 299
Joined: Aug 2012
Reputation: 4
Post: #2394
(2015-07-27 08:06)Nukles Wrote:  Hi all. After having to re-install Kodi from the start, my Artwork Downloader seems not to be working properly anymore. Previously after installing AEON MQ5, I got all the Logos/Clearart and Disc Arts downloaded automatically for all the Movies and TV Shows in my collection. Now this doesn't happen anymore and I don't know what I am doing wrong...

In order to get the Disc Art and Logo/Clearart, I have to do the following:
- For each Movie / TV Show
- Select the Movie
- Click on "C" (context menu)
- Click on "Get Logo/Clearart GUI Mode"
- Select the favourite Disc Art or Logo

So it's a manual process that needs to be done for each movie.

Is there a way to do it once and for all for all movies in my collection? I tried to remove the Movie Source and re-add it, selecting Themoviedb as a scraper, but it didn't work.

Thanks!

Go to programs and click on artwork downloaded and it will download all art

[Image: all-clearlogo.jpg]
find quote
Post Reply