[sweeper] Custom rules to manage recordings

BennyBoy

Member
I've updated the Sweeper Rules above to use %asfilename because there was an episode that used a reserved character in its title (forward slash / ) that could not be used in a filename.
%asfilename replaces reserved characters with an underscore.
Without it the rename rule would fail in trying to rename "The Episode/Is Using a Reserved Char" instead of "The Episode_Is Using a Reserved Char".
 

Black Hole

May contain traces of nut
I just set up sweeper on my supported user's HDR, to expire specifically certain soaps and magazine programmes she has on continuous record (and then fails to routinely delete). I have flatten running to avoid the complication of folders, so I can't set auto-expire.

The inconvenience is that I needed four separate rules instead of one, because there is no "OR" operation (either for the rule logic or in the pattern matching).

If ( title = Corrie OR Emmerdale OR... ) AND age > 168 THEN delete
 

BennyBoy

Member
@Black Hole - So is there nothing that allows you to recursively check the directories to delete the files in them that meet the criteria.
And is a Recycle Bin being used as a "last chance" kind of thing, or is it a case of "it's deleted. It's gone"?

If it helps could you perhaps paste the full set of rules here?
 

MymsMan

Ad detector
The inconvenience is that I needed four separate rules instead of one, because there is no "OR" operation (either for the rule logic or in the pattern matching).
You need an 'If Any of' rule. I use the following to expire the News after a day if I haven't already watched it
1549741914173.png
 

Black Hole

May contain traces of nut
So is there nothing that allows you to recursively check the directories to delete the files in them that meet the criteria.
What?

Yes, of course there is a recursive option in sweeper. I think you need to read up.

I wasn't asking for help, or even raising a complaint. I was just making the suggestion that an OR statement would have enabled me to do what I need in one rule instead of four copies of essentially the same rule.

And is a Recycle Bin being used as a "last chance" kind of thing, or is it a case of "it's deleted. It's gone"?
What does this have to do with anything? If you have the undelete package installed, any deletions that occur through the SUI or CF (whether manually through the WebIF or through auto-processing) go via the recycle bin (and can be rescued if required).

If it helps could you perhaps paste the full set of rules here?
Helps who? I know what I'm doing even if you don't.
 

BennyBoy

Member
@Black Hole -
Helps who? I know what I'm doing even if you don't.
WOW! I must have touched a nerve from just those few questions judging from your reply.
Just to explain, I saw an alert in this thread (that I posted in a while back) and thought I'd try and help.
A simple "Thanks but No Thanks" would have been fine.

Cheers.
 

mihaid

Well-Known Member
@Black Hole -

WOW! I must have touched a nerve from just those few questions judging from your reply.
Just to explain, I saw an alert in this thread (that I posted in a while back) and thought I'd try and help.
A simple "Thanks but No Thanks" would have been fine.

Cheers.
he's a little sensitive our BH.

It also turns out that he did not know what he was doing and needed help from mymsman.
 

4ndy

Member
I am having fun downloading stuff from BBC and ITV using youtube-dl / Qtube.

I have been trying to use sweeper to tidy all the files into a folder for sorting later. I have tried “filename contains *.mp4”, but I suspect file extensions are ignored as it doesn’t work.

Has anyone got any suggestions or would it need @af123 to tweak the sweeper package?


Sent from my iPad using Tapatalk
 

BennyBoy

Member
I am having fun downloading stuff from BBC and ITV using youtube-dl / Qtube.

I have been trying to use sweeper to tidy all the files into a folder for sorting later. I have tried “filename contains *.mp4”, but I suspect file extensions are ignored as it doesn’t work.

Has anyone got any suggestions or would it need @af123 to tweak the sweeper package?

Hi @4ndy

From what I've seen using Sweeper and the criteria involved, if there's no kind of synopsis and other details like those present in native recordings done by the Humax itself (E.g. Episode number. etc.) categorising stuff you've downloaded would have to be done manually.
 

4ndy

Member
So far, sweeper has been for processing native recordings!
I understand that, but I hoped file based criteria might be more generic.

Thanks to cf we have long been able generate mpg,mp3 files, and mp4 files.

Sent from my SM-G950F using Tapatalk
 

MymsMan

Ad detector
Try using a filexists *.mp4 test instead, you may need at least one 'normal' recording in the folder for any rules to be triggered and the 'current' filename will always be the normal recording not the mp4 name so you will be limited to what you can do to the mp4 files.
 

4ndy

Member
Thanks MymsMan. I tried what you suggested and it swept all normal recordings not in folders into a new folder, but the mp4 files.


Sent from my iPad using Tapatalk
 

prpr

Well-Known Member
Why does Sweeper operate backwards? Or sometimes in a random order?
I know it prioritises the operations depending on their type, but I'd expect a FIFO operation (based on the ID as displayed in the log) within any particular class. But it seems to operate in a LIFO mode or even some semi-random mode:
Screenshot at 2019-10-26 13-39-57.pngScreenshot at 2019-10-26 13-40-16.pngScreenshot at 2019-10-26 13-40-44.png
I looked at the code in /mod/webif/lib/auto/deq and didn't really understand it (proc ::auto::pending and proc ::auto::runplugins I guess).
 
Last edited:

prpr

Well-Known Member
And I guess it's impossible to change the recurse operation from the GUI without either resorting to the text editor or deleting and recreating the rule?
 

prpr

Well-Known Member
And why does the "Edit recursion depth" pop-up dialog allow you to select 0 and negative numbers? OK, it doesn't act on them, but it's still a bit of a dumb thing to allow.
It also allows you to select >20, but the code has an error trap for that elsewhere (auto.hook). Even more elsewhere (scripts.js) there is a test for >0 and <16.
 
Last edited:

prpr

Well-Known Member
When you add a new rule, the box for the rule name is labelled "Description".
When you edit the rule, it's just titled "Edit rule name".
Suggest changing the add new rule dialog to say "Rule name" rather than "Description".
 

MymsMan

Ad detector
Why does Sweeper operate backwards? Or sometimes in a random order?
Technically the Queue is not part of Sweeper, Queue is part of auto-processing. Sweeper is just one of several packages that can queue recordings for later processing.

I have never really considered the order entries on the queue are processed, usually you would only have a couple of recordings at a time on the queue and if you are submitting a batch does it really matter what order they are processed provided they are all, eventually, processed.
 
Top