[sweeper] Custom rules to manage recordings

It seems like half the series I record nowadays start with "The" for some reason.
Is there a set of sweeper rules I could use to rename the series folders so that the "the" is at the end? I.e. " Missing, The" instead of "The Missing"? I would find it more intuitive when scrolling through series folders alphabetically.
I suppose I could just use newk but don't want to lose the "the" entirely.
 
It seems like half the series I record nowadays start with "The" for some reason.
Is there a set of sweeper rules I could use to rename the series folders so that the "the" is at the end? I.e. " Missing, The" instead of "The Missing"?

I am not aware of a single rule that you could apply wholesale to all your 'The' series folders. Somebody else may know better though.

It might be possible to set up a sweeper rule on the folder where you keep the series folders, to rename one specific series to have 'The' at the end and then copy and paste that rule for any other 'The' series, just changing the desired name each time. However, not very efficient, as it would be just as quick to rename them manually.

More useful to set the folder name as you want it right from the beginning via Web-if, Schedule, Change Folder, then any recordings of 'The Missing' will be stored in a folder named 'Missing, The' right from the start - but that does still involve you taking action once for each series.
 
It's looking more and more like we could do with a rename package, something that can do the following would be very desirable.

Rename.png
 
Last edited:
Annoyingly, the recent upgrade to sweeper has deactivated my rules. The /mod/etc/sweeper.conf file got renamed to sweeper.conf~ and was replaced by the boiler-plate one from the package.
 
Default ruleset "/mod/etc/sweeper.conf" added to package. Missing quotemark corrected in one of the scripts (edit.jim). @af123 Should there be a 'conffiles' entry for sweeper.conf in the package CONTROL folder ?
 
Last edited:
Not what I was after, but never mind...

Of the two HDRs I run sweeper on, one has kept its rules and the other has not.

Update: Aha! That's because one is on 2.0.7-3 and the other is still on 2.0.7-2.
 
Last edited:
Default ruleset "/mod/etc/sweeper.conf" added to package
This is what's mucked up the processing in preinst and postinst then.
Should there be a 'conffiles' entry for sweeper.conf in the package CONTROL folder ?
I'd have thought so, then the messing about as above can go away.
 
Annoyingly, the recent upgrade to sweeper has deactivated my rules. The /mod/etc/sweeper.conf file got renamed to sweeper.conf~ and was replaced by the boiler-plate one from the package.

Didn't see the above until I had already updated to 2.0.7-3... at least it only needed a quick rename to get them back.
 
Hmm. The only change was to fix the missing quote on the script. Not sure how the default rules file ended up back in there - it was removed a while ago. I've released an update that will fix this and restore the old rules.

I'd have thought so, then the messing about as above can go away.
Still have to support upgrading from old versions.
 
Thanks for the fix - very timely, as I just noticed it a few minutes ago :)

Whilst I'm here...

Would you please consider adding a "sweep now" button to the Sweeper page? There's a useful "test" button, but sometimes I want to run it right now, rather than waiting for the auto-processing. e.g. so I can then go in and fiddle about...

I know it can be done with a diag script, but I have to look up its name each time ("sweeper/test"); it would be nice to have a button, please?

thanks for considering...
 
It's looking more and more like we could do with a rename package, something that can do the following would be very desirable.

View attachment 1455
I have been playing with sweeper on HDR3 (my news node) this morning. I now have the following rule set:
Code:
# Append "(Wales)" to local bulletin recordings from Mynydd Machen
title Breakfast lcn {>= 800} action {settitle {%orig (Wales)}}
# Append "(West)" to local bulletin recordings from Mendip
title Breakfast lcn {< 800} action {settitle {%orig (West)}}
# Move Breakfast local bulletins (manual timer recordings) > folder [NEWS]
title Breakfast action {move [NEWS]}
# Flattened or non-series recordings > folder [Unclassified]
action {move [Unclassified]}
What I would like to do is also manipulate the file names: typically the Breakfast bulletin recordings have the following format:

Breakfast_20150424_0755
Breakfast_20150424_0755(1)

(the recording with (1) appended is the Wales recording, I don't know whether this sometimes might switch to the West recording).

These could become:

Breakfast_20150424_0755(1)
Breakfast_20150424_0755(801)

(the suffix is the LCN for the channel it was recorded on). I can't find a way in the current revision of sweeper to do this (ie remove the original (1) suffix and replace it with the LCN - I can add an LCN suffix easily enough I think).

I have a work-around: if I change the recording start time for one of the recordings to 0754, there will be no (1) suffix to remove.
 
Can't you just action {renamefile {%title_%yyyymmdd_%hhmm(%lcn)}} ?
(I don't have access to a running sweeper to check!)

Edit: using the lastrule condition you can easily do something like:

Code:
# Append "(Wales)" to local bulletin recordings from Mynydd Machen
title Breakfast lcn {>= 800} action {settitle {%orig (Wales)}}
lastrule {} action {renamefile {%title_%yyyymmdd_%hhmm(%lcn)}}

I can't remember if this is supported in the GUI yet but it likely is
 
That would apply whether the recording is Wales or not, so it's going to be:

title Breakfast action {renamefile {%title_%yyyymmdd_%hhmm(%lcn)}}

innit? I'll give it a try...
 
Arrgghhh!!! It processed the West recording first and created a filename clash with the (unrenamed) Wales recording! I'll use square brackets instead..

That works!
 
Last edited:
Back
Top