Skip to content

Instantly share code, notes, and snippets.

@hairmare
Created September 14, 2011 08:28
Show Gist options
  • Save hairmare/1216105 to your computer and use it in GitHub Desktop.
Save hairmare/1216105 to your computer and use it in GitHub Desktop.
transmission post-download script for integration with xbmc
#!/bin/sh
XMBC_NODE=127.0.0.1:8080
FILER_PATH=smb://127.0.0.1:139/Multimedia/Series
echo $TR_TORRENT_DIR | grep 'Series'
if [ $? -eq 0 ]; then
# we sure have some tv stuff on our hands, lets rescan that in xbmc
series_name=`echo $TR_TORRENT_DIR | cut -d / -f 4 - | sed -e 's/ /%20/g'`
/sbin/curl --get "http://$XBMC_NODE/xbmcCmds/xbmcHttp?command=ExecBuiltIn(UpdateLibrary(video,$FILER_PATH/$series_name/))"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment