Unencrypt vs Webif with Decrypt

af123

Administrator
Staff member
It still descends into special folders looking for the .auto flags but it will no longer process them as a result of a higher recursive flag. Do you have the latest version? There's a block just above there that will break any recursion:

Code:
        if {$force && [string match {\[*} [file tail $dir]]} {
                log "Special folder, skipping."
                set force 0
        }
 

andyk

Member
Well I think I have the latest version, but haven't made a formal note of any changes I made. If I knock out my code and run
Code:
    # Recursion
    if {!$force && [file exists "$dir/.auto${attr}r"]} {
        log "[string repeat " " $indent]  (R)"
        set force 1
    }
#    if {!$force && ![file exists "$dir/.auto$attr"]} {
#        log "returning - not processing special directory $dir"
#        return
#    }

    dsc

    if {$force || [file exists "$dir/.auto$attr"]} { $attr $dir }

    foreach entry [readdir -nocomplain $dir] {
        if {[file isdirectory "$dir/$entry"]} {
            scan "$dir/$entry" $attr $force
        }
    }
and set logging on, I get
Code:
10/02/2013 10:00 -           Already decrypted.
10/02/2013 10:00 -     [/media/My Video/Blandings]
10/02/2013 10:00 - DECRYPT: [/media/My Video/Blandings]
10/02/2013 10:00 -     [/media/My Video/Room at the Top]
10/02/2013 10:00 - DECRYPT: [/media/My Video/Room at the Top]
10/02/2013 10:00 -           Already decrypted.
10/02/2013 10:00 -           Already decrypted.
10/02/2013 10:00 -     [/media/My Video/[netgear]]
10/02/2013 10:00 - Special folder, skipping.
10/02/2013 10:00 -       [/media/My Video/[netgear]/Great Expectations]
10/02/2013 10:00 -       [/media/My Video/[netgear]/Harry Potter]
10/02/2013 10:00 -       [/media/My Video/[netgear]/Movies]
I originally identified a problem when I noticed the scans were taking a very long time when the NAS drive was mounted.

Incidentally, there also seems to be something wrong with the free space calculation - I've not looked at how that works - I don't know whether it's a side-effect of mounting the NAS drive.
 

af123

Administrator
Staff member
That looks right to me. I'm assuming you have recursive auto-decrypt enabled on the media root?
When it encounters [netgear] it turns off the recursive flag but still scans the directory structure onwards looking for any specific directories which have been specifically flagged.

Disk space calculation looks ok for me but could be related to the NAS - what are you seeing?

Here's how to check it:

Code:
humax# jimsh
Welcome to Jim version 0.73
. source /mod/var/mongoose/lib/setup
. require system.class
. system diskfree
1221740253184
. ^D
 
humax# df -k /media/My\ Video/
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2            1941367728 748262012 1193105716  39% /mnt/hd2
humax# dc
1193105716 1024 * p
1221740253184
^D
 

andyk

Member
Yes I have auto enabled at the top level - I was expecting no action in the special directory unless it's flagged explicitly. I thought the idea of the special directory was to avoid it participating in such scans. Taking hours to trawl through the NAS - it's big, and very slow :-( - checking for decrypting/shrinking which will never trigger isn't too sensible for me.

The problem with the size thing is that every file that exists is checked - wasn't expecting that. So the scan stops whenever a particularly large file is discovered. Since I keep the disc fairly full, it means that I need to keep spare 10 GiB + 4 * largest file (which is e.g. 3 hours HD recording). Not sure why you choose 4* or 10 GiB by the way. I'll mod my script to only check files that are going to be processed rather than all files to suit my situation.
 

Black Hole

May contain traces of nut
It's a bad idea to mount a NAS as a folder in My Video. Apart from the custom packages, the native Humax DLNA indexing will be walking the NAS and slowing down the rate at which new recordings get added to the index - and thus becoming available to stream or decrypt. Also the indexer might break completely if it comes across a file it doesn't like.
 

af123

Administrator
Staff member
I was expecting no action in the special directory unless it's flagged explicitly. I thought the idea of the special directory was to avoid it participating in such scans.

The special directory terminates the recursive action only. Many people use a special directory to make it immune from something like flatten but still have a hierarchy of recordings under it and may want to set flags on something in there.

Taking hours to trawl through the NAS - it's big, and very slow :-( - checking for decrypting/shrinking which will never trigger isn't too sensible for me.

I agree. I propose to change the process so that it will completely skip any special directories that are mount points (different device ID). That should make it work properly in your case and still allow flexibility.

The problem with the size thing is that every file that exists is checked - wasn't expecting that. So the scan stops whenever a particularly large file is discovered. Since I keep the disc fairly full, it means that I need to keep spare 10 GiB + 4 * largest file (which is e.g. 3 hours HD recording).

That's a bug. I'll change it to only check disk space when it's actually going to process a file.

Not sure why you choose 4* or 10 GiB by the way.

Over caution I suspect! I'll change that too.
 

andyk

Member
It's a bad idea to mount a NAS as a folder in My Video. Apart from the custom packages, the native Humax DLNA indexing will be walking the NAS and slowing down the rate at which new recordings get added to the index - and thus becoming available to stream or decrypt. Also the indexer might break completely if it comes across a file it doesn't like.
Thanks for that, but I don't use DLNA (which I find nothing like as useful or useable as just files and folders). So it's just the custom sequences I'm dealing with I think.
 

andyk

Member
The special directory terminates the recursive action only. Many people use a special directory to make it immune from something like flatten but still have a hierarchy of recordings under it and may want to set flags on something in there.

Oh I see - fair enough. Now it just scans the directories, rather than processing them, it doesn't take an inordinate time.

I agree. I propose to change the process so that it will completely skip any special directories that are mount points (different device ID). That should make it work properly in your case and still allow flexibility.
That would be ideal.


That's a bug. I'll change it to only check disk space when it's actually going to process a file.
Glad you agree. (I've modded my copy of the script to do that, but it's only a couple of simple lines so I imagine won't be of any help to you.)


Over caution I suspect! I'll change that too.

I just allowed for a modest amount of space for any recording going on during the file processing plus the size of the file about to be processed for the decrypt & shrink (the only cases I'm interested in - I don't know about mpg file sizes.)

By the way, I should have said thanks for the script and the rest - definitely makes the box more useful.
 

af123

Administrator
Staff member
Webif 0.12.0-1 has an updated auto script which checks disk space less often - at the start and whenever it is about to actually do something with a recording. I've changed the disk space check to require less space too.

It also skips any special directories that are mount points so that it doesn't recurse into them.
 

andyk

Member
Installed the 0.12.0-1 auto script. The skip for special directories on different mount points works for me. Excellent stuff - thanks for that.
I'm still sticking with my space check that keeps on going (rather than exiting) so it will process any smaller files further down the road (not that this really matters).
On a different matter, I just tried to rename a directory using the webif (browse/opt+/rename/change), and the change didn't stick. Should that go in a separate thread?
 

Brian

Administrator
Staff member
On a different matter, I just tried to rename a directory using the webif (browse/opt+/rename/change), and the change didn't stick. Should that go in a separate thread?
I have just tried this, and can confirm that it does not work for me either. Perhaps af123 can have a look at this, as I'm sure that it used to work.
 

DelftBlue

Member
I have just tried this, and can confirm that it does not work for me either.

Or me.

(as reported in recent "Much Gratitude ... and a few puzzles" thread)

Via Web-IF 'Rename' function new names for directories don't stick.

New/changed media list titles and synopsis sometimes don't stick - after further testing, I think this is something to do with the length of the string - Web-IF will seem to accept the new title/synopsis, but if its longer than Humax will display, the new title or synopsis disappears and it reverts to the original (and its not a simple issue of a fixed number of characters - as the Humax display accounts for the size of the letters i.e. it'll display a title of 43 'thin' letters (like L) but only 30 'fat' letters (like W)
 

4ndy

Forum Supporter
I must start by confessing that much of the preceeding discussion goes straight over my head, so please excuse a possibly stupid question. In order to get decrypt, shrink or some of the other options under Opt. to work on my external harddrives, do I need to install mvdisks or should the Humax's DNLA indexing eventually pick the external drives up?
 

Black Hole

May contain traces of nut
It's only decrypt that requires the DLNA index, and no it won't pick up the external drives unless you mount them under My Video.
 

4ndy

Forum Supporter
It's only decrypt that requires the DLNA index, and no it won't pick up the external drives unless you mount them under My Video.​

If I mount the external drives under My Video, will they appear as such on the Humax GUI or is it just via Web If?
 

Ubtree

Member
Now its possible to flag the top level media directory for a recursive decrypt

I've probably missed something, but how do you opt for recursive decrypt? (I can access options for Auto-Shrink, Auto-Dedup and Auto-Decrypt using the Opt+ button of the My Video file within the WebIF, but I can't find any reference to "recursive".)
 

Attachments

  • Opt+.pdf
    13.5 KB · Views: 5

Ezra Pound

Well-Known Member
The Web-If browser has had built-in options that work recursively on folders for about 6 Weeks, see the screen dump HERE, do you have the latest Web-If version installed? any Web-If version after 0.11.0 will have these options
 

Lefteris

Member
Hi - I used to use Auto-Decrypt and it worked perfectly, but after I upgraded the rs to version 1-0-0 as prompted to do, it no longer works even if the folder is marked as set to do it.

I notice from the auto-log that the DLNA server is now showing status = 0 not 1 as before. I think I've picked up somewhere that the DLNA server is what permits or triggers auto-decrypt, so can anyone indicate what might be wrong here please

Here's a screenshot of the auto-log and the result in the Media View

Ashampoo_Snap_2013.04.04_09h04m46s_002_.jpgAshampoo_Snap_2013.03.27_12h28m04s_001_.jpg

Thanks
 
Top