[sweeper] Custom rules to manage recordings

Ok, I've been getting more experience with [ Sweeper ] and have decided to do some folder housekeeping, eg move groups of folders with only a few recordings (series with only a small number of episodes, but have their own folder), so I carefully made sure that I had clearly defined the rule criteria and ran the [ Test config ] option to make sure the rule was valid, my intended folders were highlighted in the test running, and the rules were left to process over time

When the progress was checked some time later, the 'folders' had not been moved (this rule was to act upon folders only) the rule had been actioned, however the results were not as expected, instead of moving the actual folders and their contents to the new folder location, the the files contained within the highlighted folders were moved, effectively 'flattening' the folders that matched the rule

The result I was expecting would be

/Some WW2 Programme/Some Files
/More WW2 Programme/Some More Files

to

/All WW2 Programs/Some WW2 Programme/Some Files
/All WW2 Programs/More WW2 Programme/Some More Files

What I got was

/Some WW2 Programme/Some Files
/More WW2 Programme/Some More Files

to

/All WW2 Programs/Some Files
/All WW2 Programs/Some More Files

Surely, if the rule is being set up to find 'Folders' only, it should act on 'Folders' only

- - - - - - - -

For each sub-folder, inspect a recording within and:
Add condition
If: Folder name contains WW2
And: Recording Flagged as Shrunk
And:
Add condition to sub-clause If any of...
If: Folder name contains Dig WW2 with Dan Snow
Or: Folder name contains Inside WW2
Or: Folder name contains WW2 - Battles for Europe
Or: Folder name contains WW2 Treasure Hunters

Then: Move recording to folder (creating if necessary) WW2 programs folder
And: Stop processing rules.

Otherwise: Continue to next rule.

- - - - - - - -

For each sub-folder, inspect a recording within and:
Add condition
If: Folder name contains WW2
And: Recording Flagged as Shrunk
And:
Add condition to sub-clause If any of...
If: Folder name contains Dig WW2 with Dan Snow
Or: Folder name contains Inside WW2
Or: Folder name contains WW2 - Battles for Europe
Or: Folder name contains WW2 Treasure Hunters

Then: Move folder to folder (creating if necessary) WW2 programs folder
And: Stop processing rules.

Otherwise: Continue to next rule.

- - - - - - - -

I've highlighted the area of concern with my idea of a solution, to make it easier to find the difference both recording and folder are highlighted in red, bold and italic

Sorry for the long gripe
 

Attachments

  • WW2 move folder rule 1.JPG
    WW2 move folder rule 1.JPG
    59.9 KB · Views: 9
  • WW2 move folder rule 2.jpg
    WW2 move folder rule 2.jpg
    96.9 KB · Views: 9
I may have mis-understood, but I believe the "Merge into or create folder of same name under" will do that.
 
Last edited:
In the example you showed, it would be easier to use the WebIf>Browse Files cut+paste function to move the two folder trees into "All WW2 Programs", but obviously sweeper should be the solution if you want it to happen progressively, as recordings are created.

When sweeper uses "folder" it means the "recordings" contained in the folder. It doesn't move folders, rather recordings within folders.

So as MW suggests, I think what you need is a fileunder or fileundercreate rule ("Merge into ..." in the WebIf UI) in each series-level folder with target "All WW2 Programs". That should refile each recording, without removing the original folders themselves.
 
Quite simply, change:

Then: Move recording to folder (creating if necessary) WW2 programs folder

to:

Then: Merge into or create folder of same name found under... WW2 programs folder


Example scenario:
An episode of "Dig WW2 with Dan Snow" is recorded to (or already exists in) /media/My Video/Dig WW2 with Dan Snow/{file name} (assuming you haven't changed the recording folder.)
Sweeper will then move this, and any other recordings in that folder to /media/My Video/WW2 programs folder/Dig WW2 with Dan Snow/{file name} - creating it if necessary
If the original folder is empty (i.e. no in progress, unshrunk or broken recordings) - it will be deleted
 
Last edited:
Sorry - one correction - if the folder "WW2 programs folder" doesn't exist it will fail - so create than one manually, if not already. Only the series folder can be created by the sweeper rule.
 
  • Like
Reactions: /df
Thank you everyone who helps others

Now, I have a new project

I watch a series repeatedly off and on, there are eight files in the set, release dates 2001, 2002, 2004, 2005, 2007, 2009, 2010 and 2011, (a puzzle on the side)

To start, all files are in a suitably titled folder, all files are showing as 'New' (unwatched)

As each recording is watched, it is filed away in a 'Watched' folder as it is not marked as 'New' having just been watched, as each subsequent recording is viewed, it gets filed in the 'Watched' folder, until

When the final recording is watched and filed, it should trigger an event to reset all recordings back to 'New' and move them back to the original holding folder, ready for the next marathon viewing session

I'm stuck as to how to proceed with the [ reset new and mass move ] rules, the move file to 'Watched' folder works fine, the criteria is, wait until a specific recording (the last in the series) arrives in the 'Watched' folder, then process all recordings to be reset to 'New' and move them, what is the best way to detect the specific file,
 
As each recording is watched, it is filed away in a 'Watched' folder as it is not marked as 'New' having just been watched, as each subsequent recording is viewed, it gets filed in the 'Watched' folder,
Couldn't you just use the 'New' flag on the icon to tell which has been watched rather than moving them?

reset all recordings back to 'New'
Reset to new is trivial, in the Watched have a rule1591020441479.png
What I can't immediately think of is a way to only run the rule when the Unwatched folder is empty, simplest would be to set the rule disabled and manually enable it when you want to restart your binge and disable again after it has run
move them back to the original holding folder
That would just be the converse of the rule that moves recordings to the watched folder.
 
Reset to new is trivial, in the Watched have a rule
Cheers for a reply, yes, setting or resetting to 'New' already works in the 'Watched' folder, what is the bugbear, is only having a rule acted upon when a recording matching certain criteria is in the 'Watched' folder

It may be considered of no useful purpose, it is merely a coding exercise, which if I can get to work as intended, would be a great timesamer
 
is only having a rule acted upon when a recording matching certain criteria is in the 'Watched' folder
Presumably you watch the programmes in order so it would be the presence of the 2011 recording in Watched that triggers the reset.

In which case you could try a "Process folders" rule with a "File exists" condition for the 2011 file and an action to Merge into the Unwatched

would be a great timesamer
In my experience most shortcuts turn out to take much longer than doing it by hand
 
Who do I post a suggestion to, is there anyway of having an option to duplicate a Remote Scheduling task, I am now narrowing or excluding times of the day that I don't want a f'found' schedule to be set as a record event due to clashes with currently scheduled events, so set up a schedule search with 'within the times only', setting up the second group of acceptable time slots now requires every piece of information to be entered again, being able to copy or clone a schedule event would speed up the process and be more accurate
 
Who do I post a suggestion to, is there anyway of having an option to duplicate a Remote Scheduling task, I am now narrowing or excluding times of the day that I don't want a f'found' schedule to be set as a record event due to clashes with currently scheduled events, so set up a schedule search with 'within the times only', setting up the second group of acceptable time slots now requires every piece of information to be entered again, being able to copy or clone a schedule event would speed up the process and be more accurate
The Duplicate Rule button is between the Delete and Up/Down arrows on both Sweeper and Remote Scheduling advanced rules or am I missing some additional requirement?
You could also look at Or conditions to allow multiple time ranges within a single rule
 
The Duplicate Rule button is between the Delete and Up/Down arrows on both Sweeper and Remote Scheduling advanced rules
Thank you MymsMan, unfortunately my pay grade has not got that high yet to use the Advanced Rules section, I'm just at the stage to be able to do searched for programmes that are containing certain characters, on a certain channels, or on at certain times of the day, a duplicate feature on the Standard Rules page would be very helpful, having a duplicate rule feature in Sweeper is too late for my circumstances, and I use the Text editor option as I use a spreadsheet to create my rules as a plain text file
 
Yeah, but maybe you can just dip into Advanced Rules to do the duplication...
Yes point taken, unfortunately one thing is obvious, how do you duplicate rules from the Standard set, when in the Advanced set, Standard set rules cannot be seen, likewise, when viewing the Standard set of rules, the rules in the Advanced set cannot be seen, surely you have to be able to click on the rule before you can duplicate the rule
 
unfortunately my pay grade has not got that high yet to use the Advanced Rules section,
Unlikely since the advanced rule syntax is identical to Sweeper, (it was easier to move Sweeper into RS than to make changes to the old rules mechanism)

There is a migrate option under standard rules which will convert a standard rule into an advanced rule and then you can edit and duplicate just like sweeper rules.

I wish that the default view on the RS Auto page was to show Advanced rules first since that would encourage users to use them more, I migrated all of my my rules many years ago so it is an extra web page load to having to click on advanced every time I visit the Auto page.

(@af123 perhaps the page could load to advanced unless the user has more standard rules than adavnced)
 
Back
Top