Identifying Decrypted/Non-Decrypted Recordings in the SUI Media List

Black Hole

May contain traces of nut
It would be nice to be able to see on the SUI media list (when browsing file shares from other 'FOXes) whether a recording has been decrypted and is therefore playable (instead of just trying it and succeeding or failing). This will be valid even in these halcyon days of near-instant decryption: the recording may be in the process of decryption, and if it is a recording on a HD-FOX only manual decryption is available anyway.

It seems to me there may be several ways of going about this:
  • sweeper could be programmed to add a flag to the media list title (assuming it can detect the decryption state as a condition), but this would only be valid after sweeper has run on its 20-minute intervals;

  • auto-decryption could add a flag to the media list title;

  • auto-decryption could put an icon in the thumbnail graphic for the recording.
I like the third idea, but it has some drawbacks. It would be easy to copy a stock graphic to the thumbnail file, but this would suppress the Humax's native thumbnail extraction. We could extract our own thumbnail, then overlay a marker on it (eg a star in the top right corner), but this would be compute-intensive (this would not interfere with custom thumbnails - they are only available with a decrypted file anyway).
 
sweeper rule:

!flag Encrypted action {settitle {* %orig}}

...or should that be "!flag ODEncrypted"? Is the ODE flag actual encryption, and Encrypted is actually the Enc flag?
 
Yes, a bit of forum googling confirms it should be the ODEncrypted flag. It would be useful if the wiki page for sweeper had an explanation of the flags, or a cross reference to an explanation in a page for the hmt utility.

I was considering the opposite approach: set a "*" on undecrypted files then clear it when the file is decrypted, but I can't think of a way to achieve this without an edit function - I presume a prefix would become part of %orig on subsequent runs. However, the whole sweeper approach is a bit of a problem, because by the time it runs the file will have been decrypted anyway.
 
Last edited:
I'm a bit surprised this has received no reaction - does nobody else think this is a good idea? Having thought it through, I think it is a task for the decryption process itself to set an optional visual flag of some kind.
 
The easiest solution that I can think of is to write a recmon module which is triggered when a recording completes and tweaks the media display name (such as prepending a *). Then have a sweeper rule later which takes it away if the ODEncrypted flag isn't there. Might require a search/replace sweeper action adding.
 
Successful test of the first part:

Code:
humax# hmt Escape\ to\ the\ Country_20150429_1607. | grep Title
Title:Escape to the Country
ITitle:Escape to the Country
humax# ir STOP OK
humax# sleep 10
humax# hmt Escape\ to\ the\ Country_20150429_1607. | grep Title
Title:* Escape to the Country
ITitle:* Escape to the Country

I've put this script onto the disk as /mod/etc/recmon.d/aa_setencflag:

Code:
#!/mod/bin/jimsh

source /mod/webif/lib/setup
require ts.class

set file [lindex $argv 0]
set ts [ts fetch "$file.ts"]

if {[$ts flag ODEncrypted] && [string index [$ts get title] 0] ne "*"} {
   $ts settitle [concat "*" [$ts get title]]
}

and made it executable chmod +x /mod/etc/recmon.d/aa_setencflag.

The name was chosen to be alphabetically first. Recmon actually runs all jobs in parallel but starts them in alphabetic order so being first gives a slight advantage.
 
Would it be possible to have this configurable on/off? I only autodecrypt a few folders, and don't particularly like the idea of any folders that don't get decrypted forever having a * at the start of the titles. Perhaps only folders that are destined to be decrypted could have this feature, but a global on/off would be nice too as to be honest I'm not really keen on the idea anyway.

Maybe this would be the intention as simply a package that you could install or not, but thought I'd throw in my two-penneth!
 
Last edited:
Absolutely. Very much an opt-in rather than an opt-out!

af123 is just providing mechanisms that will get the job done, whether you use them is your choice.
 
Sweeper can now handle removing the * from the beginning of the title once decryption is complete with a rule like this:

Code:
!flag ODEncrypted title {\* *} action {settitle "%orig%replace:* ::"}
The new bit is the %replace:<search>:<replace>: token. The separator ( : here) can be any single character so
Code:
!flag ODEncrypted title {\* *} action {settitle "%orig%replace!* !!"}
would be just as good.
 
Back
Top