[DetectAds] Announcing DetectAds version 2

Bit of a hack, but you could do a mkdir/rmdir?

i.e. make a dir with a name encoded from the filename, using that dir's existence as the lock. A dir is easier than a file, as mkdir can then both be the taking, and the testing, of the lock.

I could, but if the process creating the directory dies before it has the chance to do the rmdir the lock is left permanently set - I need something that is automatically unset on failure.

I think I will create a lock file and use INUSE as the actual lock. In my usage scenario I don't anticipate race conditions to acquire the lock so the lack of atomicity in the testing for and setting INUSE shouldn't (famous last words) be a problem.
 
It should be fairly straightforward to write an advisory locking extension for Jim. I haven't seen how you are currently doing locking - are you using the 'listen on loopback' locking framework in webif?
 
It should be fairly straightforward to write an advisory locking extension for Jim. I haven't seen how you are currently doing locking - are you using the 'listen on loopback' locking framework in webif?
I am currently just uses the Lock class which failed in HM's case because his recording name hashed to the same value as 'detectads'

I am not sure if I have come across the "listen on loopback locking framework" - where is it used?
 
I could, but if the process creating the directory dies before it has the chance to do the rmdir the lock is left permanently set - I need something that is automatically unset on failure.
That's why you should have exception handlers that take care of this. "Clean up your own mess, don't expect something else to" should be a goal for all programs.
I am currently just uses the Lock class which failed in HM's case because his recording name hashed to the same value as 'detectads'
You obviously need a better hashing mechanism then (he said helpfully!).
 
That's why you should have exception handlers that take care of this. "Clean up your own mess, don't expect something else to" should be a goal for all programs.

You obviously need a better hashing mechanism then (he said helpfully!).
Yes, but it is difficult for an exception handler to handle a power cut or system hang.
 
I am currently just uses the Lock class which failed in HM's case because his recording name hashed to the same value as 'detectads'

I am not sure if I have come across the "listen on loopback locking framework" - where is it used?
They're the same thing.
Leave it with me and I'll extend it with a general file locking mechanism.
 
Do we have to do anything special to get this to work? I have detect ads set like so but the ads never get detected on any channel.

upload_2016-4-17_7-52-0.png
 
Absolutely content share needs to be turned on - that's the only way in-place decryption can occur (and processing the recording to detect and remove adverts requires decryption of the recording first). The genius of detectads is its ability to pipeline the processing so that decryption and then advert detection proceed while the recording is still being made.

detectads doesn't need auto-decrypt, although I recommend recursive auto-decrypt is set on the My Video folder. You will also need auto-unprotect installed if you want to process HiDef recordings (and some BBC programmes, because they are protecting some StDef programmes illicitly - particularly movies). Without auto-decrypt, programmes not processed by detectads won't be decrypted unless you take other measures.

The consequence of not decrypting recordings by routine is that recovery will be impossible if your HDR-FOX motherboard fails.
 
Last edited:
Just to be picky about that settings dialog:
  • Inconsistent use of "Recordings" and "Recording"
  • "Write output recording to" should probably have "folder" appended to it
  • Why is there a "0" in the "Other" entryfield
  • Dustbin isn't a verb
  • "Click for list" is bad style. "Show list" or "Show/edit list" or similar would be better
 
Sorry still not working. Anything I can try to figure out the solution?

It's certainly running

4999 19/04/2016 19:28:53 RM(23748)- DETECTADS: Checking /media/My Video/EastEnders/EastEnders_20160419_1928.ts (BBC ONE Yorks) for channel exclusion
4998 19/04/2016 19:01:04 DA(21542)- ==DETECTADS Chase Run: /media/My Video/Emmerdale/Emmerdale_20160419_1900.ts
4997 19/04/2016 19:01:03 RM(21529)- DETECTADS: Started /media/My Video/Emmerdale/Emmerdale_20160419_1900.ts for chaserun advert detection
4996 19/04/2016 19:01:03 RM(21529)- DETECTADS: Checking /media/My Video/Emmerdale/Emmerdale_20160419_1900.ts (ITV) for channel exclusion
4995 19/04/2016 18:29:41 DA(19973)- ==DETECTADS Chase Run: /media/My Video/Hollyoaks/Hollyoaks_20160419_1829.ts
4994 19/04/2016 18:29:41 RM(19971)- DETECTADS: Started /media/My Video/Hollyoaks/Hollyoaks_20160419_1829.ts for chaserun advert detection
 
Sorry still not working. Anything I can try to figure out the solution?

It's certainly running

4999 19/04/2016 19:28:53 RM(23748)- DETECTADS: Checking /media/My Video/EastEnders/EastEnders_20160419_1928.ts (BBC ONE Yorks) for channel exclusion
4998 19/04/2016 19:01:04 DA(21542)- ==DETECTADS Chase Run: /media/My Video/Emmerdale/Emmerdale_20160419_1900.ts
4997 19/04/2016 19:01:03 RM(21529)- DETECTADS: Started /media/My Video/Emmerdale/Emmerdale_20160419_1900.ts for chaserun advert detection
4996 19/04/2016 19:01:03 RM(21529)- DETECTADS: Checking /media/My Video/Emmerdale/Emmerdale_20160419_1900.ts (ITV) for channel exclusion
4995 19/04/2016 18:29:41 DA(19973)- ==DETECTADS Chase Run: /media/My Video/Hollyoaks/Hollyoaks_20160419_1829.ts
4994 19/04/2016 18:29:41 RM(19971)- DETECTADS: Started /media/My Video/Hollyoaks/Hollyoaks_20160419_1829.ts for chaserun advert detection
Try turning on debugging logging (General Settings)
It appears to be starting but not completing.

Also try running it from the Browse menu using Run Analysis now to see if any error messages are shown
 
Try turning on debugging logging (General Settings)
It appears to be starting but not completing.

Also try running it from the Browse menu using Run Analysis now to see if any error messages are shown
Thanks, running it manually works well. Here is my log

5000 19/04/2016 22:10:27 DA(3816)- caught: table queue has no column named retry -code 1 -level 0 -errorinfo {{} /mod/webif/plugin/detectads/detectads.jim 173} -errorcode NONE
4999 19/04/2016 22:10:22 DA(3816)- caught: table queue has no column named retry -code 1 -level 0 -errorinfo {{} /mod/webif/plugin/detectads/detectads.jim 173} -errorcode NONE
4998 19/04/2016 22:10:17 DA(3816)- caught: table queue has no column named retry -code 1 -level 0 -errorinfo {{} /mod/webif/plugin/detectads/detectads.jim 173} -errorcode NONE
4997 19/04/2016 22:10:12 DA(3816)- caught: table queue has no column named retry -code 1 -level 0 -errorinfo {{} /mod/webif/plugin/detectads/detectads.jim 173} -errorcode NONE
4996 19/04/2016 22:10:07 DA(3816)- caught: table queue has no column named retry -code 1 -level 0 -errorinfo {{} /mod/webif/plugin/detectads/detectads.jim 173} -errorcode NONE
4995 19/04/2016 22:10:07 DA(3816)- ==DETECTADS Chase Run: /media/My Video/Get Carter_20160419_2210.ts
 
Thanks, running it manually works well. Here is my log

5000 19/04/2016 22:10:27 DA(3816)- caught: table queue has no column named retry -code 1 -level 0 -errorinfo {{} /mod/webif/plugin/detectads/detectads.jim 173} -errorcode NONE
4999 19/04/2016 22:10:22 DA(3816)- caught: table queue has no column named retry -code 1 -level 0 -errorinfo {{} /mod/webif/plugin/detectads/detectads.jim 173} -errorcode NONE
4998 19/04/2016 22:10:17 DA(3816)- caught: table queue has no column named retry -code 1 -level 0 -errorinfo {{} /mod/webif/plugin/detectads/detectads.jim 173} -errorcode NONE
4997 19/04/2016 22:10:12 DA(3816)- caught: table queue has no column named retry -code 1 -level 0 -errorinfo {{} /mod/webif/plugin/detectads/detectads.jim 173} -errorcode NONE
4996 19/04/2016 22:10:07 DA(3816)- caught: table queue has no column named retry -code 1 -level 0 -errorinfo {{} /mod/webif/plugin/detectads/detectads.jim 173} -errorcode NONE
4995 19/04/2016 22:10:07 DA(3816)- ==DETECTADS Chase Run: /media/My Video/Get Carter_20160419_2210.ts

and here is the chaseget log

3 19/04/2016 22:10:02 - CG(3777)- Not awakened by chaseget - quit
2 19/04/2016 22:10:02 - CG(3777)- Now 22:10 Range 00:00 - 00:00
 
Back
Top