I got tired of manually deleting things from my queue and it had grown far too large to be manageable, so I put together a quick and dirty script to do it automatically. It's written in bash, so you'll need linux or something similar (cygwin?) to get it working. It needs curl to work. If anyone wants to make a more user friendly tool based on this, have at it.
Code:#!/bin/bash # Script to clean boxee queue # OPTIONS # subs = Purge Subscriptions # bookmarks = Purge Bookmarklets # all = Everything, subscriptions, bookmarks, locally added items #Enter your username/password here user= pass= if [ -z "$1" ] then echo "Must specify option. subs=Purge Subs, bookmarks=Purge Bookmarks, all=everything." exit 0 fi # Make sure user/pass is filled if [[ -z "$user" || -z "$pass" ]] then echo "Edit script and add your username and/or password" exit 0 fi # Get fresh copy of queue wget -nv -m -nd --user=$user --password=$pass http://app.boxee.tv/api/get_queue case "$1" in 'subs') echo "Purging Subscriptions" for item in `cat get_queue |sed 's:<last>:</last>\n:'|awk '/subscription/ {print $4}'|sed -e 's/referral="//g' -e 's/"//g'` do echo "Deleting referral # $item" curl --url "http://app.boxee.tv/action/add" --data "<message type=\"dequeue\" referral=\"$item\"></message>" -H "Content-Type: text/xml" -u "$user":"$pass" done ;; 'bookmarks') echo "Purging Bookmarklets" for item in `cat get_queue |sed 's:<last>:</last>\n:'|awk '/booklet/ {print $4}'|sed -e 's/referral="//g' -e 's/"//g'` do echo "Deleting referral # $item" curl --url "http://app.boxee.tv/action/add" --data "<message type=\"dequeue\" referral=\"$item\"></message>" -H "Content-Type: text/xml" -u "$user":"$pass" done ;; 'all') echo "Purging all items" for item in `cat get_queue |sed 's:<last>:</last>\n:'|awk '/referral/ {print $4}'|sed -e 's/referral="//g' -e 's/"//g'` do echo "Deleting referral # $item" curl --url "http://app.boxee.tv/action/add" --data "<message type=\"dequeue\" referral=\"$item\"></message>" -H "Content-Type: text/xml" -u "$user":"$pass" done ;; esac


Reply With Quote

Bookmarks