Write a script in python that evaluates items in a media collection (from API XML) , commands rutorrent to move matching media data file(s) to a preset directory, changes matching media torrent sharing ratio to preset values, checks available disk space and if less than a set value, deletes oldest file/directory in loop until available disk space is greater than set value.
Parse localhost Plex API XML
Filter XML results matching several variables
For each match, grep rtorrent/session directory to find a needed variable (torrent "hash")
------For each "hash"
------------Tweak or externally call rutorrent datadir plugin and move torrent data location to graveyard directory
------------Tweak or externally call rutorrent ratio plugin and change torrent ratio setting
------------*****Please review datadir and ratio code in github to be sure this can be done
If disk freespace under x GB, delete oldest folder or file of section
------Check section directory contents (don't look at subdirectory/files)
------Loop through same section checking space after each delete, if nothing left to delete, move to next section or exit
Use settings file for variables
*****[url removed, login to view]