Sweeper idiot's guide

LDW

Member
I have tried but failed to create a new rule to delete New_ [ie NEW-UNDERLINE-SPACE].

Could someone please post a simple step-by-step guide to creating new rules?

Or if one already exists and I haven't found it, point me to it?

Thank you.
 
There is a Sweeper guide in the wiki: here, but I appreciate that it takes a bit of practice to make things work: I am a Sweeper novice myself. Rules to remove 'New_' from filenames and 'New:' from media list titles are already available from the rules menu in Sweeper.
I had a problem with the rule to remove 'New_' from filenames as it started misbehaving after an update (see here in the main Sweeper thread) and I am not sure it has been resolved.
I've just checked, and the 'New_' rule is no longer in the rules menu: so I presume that the issue is still ongoing. There might be an alternative way of creating such a rule, but I'm not sure how to go about this.
 
Not sure, but I haven't got a single NEW_ in the filenames on my T2. Perhaps Iv'e been lucky.
 
I must have been lucky not to have recorded anything with the bl00dy New then. But as long as it isn't in the media list, that suits mr. But thanks fot the heads up. I'll retire with a red face now then:)
 
Slightly confused...
I set the Sweeper defined ruleset: Remove New: prefix. When I ran the 'Test Config' I had the following output:
15/10/2015 10:03 - --- Considering /media/My Video/Lewis/New_ Lewis_20151013_2058.ts
15/10/2015 10:03 - Processing [title New:* action {settitle {%orig%regsub,New:\s*,,}}]
15/10/2015 10:03 - title(New:*) 15/10/2015 10:03 - MATCH
15/10/2015 10:03 - action(settitle {%orig%regsub,New:\s*,,})
15/10/2015 10:03 - ACTION: settitle(%orig%regsub,New:\s*,,) [1]
15/10/2015 10:03 - Applying action to recordings in /media/My Video/Lewis
15/10/2015 10:03 - + folder_apply processing /media/My Video/Lewis/New_ Lewis_20151006_2058.ts
15/10/2015 10:03 - Expanded [%orig%regsub,New:\s*,,] -> [Lewis]
15/10/2015 10:03 - - Calling expand_regsub({New:\s*} {})
15/10/2015 10:03 - Result: (Lewis)
15/10/2015 10:03 - Setting title for /media/My Video/Lewis/New_ Lewis_20151006_2058.ts to Lewis
15/10/2015 10:03 - + folder_apply processing /media/My Video/Lewis/New_ Lewis_20151013_2058.ts
15/10/2015 10:03 - Expanded [%orig%regsub,New:\s*,,] -> [New: Lewis]
15/10/2015 10:03 - - Calling expand_regsub({New:\s*} {})
15/10/2015 10:03 - Result: (Lewis)
15/10/2015 10:03 - Setting title for /media/My Video/Lewis/New_ Lewis_20151013_2058.ts to Lewis
15/10/2015 10:03 -


15/10/2015 10:03 - ==== folder /media/My Video/Doc Martin ====
15/10/2015 10:03 -
15/10/2015 10:03 - --- Considering /media/My Video/Doc Martin/New_ Doc Martin_20151005_2158.ts
15/10/2015 10:03 - Processing [title New:* action {settitle {%orig%regsub,New:\s*,,}}]
15/10/2015 10:03 - title(New:*)
15/10/2015 10:03 - Nomatch
15/10/2015 10:03 -

It processed the Lewis but not the Doc Martin although the 'New_' look the same. I am reluctant to incorporate this rule at the moment just in case...
Any thoughts please ?
 
It processed the Lewis but not the Doc Martin although the 'New_' look the same. I am reluctant to incorporate this rule at the moment just in case...
Any thoughts please ?
The logs only show the filename (which does have a New_) but the rule is looking for New: in the media title (the name that comes up on the TV screen when you look in that folder). It's saying Nomatch so I'd guess that there isn't a New: prefix in the media title.
 
The logs only show the filename (which does have a New_) but the rule is looking for New: in the media title (the name that comes up on the TV screen when you look in that folder). It's saying Nomatch so I'd guess that there isn't a New: prefix in the media title.
I bit the bullet and ran it. Both Lewis and Doc Martin 'lost' the New: so it is doing just what I want on the screen. It is just slightly confusing that it does not show the change in WebIf. Still now I know what is happening that is great - thanks for the clarification.
 
The title you see on screen is not the same as the file name you see by FTP, Telnet, or in the WebIF. The media-list title comes from data in the .hmt file.

When you bring up the rename option in the WebIF, you get the opportunity to adjust both individually (as well as guidance text, synopsis, etc). When performing other manipulations, take care to work on the filename or the medialist title as appropriate (or both!).
 
Thanks BH - it was only the title on screen that I wanted to change. I don't think I want to go through all the files with New_ in the title and using the rename option as it would take ages. I will, however, bear this in mind should I decide to tidy it up.
 
I just checked a couple of recordings that I made last night and neither the SUI, WI or filelist have New_ in them. The original recordings did have. But I also have sweeper running with a FileName, a RecordingTitle and a DD MM YY rule set.
 
I just checked a couple of recordings that I made last night and neither the SUI, WI or filelist have New_ in them. The original recordings did have. But I also have sweeper running with a FileName, a RecordingTitle and a DD MM YY rule set.
Any chance you could post the rule set(s) here please ? I assume you do not use the defined rule set Remove New: prefix
 
I've found the rules I use. Just tea time. Give me an hour.
Code:
# Remove New: prefix
title New: action {settitle {%orig%replace,New: ,,}}
# filenam clean
filename New_ action {renamefile {%orig%replace,New_ ,,}}
# File Datestamp DD MMM YY
filename *20[0-9][0-9][0-9][0-9][0-9][0-9]_* action {renamefile {%title %2digitdate-%2digitmonth-%2digityear %hhmm}}
This is on the /media/My Video folder
I also run newk, but whether that's necessary or not, I'm not sure.
 
Last edited:
Trev have implemented your rules (have made them global to ensure everything is caught) and it works a treat so many thanks again.
 
I've found the rules I use. Just tea time. Give me an hour.
Code:
# Remove New: prefix
title New: action {settitle {%orig%replace,New: ,,}}
# filenam clean
filename New_ action {renamefile {%orig%replace,New_ ,,}}
# File Datestamp DD MMM YY
filename *20[0-9][0-9][0-9][0-9][0-9][0-9]_* action {renamefile {%title %2digitdate-%2digitmonth-%2digityear %hhmm}}
This is on the /media/My Video folder
I also run newk, but whether that's necessary or not, I'm not sure.

I'm just using newk and it works wonderfully. Occasionally you have to add a new, sic, type of NEW.
 
Back
Top