How do I check if file is decrypted

marsha11

Member
Hi,

I transfer my video files to a NAS but occasionally some files are copied to the NAS before they are decrypted. I use rsync to copy the files. Is there a way that only decrypted files are processed?
 

Wallace

Traveler 34122
As far as I can see, recording flag lists practically everything apart from decrypted. Please prove me wrong as I too have a use for this...


In truth, I find Sweeper very complicated and can easily overlooked something.
 

Black Hole

May contain traces of nut
IMG_2341.jpg
The actions which move recordings can now take an absolute path as well as a relative one. This makes it possible to automatically archive recordings off to an external disk through sweeper rules. sceptic - this should make your automatic NAS archiving possible
 
OP
M

marsha11

Member
Use sweeper.
Thanks.

I've set the destination folder as _Decrypted/%folder and I get:
/media/My Video/_Decrypted/media/My Video/folder name/filename.

Is there anyway to strip off /media/My Video and just have:
/media/My Video/_Decrypted/folder name/filename ?

What's the difference between Encrypted and Encrypted on-Disk?
 

Trev

The Dumb One
What's the difference between Encrypted and Encrypted on-Disk?
I can't get my head round that one either. BH has posted about it on another thread suggesting clarification. As everything is 'on the disk' what's the difference?
 

xyz321

Well-Known Member
I've set the destination folder as _Decrypted/%folder and I get:
/media/My Video/_Decrypted/media/My Video/folder name/filename.

Is there anyway to strip off /media/My Video and just have:
/media/My Video/_Decrypted/folder name/filename ?
Try:
Code:
%regsub?%folder?^/media/My Video?_Decrypted?
 

Black Hole

May contain traces of nut
What's the difference between Encrypted and Encrypted on-Disk?
In the flagged as options, there are "Encrypted" and "Encrypted On Disk". Those of us who have been around from the start know what these mean, but it is rather obtuse. How about substituting "Protected (Enc)" and "Decrypted (Dec)" respectively? (Decrypted would be the inverse of "Encrypted On Disk", and require negation of the trigger condition.)
Thus, using the existing naming rather than the possible future updates:

"Encrypted" means the "Enc" flag is set, as per SUI media listing (and WebIF), which actually means "Protected" (ie will not be decrypted on USB copy or streamed by DLNA unless the destination is DTCP compliant).

"Encrypted on Disk" means the recording has not (so far) been decrypted, as signalled by the lack of the "Dec" icon in the WebIF media listing.​

The nomenclature problems have been around since the very beginning, due to Humax choosing "Enc" to indicate that a recording from a HiDef service is not available for use (in the clear) elsewhere. The problem is that the lack of an Enc icon does not imply "decrypted" (although this is irrelevant without the custom firmware).

If af123 adopts my suggestion, I envisage a roll-out also automatically updating users' sweeper config files to make the necessary changes.

Further reading:

 

af123

Administrator
Staff member
Try:
Code:
%regsub?%folder?^/media/My Video?_Decrypted?

I've just uploaded an updated version of sweeper which has a %bfolder token to effectively do the same thing and renames the encrypted flags to make more sense. If you update to version 2.1.5-6 you can do something like this:

Screenshot 2017-05-27 10.22.50.png

Nothing wrong with xyz321's solution but it isn't easy for the newcomer.
 
OP
M

marsha11

Member
af123 Thanks for the Sweeper upgrade, here's what I get now ...

Folders+recordings are now placed correctly in _Decrypted but recordings in My Video are moved to:

_Decrypted/mnt/hd2/My Video

I am using the "Process Files and Files within Folders" rule type.

Edit: I've solved this problem by using two rules. One of type "Process Files", the other of type "Process Folders". However I've had to use the absolute paths
/media/My Video/_Decrypted
/media/My Video/_Decrypted/%bfolder
otherwise I still get odd sub-folders.
 
Last edited:
OP
M

marsha11

Member
This should probably be in a seperate thread but posting here for continuity with my last post.

My rule type "Process Folders" for copying decrypted files to _Decrypted has an age setting of <36 hours. There was only one recording in a folder that matched the rule but all the recordings in the folder were copied to the destination folder.

Code:
27/05/2017 14:56 - ==== folder /media/My Video/Silent Witness ====
27/05/2017 14:56 -
27/05/2017 14:56 -  --- Considering /media/My Video/Silent Witness/Silent Witness_20170526_2201.ts
27/05/2017 14:56 - Processing [!flag ODEncrypted age {< 36} action {copycreate {/media/My Video/_Decrypted/%bfolder}}]
27/05/2017 14:56 -    !flag(ODEncrypted)
27/05/2017 14:56 -      MATCH
27/05/2017 14:56 -    age(< 36)
27/05/2017 14:56 -  ... Recording age: 14
27/05/2017 14:56 -      MATCH
27/05/2017 14:56 -    action(copycreate {/media/My Video/_Decrypted/%bfolder})
27/05/2017 14:56 - ACTION: copycreate(/media/My Video/_Decrypted/%bfolder) [1]
27/05/2017 14:56 -   Expanded [/media/My Video/_Decrypted/%bfolder] -> [/media/My Video/_Decrypted/Silent Witness]
27/05/2017 14:56 - Applying action to recordings in /media/My Video/Silent Witness
27/05/2017 14:56 - + folder_apply processing /media/My Video/Silent Witness/Silent Witness_20170124_2100.ts
27/05/2017 14:56 -   Expanded [/media/My Video/_Decrypted/%bfolder] -> [/media/My Video/_Decrypted/Silent Witness]
27/05/2017 14:56 - copy /media/My Video/Silent Witness/Silent Witness_20170124_2100.ts to /media/My Video/_Decrypted/%bfolder
27/05/2017 14:56 - + folder_apply processing /media/My Video/Silent Witness/Silent Witness_20170517_2200.ts
27/05/2017 14:56 -   Expanded [/media/My Video/_Decrypted/%bfolder] -> [/media/My Video/_Decrypted/Silent Witness]
27/05/2017 14:56 - copy /media/My Video/Silent Witness/Silent Witness_20170517_2200.ts to /media/My Video/_Decrypted/%bfolder
27/05/2017 14:56 - + folder_apply processing /media/My Video/Silent Witness/Silent Witness_20170522_2201.ts
27/05/2017 14:56 -   Expanded [/media/My Video/_Decrypted/%bfolder] -> [/media/My Video/_Decrypted/Silent Witness]
27/05/2017 14:56 - copy /media/My Video/Silent Witness/Silent Witness_20170522_2201.ts to /media/My Video/_Decrypted/%bfolder
27/05/2017 14:56 - + folder_apply processing /media/My Video/Silent Witness/Silent Witness_20170519_2201.ts
27/05/2017 14:56 -   Expanded [/media/My Video/_Decrypted/%bfolder] -> [/media/My Video/_Decrypted/Silent Witness]
27/05/2017 14:56 - copy /media/My Video/Silent Witness/Silent Witness_20170519_2201.ts to /media/My Video/_Decrypted/%bfolder
27/05/2017 14:56 - + folder_apply processing /media/My Video/Silent Witness/Silent Witness_20170116_2101.ts
27/05/2017 14:56 -   Expanded [/media/My Video/_Decrypted/%bfolder] -> [/media/My Video/_Decrypted/Silent Witness]
27/05/2017 14:56 - copy /media/My Video/Silent Witness/Silent Witness_20170116_2101.ts to /media/My Video/_Decrypted/%bfolder
27/05/2017 14:56 - + folder_apply processing /media/My Video/Silent Witness/Silent Witness_20170523_2159.ts
27/05/2017 14:56 -   Expanded [/media/My Video/_Decrypted/%bfolder] -> [/media/My Video/_Decrypted/Silent Witness]
27/05/2017 14:56 - copy /media/My Video/Silent Witness/Silent Witness_20170523_2159.ts to /media/My Video/_Decrypted/%bfolder
27/05/2017 14:56 - + folder_apply processing /media/My Video/Silent Witness/Silent Witness_20170516_2159.ts
27/05/2017 14:56 -   Expanded [/media/My Video/_Decrypted/%bfolder] -> [/media/My Video/_Decrypted/Silent Witness]
27/05/2017 14:56 - copy /media/My Video/Silent Witness/Silent Witness_20170516_2159.ts to /media/My Video/_Decrypted/%bfolder
27/05/2017 14:56 - + folder_apply processing /media/My Video/Silent Witness/Silent Witness_20170518_2202.ts
27/05/2017 14:56 -   Expanded [/media/My Video/_Decrypted/%bfolder] -> [/media/My Video/_Decrypted/Silent Witness]
27/05/2017 14:56 - copy /media/My Video/Silent Witness/Silent Witness_20170518_2202.ts to /media/My Video/_Decrypted/%bfolder
27/05/2017 14:56 - + folder_apply processing /media/My Video/Silent Witness/Silent Witness_20170123_2102.ts
27/05/2017 14:56 -   Expanded [/media/My Video/_Decrypted/%bfolder] -> [/media/My Video/_Decrypted/Silent Witness]
27/05/2017 14:56 - copy /media/My Video/Silent Witness/Silent Witness_20170123_2102.ts to /media/My Video/_Decrypted/%bfolder
27/05/2017 14:56 - + folder_apply processing /media/My Video/Silent Witness/Silent Witness_20170526_2201.ts
27/05/2017 14:56 -   Expanded [/media/My Video/_Decrypted/%bfolder] -> [/media/My Video/_Decrypted/Silent Witness]
27/05/2017 14:56 - copy /media/My Video/Silent Witness/Silent Witness_20170526_2201.ts to /media/My Video/_Decrypted/%bfolder
27/05/2017 14:56 - + folder_apply processing /media/My Video/Silent Witness/Silent Witness_20170524_2200.ts
27/05/2017 14:56 -   Expanded [/media/My Video/_Decrypted/%bfolder] -> [/media/My Video/_Decrypted/Silent Witness]
27/05/2017 14:56 - copy /media/My Video/Silent Witness/Silent Witness_20170524_2200.ts to /media/My Video/_Decrypted/%bfolder
27/05/2017 14:56 - + folder_apply processing /media/My Video/Silent Witness/Silent Witness_20170130_2100.ts
27/05/2017 14:56 -   Expanded [/media/My Video/_Decrypted/%bfolder] -> [/media/My Video/_Decrypted/Silent Witness]
27/05/2017 14:56 - copy /media/My Video/Silent Witness/Silent Witness_20170130_2100.ts to /media/My Video/_Decrypted/%bfolder
27/05/2017 14:56 - + folder_apply processing /media/My Video/Silent Witness/Silent Witness_20170131_2100.ts
27/05/2017 14:56 -   Expanded [/media/My Video/_Decrypted/%bfolder] -> [/media/My Video/_Decrypted/Silent Witness]
27/05/2017 14:56 - copy /media/My Video/Silent Witness/Silent Witness_20170131_2100.ts to /media/My Video/_Decrypted/%bfolder
27/05/2017 14:56 - + folder_apply processing /media/My Video/Silent Witness/Silent Witness_20170118_2101.ts
27/05/2017 14:56 -   Expanded [/media/My Video/_Decrypted/%bfolder] -> [/media/My Video/_Decrypted/Silent Witness]
27/05/2017 14:56 - copy /media/My Video/Silent Witness/Silent Witness_20170118_2101.ts to /media/My Video/_Decrypted/%bfolder
27/05/2017 14:56 - + folder_apply processing /media/My Video/Silent Witness/Silent Witness_20170525_2202.ts
27/05/2017 14:56 -   Expanded [/media/My Video/_Decrypted/%bfolder] -> [/media/My Video/_Decrypted/Silent Witness]
27/05/2017 14:56 - copy /media/My Video/Silent Witness/Silent Witness_20170525_2202.ts to /media/My Video/_Decrypted/%bfolder
Close

This doesn't happen with rule type "Process Files and Files within Folders" see output below.

Code:
27/05/2017 16:05 - + Sweeper processing /media/My Video/Silent Witness/Silent Witness_20170123_2102.ts
27/05/2017 16:05 - Processing [!flag ODEncrypted age {< 18} action {copycreate {/media/My Video/_Decrypted/%bfolder}}]
27/05/2017 16:05 -    !flag(ODEncrypted)
27/05/2017 16:05 -      MATCH
27/05/2017 16:05 -    age(< 18)
27/05/2017 16:05 -  ... Recording age: 2969
27/05/2017 16:05 -      Nomatch
27/05/2017 16:05 - + Sweeper processing /media/My Video/Silent Witness/Silent Witness_20170526_2201.ts
27/05/2017 16:05 - Processing [!flag ODEncrypted age {< 18} action {copycreate {/media/My Video/_Decrypted/%bfolder}}]
27/05/2017 16:05 -    !flag(ODEncrypted)
27/05/2017 16:05 -      MATCH
27/05/2017 16:05 -    age(< 18)
27/05/2017 16:05 -  ... Recording age: 15
27/05/2017 16:05 -      MATCH
27/05/2017 16:05 -    action(copycreate {/media/My Video/_Decrypted/%bfolder})
27/05/2017 16:05 - ACTION: copycreate(/media/My Video/_Decrypted/%bfolder) [0]
27/05/2017 16:05 -   Expanded [/media/My Video/_Decrypted/%bfolder] -> [/media/My Video/_Decrypted/Silent Witness]
27/05/2017 16:05 - copy /media/My Video/Silent Witness/Silent Witness_20170526_2201.ts to /media/My Video/_Decrypted/%bfolder
27/05/2017 16:05 - + Sweeper processing /media/My Video/Silent Witness/Silent Witness_20170524_2200.ts
27/05/2017 16:05 - Processing [!flag ODEncrypted age {< 18} action {copycreate {/media/My Video/_Decrypted/%bfolder}}]
27/05/2017 16:05 -    !flag(ODEncrypted)
27/05/2017 16:05 -      MATCH
27/05/2017 16:05 -    age(< 18)
27/05/2017 16:05 -  ... Recording age: 63
27/05/2017 16:05 -      Nomatch


Does Sweeper require a "Process Files within Folders" rule type?
 
Last edited:
OP
M

marsha11

Member
Yes and has one "For each recording and recordings within folders (1 level deep)" (recurse 1 if usng the file editor)

I used this method at first but got an obscure path to my recordings i.e.
/media/My Video/_Decrypted/media/My Video/folder name/filename. af123 then produced an update incorporating %bfolder token. This correctly placed folders in /media/My Video/_Decrypted but recordings from media root are placed in /media/My Video/_Decrypted/mnt/hd2/My Video.

I tried using two rule types: media root recordings and folder recordings. Both media root recordings and folders were placed correctly in the _Decrypted folder but a single recording match in the examined folder resulted in all files in the folder being moved, not just the one that matched the rule.
 
Last edited:

af123

Administrator
Staff member
af123 then produced an update incorporating %bfolder token. This correctly placed folders in /media/My Video/_Decrypted but recordings from media root are placed in /media/My Video/_Decrypted/mnt/hd2/My Video.
I've updated sweeper again and that should fix the inconsistency with the %bfolder token

There was only one recording in a folder that matched the rule but all the recordings in the folder were copied to the destination folder.
That's expected for a folder rule. It just finds a candidate recording in the folder and runs the criteria against that to see if the action should be taken against the entire folder. It's confusing and is why the newer recursive rules were introduced. Now that %bfolder is fixed you should be able to revert to a single rule again.
 
Top