Force Trailer Update/Scrape?
Hi all,

I've got a ton of movies, but I'd like to add the Trailer into XBMC's DB. Is there a way (manual if required) to update just the trailer link for each movie without rescraping the entire library?

Well, I just rolled my own for anyone interested. You'll need a TMDB API key of your own or from another app.

Be sure to update that key and the location of your DB. Also check that c09 and c19 are the right columns in your DB file.


function geturl {
        tmdbid=`wget -qO-<----APIKEY---->/${imdbid} | grep "<id>" | awk '{print $1}' | sed 's/<id>//g' | sed 's/<\/id>//g'`
        youtubeurl=`wget -qO-<----APIKEY---->/${tmdbid} | grep "<trailer>" | awk '{print $1}' | sed 's/<trailer>//g' | sed 's/<\/trailer>//g'`
        if [[ -n "$youtubeurl" ]]; then
                youtubeid=`echo $youtubeurl | sed 's/^.\+\(\/\|\&\|\?\)v=\([^\&]*\).*/\2/'`
        echo $xbmcurl

for id in `echo "select c09 from movie where c19 = '';" |sqlite3 /mnt/storage/MyVideos75.db`; do
        url=`geturl $id`
        sql="update movie set c19='${url}' where c09='${id}';"
        echo $sql
        echo $sql | sqlite3 /mnt/storage/MyVideos75.db
        sleep 2

Logout Mark Read Team Forum Stats Members Help
Force Trailer Update/Scrape?0
This forum uses Lukasz Tkacz MyBB addons.