• The forum software that supports hummy.tv has been upgraded to XenForo 2.3!

    Please bear with us as we continue to tweak things, and feel free to post any questions, issues or suggestions in the upgrade thread.

[sweeper] Custom rules to manage recordings

That's curious, because I've seen one or two .something files left behind... maybe by ad detection chase decryption?
Ad detection doesn't create .encrypted files, intermediate files have a suffix, such as -crop, on the base name with all the usual files extensions .ts, .nts & .hmt
Tried this but deletes every recording except the one I want to delete! Good job I used Sweeper test mode.
You are misunderstanding action delete, it (and other sweeper actions) acts on the set of files that comprise a recording not just a single file.
So your action says that if any .encrypted file exist delete the entire current recording whether or not that .encrypted file belongs to the recording.

I don't think there is a current action that will delete a single file from a recording set.

It would add a lot of flexibility to Sweeper if there was a rum Cmd action and Queue Cmd action where you could specify any commend to be run then your sweeper rule could be.

Code:
age {> 0} fileexists *.encrypted action {cmd {rm *.encrypted}}

or

age {> 0} !fileexists %basename.xyz action {queue {cmd somethinglongwinded %basename.xyz etc ...}}
 
That seemed to be by far the easiest solution to me from where I'm sitting. Does your problem occur often?
 
Does your problem occur often?
It's the first one I've had since enabling the WebIf Auto-decrypt in March. Prior to this I used the one from Package Management and never had any rogue leftover files. SWMBO switched the box on and started to play the recording almost immediately. It was the first time the box had come out of standby since the recording was made. The first entry in the Queued Tasks log for this recording was the next day with the logged comment "Already decrypted".
 
Last edited:
Would somebody with a bit of time on their hands like to give consideration to this:

Code:
FOR
  {all.radio.recordings.made.or.moved.into.a.special.folder}
DO
  IF exist(%1.MP3) THEN NEXT
  IF NOT decrypted(%1) THEN decrypt(%1)
  convert.to.mp3(%1.TS)
  RENAME(%1.mp3;%1.TMP)
  convert.to.mp3(%1.TS)
  IF { file.size(%1.MP3) == file.size(%1.TMP) } AND { file.size(%1.MP3) > file.size(%1.TS)/10 } THEN
    FOR %1.* DO
      IF %2 != *.MP3 DEL %2
    NEXT
  ENDIF
NEXT
 
Hi,
I'm trying to keep '/media/my videos' as clear as possible and I need a little help with Sweeper.

So I have an 'Emulate Seriesfiler' rule >>>
"folder series "" action {fileunder ""}"

then a rule to move single recordings into a sub folder >>>
"age {>= 6} action {move {/media/My Video/New/Programs and Mini Series}}"

and then another rule to move any other series recordings and there folders >>>
"folder series "" age {>= 10} action {fileundercreate {/media/My Video/New/Programs and Mini Series}}"

but its not working and I'm not sure why.

The output is
Code:
07/10/2017 21:03 -
07/10/2017 21:03 - --- SWEEP(0) STARTING FOR /media/My Video ---
07/10/2017 21:03 -
07/10/2017 21:03 -
07/10/2017 21:03 - -- FOLDER RULES -- 07/10/2017 21:03 -
07/10/2017 21:03 -
07/10/2017 21:03 - ==== folder /media/My Video/Collection ====
07/10/2017 21:03 - 07/10/2017 21:03 - No-sweep folder.
07/10/2017 21:03 -
07/10/2017 21:03 - ==== folder /media/My Video/Have I Got News for You ====
07/10/2017 21:03 - 07/10/2017 21:03 - --- Considering /media/My Video/Have I Got News for You/Have I Got News for You_20171006_2100.ts
07/10/2017 21:03 - Processing [series {} action {fileunder ""}]
07/10/2017 21:03 - series()
07/10/2017 21:03 - MATCH
07/10/2017 21:03 - action(fileunder "")
07/10/2017 21:03 - ACTION: fileunder() [1]
07/10/2017 21:03 - - searching for Have I Got News for You under /media/My Video 07/10/2017 21:03 - =
07/10/2017 21:03 - Did not find directory.
07/10/2017 21:03 -
07/10/2017 21:03 - ==== folder /media/My Video/New ====
07/10/2017 21:03 -
07/10/2017 21:03 - No usable recordings in folder.

I was expecting it to move 'Have I Got News for You_20171006_2100.ts'
into sub-folder '/media/My Video/New/Programs and Mini Series/Have I Got News for You/' by creating it a moving the recording.

Many thanks for any advice.
 
Last edited:
So I have an 'Emulate Seriesfiler' rule >>>
"folder series "" action {fileunder ""}"

Series filer used to look for a folder of the right name somewhere in your folder tree and move the new recordings over. It's searching for one but not finding it but because the rule triggered it's not continuing on to the other two. Change the order of the rules and put the series file emulation at the end.
 
Ok. Thank you I've done as you suggested and it works.
I'm still not sure why, seem a little illogical to me.

Thanks again !!!
 
It's not illogical, you just don't understand sweeper. The rules are not like instructions in a program: if a test matches, that rule gets processed... but only that rule. So you need to put any "catch all" rule at the end if the list, otherwise it will mask all the other rules.
 
Thanks, yes I was thinking it was me not understanding...
So to keep it tidy I would need a condition that confirmed 'seriesfiler' will not find a folder to file in, so it does not match and get processed.
I've changed the timings of my 'new series filing' rule to '24 hours old' to prevent it filing recordings I want 'seriesfiler' to move.

And why not go to to next rule rather than stop processing?

Thanks again for the help.
 
Last edited:
I'm now trying to use Sweeper to cue files for cropping after Ad-detect.
I find that Ad-detect is not very good with 'family guy' and such. I noticed that when it does work well it puts 5 bookmarks in and not more or less.
So i thought I could set Ad-detect to happen without cropping and then use a Sweeper rule to select the ones with 5 bookmarks for cropping.

So this rule seems good but not sure I can "queue crop"
recurse 1 bookmarks 5 !textmatch %channel~~BBC* flag Addetection action {queue crop}

I guess I could move them to a folder with auto crop on but then how wold I move them back.
Is there a sensible way to achieve this? Is there a "crop" action?
Any other advise.

Many thanks.
 
Ditto (actually, I anticipated there would be errors and decided auto-crop would be too inconvenient in the end, so never bothered with it).

Most recordings (I imagine) are watch-and-delete, so it's no hassle. For a keeper, one would check the bookmark placement before cropping!
 
INFO. Had a scenario where there were several of the same programme (different Series and Episode numbers) under the one folder. This made browsing this folder on the Humax very slow as there were many files, some were duplicates. Also was a nightmare trying to find which episode to watch. I did not know about Sweeper until around a few months ago.
So here is the set of rules I run manually and use for organizing programmes into order for any recorded show that has the Series and Episode number available.
Code:
# If episode already exists in a Series Folder move it to Duplicates folder
fileexists {Series %series/Ep%episode-%asfilename:%epname:.ts} action {movecreate %folder/_duplicates}
# Rename Recording Files to Episode Number-Name
action {renamefile Ep%episode-%asfilename:%epname:}
# Rename Displayed Recording Title with Episode Number-Name
action {settitle {Ep%episode - %epname}}
# As episode does not exist already in the Series Folder move it there
action {movecreate {%folder/Series %series}}
After a show (or more) has been recorded it's sitting in the folder you would expect when recording a series for that show, and it will still have the original unique filename.ts. (See example picture below). I then run the rule at this point to tidy it away.
The rules will create a "Series N" folder and have the episodes relative to that Series number.
If there is a duplicate already stored among the "Series" folders then it shoves them into a "_duplicates" folder with the <original filename>.ts.
You can delete the "_duplicate" folder at your leisure as it will create this folder every time any duplicates are found.
If it is not a duplicate then the displayed title for the Humax and the programme filenames are renamed to "<Episode No.>-<Episode Title>" and then shoved into the relevant Series folder.
upload_2017-10-27_10-36-20.png

Hope you find this useful. To the creators of Sweeper - "I salute you! Thank you"
 
Last edited:
Back
Top