WIP Auto Delete for Daily aired shows.
#1
I'm sure this has been done before, but I ran into a small problem and was wondering if you people might point me to the right direction.

I've added a bash file to autoprocess.py (sickbeard) that finds a directory and deletes any file older than 7 days.
I used this:
subprocess.call("./TVShowEliminate.sh", shell=True)

The problem is that XBMC still lists the older files that were previously added.

So I've tried to use the XBMC RPC according to: http://wiki.xbmc.org/index.php?title=HOW...te_library

I've added this line to a bash file:

curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Clean", "id": "mybash"}' -H 'content-type: application/json;' http://localhost:9090/jsonrpc

I replaced the 9191 (as in the wiki) with 9090. I'm hoping this is correct. I've enabled the service too.

However, when I put it in the terminal it hangs. Nothing happens.


The problem with update.clean is that since my shares are on the Network, potentially if my NAS is down, XBMC will probably remve all of the files from the library.

could anybody offer pointers?
Reply
#2
NVM: I'll just use this: https://github.com/robweber/xbmclibraryautoupdate
Reply
#3
Here is how I use curl clean and update the libraries. I have these in bash scripts that I schedule through cron.

Update Video Library
Code:
/usr/bin/curl xbmcserver:8080/jsonrpc?request=%7b%22jsonrpc%22:%222.0%22%2C%222id%22:1%7d22VideoLibrary.Scan%22%2C%2
Clean Video Library
Code:
/usr/bin/curl xbmcserver:8080/jsonrpc?request=%7b%22jsonrpc%22:%222.0%22%2C%222id%22:1%7d22VideoLibrary.Clean%22%2C%2
Update Audio Library
Code:
/usr/bin/curl xbmcserver:8080/jsonrpc?request=%7b%22jsonrpc%22:%222.0%22%2C%222id%22:1%7d22AudioLibrary.Scan%22%2C%2
Clean Audio Library
Code:
/usr/bin/curl xbmcserver:8080/jsonrpc?request=%7b%22jsonrpc%22:%222.0%22%2C%222id%22:1%7d22AudioLibrary.Clean%22%2C%2

If the command successful it will return:
Code:
{"id":1,"jsonrpc":"2.0","result":"OK"}

Also make sure you verify what port XBMC is running on because I though it defaulted to 8080 not 9090
Reply

Logout Mark Read Team Forum Stats Members Help
Auto Delete for Daily aired shows.0