Move Library - Thumb rehash
#1
Hi guys

I recently moved all my movies to a different location on a new NAS. I host the DB on my Synology box/MySQL. I found this guide on how and what I need to change in order for XBMC to work with the new file locations and so this is what I have done:

1. Updated the path table in the database and replaced path from old to new

2. Updated sources.xml with new paths

*At this stage, XBMC can see the new paths and play movies no problem

3. Thumbnail Cache - This is where I am stuck. I create a blank DB and add the new DB to the advancedsettings.xml (<name>xbmc_video10</name> for example). I then open XBMC and everything is blank with 0 movies etc. I then hit update library and for a brief second "Compressing database" appears and then nothing happens Sad In XBMC i then checked Vides - Files - Movies (which is my source for my films). I then right click and go to "set content" to check settings and notice content is set to none. I then change content to movies and add the universal scraper, movies are in separate folders recursive etc. I then do another update library and get the "Compressing database" followed by nothing again. I check a second time the set content settings and noticed its reverted back to none again and it just keeps doing this. If I revert advancedsettings.xml database back to the fully loaded XBMC database, Content is set to movies etc and scrapper works fine

I have seen a few other methods on how to do this but they seem to relate to non OS X scripting solutions. Am I going about this the correct way do you think and if so any suggestions what is going wrong at stage 3 of this mission?

Unfortunately I am at work so wont be able to provide a debug log until tonight.

Many thanks!
Reply
#2
Export db to xml,
Change passes in xml
Import db from xml.

At both times you should not create the DB preor to importing. XBMC will create the mysql db by its own since frodo 12.0 and will fail when it already exists. Also you should not add the name of the db in advanced settings. Let XBMC handle this...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#3
If you just want to repopulate your texture cache with artwork referencing the new path, that's pretty easy.

Best approach would be to prune your existing texture cache (deleting those artwork items referencing the old path) then use the "c" option to repopulate the texture cache with the artwork referencing the new path.
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.
Reply
#4
Thanks for responses

@Memphiz - sorry to sound stupid but can you be more specific? Lets say I put everything back to how it was before changing paths and files locations etc.

Step 1 do I export the the db to xml using xbmc (System - Video - Library - Export Video Library - Single file)?
Step 2 Change paths in xml
Step 4 Change paths in sources.xml?
Step 4 import xml back into xbmc (System - Video - Library - Import)?
*no changes to SQL required as this is all done by XBMC? No changes to advancedsettings.xml - just keep it pointing to sql db host?
Step 5 repopulate texture cache using MilhouseVH post? - Is this step required? Multiple computers will be accessing the library
Reply
#5
(2013-08-30, 19:21)diverseft Wrote: Step 5 repopulate texture cache using MilhouseVH post? - Is this step required? Multiple computers will be accessing the library

Required? No. However based on the title of this thread, and your initial post ("Thumbnail Cache - This is where I am stuck."), it seemed like it may have been useful to you. In fact given your intial post, where you say you had successfully changed the paths in the database, I'm really not sure why you are now exporting your db if your last remaining issue is a texture cache problem.
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.
Reply
#6
MilhouseVH - Agreed. I think because using the original method of editing SQL tables with new paths etc, i missed certain things like Stacking multiple parts of movies etc and things got messy so decided to revert back to old setup and start again using Memphiz suggested method of export to xml edit paths and import which seems to have worked. Slowly all the thumbs are coming back as well. Buts its good to no your script exists for future.

Thank you both very much
Reply
#7
I have noticed something slightly strange. All artwork is now back in xbmc but I have some movies that are not using the correct artwork and things like disc or clear art are missing. other movies everything is correct. I have disc.png, clearart.png etc in each movie folder all labelled correctly. Should it not just use that without user intervention?
Reply
#8
The stock scanner only knows about poster and fanart. You'll need to use an addon such as Artwork Downloader to add non-standard artwork (disc.png, clearart.png, logo.png etc.) to your library.
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.
Reply
#9
Sorry. I wrote that late last night and failed to mention that. I am using Artwork Downloader addon. On my nas I have each movie folder containing for example:

300

300-clearart.png
300-clearlogo.png
300-discart.png
300-fanart.jpg
300-poster.jpg
300-thumb.jpg
300.avi
300.nfo
300.tbn
extrafanart

After letting XBMC do its thing naturally with artwork some movies have either not used the same artwork as whats in the movie folders locally, or have failed to load the artwork at all. Other movies have loaded everything fine. So I ran Artwork Downloader ensuring "use local files" was selected and after a few hours it finished downloading 1524 artworks. So now I have additional files in my movie folders logo.png, clearart.png etc etc which already are there with different naming convention. I then checked XBMC to see if the correct artwork was displaying but nothing has actually changed.
Reply
#10
Artwork Downloader doesn't yet support the moviename name prefix (300-) but exporting your library has created these additional artwork files with the moviename prefix. It's one of life's joyous little incompatibilities....

My suggestion would be to write a simple script which iterates over your movie folders and removes the moviename prefix from the additional artwork (rename *-clearart.png -> clearart.png, *-logo.png -> logo.png, *-discart.png -> discart.png etc., probably also whatever is in extrafanart if those files also have a prefix). In fact you could remove the moviename from all artwork files including fanart and poster as the moviename prefix is unnecessary when using individual movie folders, it's probably not even necessary on the video or nfo files (they could just be called movie.avi and movie.nfo).

You could/should also delete the thumbnails (300.tbn, 300-thumb.jpg) as they're now deprecated.

Once you've straightened out the naming of your files, I'd probably dump the databases and start scraping over again... Smile
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.
Reply
#11
Thank you very much for all the information you have provided. Im trying to test it tonight but my scripting skills have got the better of me and Im not too sure how to achieve the renaming.

I am trying to use the rename utility and use one command per artwork to keep things nice and simple:

rename ’s/*.png/clearlogo.png/’ *clearlogo.png

Nothing seems to happen. i have also tried:

for FILE in *-clearlogo.png; do mv "$FILE" $(echo "$FILE" | sed 's/*-clearlogo.png/clearlogo.png/'); done

Still no joy. I am running this on a Synology box so wonder if its got something to do with that.
Reply
#12
I would suggest making a backup of your artwork before proceeding.

With that said, try:

Code:
find . -name '*-clearart.png' | sed -E 's#(.*/)(.*-)(.*.png)#mv "\1\2\3" "\1\3"#' > renamer

"more renamer" to visually confirm if the rename commands appear correct. Then...

Code:
sh renamer

to execute the script and rename the clearart.png files. Repeat for *-logo.png etc.
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.
Reply
#13
Thanks! I have tested this on 1 folder "300". I run the find command. which creates the renamer file. I then type more renamer and get:

./300-clearart.png

I then do sh renamer:

Pistachios> sh renamer
: not foundart.png: line 1: ?PNG
./300-clearart.png: line 2: : not found
./300-clearart.png: line 3: syntax error: unexpected newline

File is called: 300-clearart.png
Reply
#14
No, that's not right... Make sure you typed/copied the command correctly.. It may also be a problem with the version of sed on Synology (I tested on FreeBSD).
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.
Reply
#15
The only thing i changed was sed -E to -e. Everything is definitely the same. Will check out sed version
Reply

Logout Mark Read Team Forum Stats Members Help
Move Library - Thumb rehash0