XBMC TV episode xml output

Jon Davies jon at hedgerows.org.uk
Thu Jun 14 11:23:32 EDT 2012


On 13 June 2012 23:27, Tom <tsashton at gmail.com> wrote:
>
> Hello,
>
> I've been wanting for a while to view saved getIplayer TV items in
> XBMC. [snip]
>
> So, any leads? thanks very much.

I use get_iplayer with XBMC, with variable success.  First thing is to
get files saved in a directory structure that matches what XBMC
expects - the following settings help (all are extracts from my
options file, not command lines ;-):

for TV programmes:

subdirformat = <nameshort>/Series_<seriesnum>
--- this puts tv programmes into a subdir matching the series name
(<nameshort>) and a further subdir reflecting the series number
subdir = 1
--- this says to use subdirectories
fileprefix = s<seriesnum>e<episodenum>_<
episode>
--- the media file itself is prefixed with something like s1e1
metadata = xbmc
--- and tell get_iplayer to produce xbmc metadata

for films I use something slightly different, again to meet XBMC's expectations:
subdirformat = <nameshort>
fileprefix = <nameshort>
--- (subdir and metadata remain the same as above)
--- this puts films into a single level of subdirectory matching the
name of the film

with these I find that xbmc generally finds and uses the metadata.  I
select which set of options to use by using presets.

your other problem was with thumbnails:
for better or worse (ok, for worse) xbmc looks for an image file with
the same name as the media file but with a ".tbn" suffix (not .jpg).
You can write a script which moves or links the jpg thumbnail to a
.tbn file with the same basename, and then run this after every
download using the "command" option in get_iplayer.  I'm going to
guess you're using some sort of linux, in which case you can do
something like this:

command = /home/media/scripts/finalise "<filename>"
(/home/media/scripts/finalise is the full pathname to my script,
"<filename>" including the quotes is the parameter - get_iplayer
expands this to the full pathname of the file, in quotes to stop
embedded spaces being a problem)

and then in the script something like

#!/bin/bash

filedir=$(dirname "$mediafile")
cd "$filedir"

# link .jpg to .tbn if the .jpg exists
basefile=$(basename "$1" "${mediafile##*.}")
if [ -f "${basefile}.jpg" ]; then
  echo Linking artwork
  ln "${basefile}.jpg" "${basefile}.tbn"
fi

(which is a little clunky - this is extracted from the script I use,
which always works in the same directory as the media file itself
because of some weirdness that existed in an mp4 optimizer I once
used.  I never tidied up the script on the
it-ain't-broke-so-don't-fix-it basis.)


Regards
Jon



More information about the get_iplayer mailing list