DetectAds Run Now vs Run in Background

ribrob

Member
Hi there,

I don't seem to get the options to "Run Now" or "Run in Background"

I just get "Remove from background queue"

I suspect that at some stage a Sweeper rule i set up as gone AWOL and added lots of files to the queue.

I'm shown a list of 20,000+ files (many duplicates of the same recordings) which i assume is the queue.

If it is a queue - how do i clear this?

How do i get "Run now" and "Run in background" back?

I've tried uninstalling the DetectAds package, rebooting and reinstalling the package, but when i next invoke DetectAds via the OPT+ dropdown, i still just get "Remove from background queue" and the list.

Any ideas?

Thanks in advance!

Once i've cracked this, i could also do with some help checking my Sweeper rules too! I've disabled all of them for now.

Rob.

Screen Shot 2015-12-22 at 22.26.26.png
 
Last edited:

MymsMan

Ad detector
Kill the queue database by opening a telnet window and entering the command
Code:
rm /mod/etc/detectads_queue.db

Because all your recordings are in the background processing queue the only available option is to remove from the queue.

You probably need to disable your sweeper rules first to prevent the recording being readded to the queue
 
OP
ribrob

ribrob

Member
Great thank you! That's emptied the queue.

As for Sweeper, here's what i want to do;

1. Move films to be processed into a folder called "- Process"

2. Check files in the folder "- Process", and if they're not flagged for Ad-detection, and if Ad-detection has not already been done, add them to the detectads queue.

3. If a file in the folder "- Process" is flagged as Ad-detection done, then move it to the folder called "- Films"

Does it look right to you?

Rob

Screen Shot 2015-12-23 at 01.02.02.png
 

Black Hole

May contain traces of nut
That's rather inefficient (not that it really matters) as it would have to be a recursive rule set applied to My Video. The first rule only applies to My Video, the second and third rule only apply to My Video/Process, so they could be in a sweeper rule set specific to that folder (with no need to test for the folder name).
 

Trev

The Dumb One
Putting aside the "because I want to/can" aspect, why don't you just use chaseplay and then use a combination of your rule 1 and 3 to move them to your 'Films' folder and cut out the 'middle man?
 
OP
ribrob

ribrob

Member
Putting aside the "because I want to/can" aspect, why don't you just use chaseplay and then use a combination of your rule 1 and 3 to move them to your 'Films' folder and cut out the 'middle man?

I was worried that the box would not cope when recording 2 things and us watching a third, which there will be a lot of over the next few weeks.
 
OP
ribrob

ribrob

Member
That's rather inefficient (not that it really matters) as it would have to be a recursive rule set applied to My Video. The first rule only applies to My Video, the second and third rule only apply to My Video/Process, so they could be in a sweeper rule set specific to that folder (with no need to test for the folder name).

I did start with the detectad rules on the "- Process" folder itself but moved it to be all in the main Sweeper rules to have it all in one place. Is there a hit doing it the way above?
 

Trev

The Dumb One
But it will probably be doing the post processing whilst you are still recording/watching something anyway as it will start processing soon after the recording finishes.
You could always do a couple of test runs to see if 'the box can cope'.
 

MymsMan

Ad detector
Great thank you! That's emptied the queue.

As for Sweeper, here's what i want to do;

1. Move films to be processed into a folder called "- Process"

2. Check files in the folder "- Process", and if they're not flagged for Ad-detection, and if Ad-detection has not already been done, add them to the detectads queue.

3. If a file in the folder "- Process" is flagged as Ad-detection done, then move it to the folder called "- Films"

Does it look right to you?

Rob

View attachment 2088
I agree with BH, The rules don't appear to be global rules so would only apply, I think, to the My Video folder

This is OK for the first rule for moving Films since they shouldn't appear in series folders but are the other rules actually doing anything?

I am not a sweeper expert and have had problems with Global rules not working as I would expect them to - I don't know if this is a bug in sweeper or in my brain!
 
OP
ribrob

ribrob

Member
I am not a sweeper expert and have had problems with Global rules not working as I would expect them to - I don't know if this is a bug in sweeper or in my brain!

To be honest i do find setting up the rules a bit of a mind bender!

For example in some instances it'll let me have a "Continue to the next rule" and in others it'll insist on only giving me "Stop processing rules".

stop-continue.png

Plus there seems to be so many ways to do the same thing, so i'm never quite sure if i'm doing things the best way!
 

MymsMan

Ad detector
When processing a sub-folder Sweeper only checks the newest recording to see if it matches the conditions but applies the action to every recording in the folder without checking whether they meet the criteria.

So using the DetectAds sample rule when a new unprocessed recording is added to the series folder every other, already processed, episode is requeued for ad detection.
This is not what is wanted! :(
I think it is the reason that ribrob ended up with 20K entries in the queue
An example using a test rule
Code:
23/12/2015 15:39 - ==== folder /media/My Video/Border Security_ Canada's___ ==== 
23/12/2015 15:39 - 
23/12/2015 15:39 - --- Considering /media/My Video/Border Security_ Canada's___/Border Security_ Canada's____20151219_0015.ts 
23/12/2015 15:39 - Processing [!flag New foldername Border action {setguidance {Global rule applied}}] 
23/12/2015 15:39 - !flag(New)
23/12/2015 15:39 - MATCH 
23/12/2015 15:39 - foldername(Border) 
23/12/2015 15:39 - MATCH 
23/12/2015 15:39 - action(setguidance {Global rule applied}) 
23/12/2015 15:39 - ACTION: setguidance(Global rule applied) [1] 
23/12/2015 15:39 - Applying action to recordings in /media/My Video/Border Security_ Canada's___ 
23/12/2015 15:39 - + folder_apply processing /media/My Video/Border Security_ Canada's___/Border Security_ Canada's____20151219_0015.ts 
23/12/2015 15:39 - Setting guidance for /media/My Video/Border Security_ Canada's___/Border Security_ Canada's____20151219_0015.ts to Global rule applied 
23/12/2015 15:39 - + folder_apply processing /media/My Video/Border Security_ Canada's___/Border Security_ Canada's____20151218_2345.ts 
23/12/2015 15:39 - Setting guidance for /media/My Video/Border Security_ Canada's___/Border Security_ Canada's____20151218_2345.ts to Global rule applied 
23/12/2015 15:39 -

I can't think of any circumstances where the current processing is desirable.

Either every recording in the folder should have the tests applied which is what I would expect from recursive processing or the action should only be applied to the newest recording on the basis that older episodes will have been processed when they were first added to the folder.
 

Black Hole

May contain traces of nut
Sweeper has gone way beyond its original intentions, so I expect oversights in the later extensions.

Is there a hit doing it the way above?
Apart from the mis-operation indicated in post 12 (which will not be the case if you apply individual sweeper rule sets to individual folders), for a recursive rule set the executive has to scan the whole My Video file system and check whether each rule applies to each entity found. Of course this is a hit, even if only minor, and will increase with an expanding set of recordings and folders.
 

MymsMan

Ad detector
To be honest i do find setting up the rules a bit of a mind bender!

For example in some instances it'll let me have a "Continue to the next rule" and in others it'll insist on only giving me "Stop processing rules".

After moving/deleting a recording it is no longer in the folder so it is no longer possible to apply further rules to it hence Stop process, whilst other actions are safe to Continue processing.
Plus there seems to be so many ways to do the same thing, so i'm never quite sure if i'm doing things the best way
"Best" is a highly subjective term and often comes down to personal taste, if something works for you and doesn't introduce other problems stick with it.
 

af123

Administrator
Staff member
When processing a sub-folder Sweeper only checks the newest recording to see if it matches the conditions but applies the action to every recording in the folder without checking whether they meet the criteria.
...
I can't think of any circumstances where the current processing is desirable.
That is how it is designed to work at the moment and why the GUI says 'For each sub-folder, inspect a recording within and...'.

It's historic - the original package only handled sweeping one-off recordings from the top level based on various criteria. It was then updated to support moving series recording folders, originally to replace the seriesfiler package but also to allow for more options. The actions were at that time applied to the whole folder (move/copy/merge etc.) so it needed a way to work out whether the folder matched the criteria - the solution was to pick the newest recording as a representative one against which the criteria were matched.

If you want to apply actions to recordings and check each recording against criteria, then the rules currently need to be inside the folder rather than at the level above.

Now might be the time to change this behaviour.
 
Last edited:

MymsMan

Ad detector
I never used Series Filer but even for replicating that function I don't think it would break the functionality if you applied the checks to each recording in turn and moved them individually if they met the criteria.

Under normal circumstances you wouldn't get more than one episode in a folder between sweeps and you wouldn't expect non matching recordings to appear in a series folder.
 

hairy_mutley

Active Member
Is there a way to clear the detectads queue, I seem to have created a sweeper rule that has repeatedly queued a number of files. It would be best to purge the queue and start again.
 

MymsMan

Ad detector
The quickest way to clear multiple entries is to delete /mod/etc/detectads_queue.db

You can remove individual entries through the webif but that is time consuming for large scale cleanup
 

hairy_mutley

Active Member
Thanks, dB deleted so that has solved that problem.

Interesting that you mention deletion through the WebIf. I looked for a way and failed to find it... where is it?
 

MymsMan

Ad detector
If you reselect a file that is already on the queue it will give you the option of removing the entry from the queue.
 
Top