Sweeper

From hummy.tv Wiki
Revision as of 18:55, 29 June 2014 by Af123 (talk | contribs) (Available conditions)
Jump to: navigation, search

Sweeper - the Swiss Army Knife of recording management

Sweeper256.png

Overview

Sweeper is a Custom Firmware package for managing recordings in a variety of ways using custom rules. It started life as a simple utility for tidying up one-off recordings in the top level of the My Video area into folders, hence its name, but has since evolved into a multi-purpose tool.

Once installed, the rules that apply to the recordings and series folders at the top level of the My Video area can be accessed via the Sweeper icon on the main menu or toolbar. It is also possible to define rules for other folders by selecting Sweeper Rules from the OPT+ menu alongside the folder in the web interface.

User Interface

Sweeper Main.png

The main sweeper rule screen shows the rules which are currently defined for the folder followed by a set of buttons which can be used to add new rules, save or discard any changes, view or test the configuration and optionally show a textual representation of each rule, updated in real-time as changes are made.

At the bottom of the screen is an option to add a pre-defined ruleset to the rules already on screen. A set of rules can be chosen from the dropdown list and then added to the list of rules with a click on the Add to rules button; once there they can be individually modified, disabled or deleted as required.

All changes made are immediately reflected on screen but no changes are made to the system configuration until the Save changes button is pressed and confirmed.

Anatomy of a Rule

Anatomy of a Sweeper Rule

Each rule is show in a box with an icon to the top left indicating whether it is a file or folder rule...

Tokens

Several of the rule actions take parameters, and these parameters can contain tokens that are replaced with information from the recording which is being processed. For example, you could use the Move recording to folder action with an argument of %genre which would place Films in a folder called Films, Children's recordings in one called Children, etc.

The available tokens are shown below:

%orig The original version of the item being modified. For example to append _backup to the filename in a setfilename action, you would set the filename to %orig_backup.
%genre Recording genre.
%definition Definition of recording (HD or SD).
%title Recording title.
%channel Channel name.
%lcn Logical channel number.
%duration Recording duration (in minutes).
%timestamp Recording start time as YYYYMMDDHHMMSS.
%yyyymmmdd Recording start time as YYYYMMDD.
%hhmm Recording start time as HHMM.
%hh Recording start hour as HH.
%mm Recording start minute as MM.
%year Recording start year as YYYY.
%2digityear Recording start year as YY.
%month Recording start month number 1-12.
%2digitmonth Recording start month number 01-12.
%date Recording start date 1-31.
%2digitdate Recording start date 01-31.
%shortday Recording start day (short form, e.g. Mon)
%longday Recording start day (long form, e.g. Monday)
%shortmonth Recording start month (short form, e.g. Jan)
%longmonth Recording start month (long form, e.g. January)
%etimestamp Recording end time as YYYYMMDDHHMMSS.
%eyyyymmmdd Recording end time as YYYYMMDD.
%ehhmm Recording end time as HHMM.
%ehh Recording end hour as HH.
%emm Recording end minute as MM.

Available actions

Action Description Parameter
continue Do nothing and continue to next rule. None
stop Do nothing and stop processing rules for this folder. None
preserve (deprecated - use stop instead) do nothing and stop processing rules. None
lock Lock recording and continue to next rule. None
unlock Unlock recording and continue to next rule. None
move Move the recording to a folder. Folder name relative to the system media root, e.g. (Films/Children)
movecreate move the recording to a folder and create it if it doesn't exist. Folder name relative to the system media root, e.g. (Films/Children)
renamefile rename the files that make up the recording and continue to the next rule. The argument will usually contain tokens that are replaced with values from the recording being processed. New filename base (no extension) e.g. %title_%yyyymmdd_%hhmm
settitle set the media list title for the recording. Tokens can be used and the %orig token contains the current title. New title
setguidance set the guidance text for the recording. New guidance text or blank to remove any guidance rating for the recording.
delete delete the recording or, if undelete is installed, move it to the bin. None
fileunder Folders only; look for another existing with the same name as the new series recording and, if found, move the new recordings into it. Folder name from which to start the search (e.g. Films) - leave blank to search from the top level.
fileundercreate Folders only; as fileunder but if no folder is found then create a new one. Folder name from which to start the search (e.g. Films) - leave blank to search from the top level.

Available conditions

lastrule True if the last rule was successfully matched.
flag A flag against the recording, e.g. 'flag New'. Flags are Locked, New, Encrypted, Guidance, ODEncrypted, Shrunk, Deduped.
lcn Logical channel number, e.g. 'lcn 1', 'lcn {> 1}'
duration Recording duration in minutes, e.g. 'duration {> 60}'
schedduration Scheduled recording duration in minutes.
size Size in bytes
age Age in hours (measured from recording end time).
wage Number of hours since last watched, or from recording end time if not watched.
definition Standard (SD) or high (HD) definition, e.g. 'definition SD'
title Title contains ..., e.g. 'title {The Big Bang Theory}'
synopsis Synopsis contains ...
guidance Guidance contains ...
genre Recording genre is.. e.g. 'genre Children'
hour Hour of recording, e.g. 'hour {>= 21}'
filename Filename on disk contains ...
fflag Folder containing the recording has a particular flag, e.g. 'fflag autodecrypt'
foldername Folder name contains...
series Folder rules only - true if folder was automatically created due to a scheduled recording.
or True if any of the arguments are true, e.g. 'or {lcn 1 lcn 2 lcn 3}'
and True if all arguments are true, e.g. 'and {lcn >= 1 lcn <= 3}'

In the configuration file, all conditions can be optionally prefixed with a ! to indicate negation. For example, the condition !lcn 1 means not recorded from channel 1.