De-Duplicate / Tidy on Webif breaks decryption

SiHa

Member
First. My apologies if this is the second time you're reading this. I posted about this last night, but I'll be buggered if I can find it today. I searched all my posts and it just isn't there.

Anyway, here goes...

Last night I discovered that if you click on the 'De-Duplicate / Tidy this folder' in the Webif, and then attempt to download a recording, it isn't decrypted as it is sent.
A little experimenting found this: In the .hmt field for the recording there is a field that stores the original filename of the recording. The de-duplicate script does not modify this field, and so the decryption breaks.
If I simply paste in the new filename, say "1_13_Doctor_Who_Spiders_From_Mars" over the original filename, "Doctor_Who_221011_1945" in the .hmt file (padding/deleting spaces as necessary to preserve the structure), it works again.

I'm sure there's a post here somewhere (by Raydon?) with the .hmt file structure, but I can't find it, and haven't got a hex-editor installed at home. So I'm going by the foxsat structure found here http://foxsatdisk.wikispaces.com/.hmt+file+format
It seems to be the block that starts @0x0021

Also whilst experimenting, I discovered that if the programme name generated by de-dup is shorter than the original (@0x0222?) then the remainder of the old programme name is left over:

Original Name Stored @0x0222 "Fifi and the Flowertots"
New Name "Fifi Takes Charge"
New data stored "Fifi Takes Charge rtots"

I'd have a stab at amending the script myself, but my perl/python (or whatever) skills are somewhat limited.

@af123, I assume the de-dup script is yours..?

BTW, If you simply start the file playing on the Hummy after the de-dup run, the .hmt file is regenerated and the file will then decrypt and download as before.
Also, when the decryption breaks, the .ts downloads with the correct filename as opposed to "nnn.ts". Odd.
 
How strange - I know I replied yesterday but I can't find my post either!

The decryption is breaking because the filename on disk no longer matches the filename which is in the DLNA server's index. When the webif can't find the file in the index it defaults to just downloading the raw file (hence the real filename).

I don't know if/how the embedded filename in the HMT is involved - I've never seen anything use it, but I'd expect that if you left some time after the renames then the new files would be discovered and indexed by the DLNA server after which decryption would start working again.

The padding issue is a bug in hmt which I'll fix - the other needs more investigation but it would be possible to dynamically update the DLNA index following a recording rename which would be the best solution.
 
How strange - I know I replied yesterday but I can't find my post either!
Funny, I sent an email to a seller on eBay yesterday which didn't arrive either. It's that Black-Hole lurking around, I reckon.

The decryption is breaking because the filename on disk no longer matches the filename which is in the DLNA server's index. When the webif can't find the file in the index it defaults to just downloading the raw file (hence the real filename)
OK, makes sense.

I don't know if/how the embedded filename in the HMT is involved - I've never seen anything use it, but I'd expect that if you left some time after the renames then the new files would be discovered and indexed by the DLNA server after which decryption would start working again.
I'll take a look the rest of the Doctor Who's tonight, and see if they've started working.

One thing, I did notice though was if I manually changed the embedded filename in the HMT, it would decrypt OK immediately afterwards. No waiting for a DLNA re-scan.
 
First. My apologies if this is the second time you're reading this. I posted about this last night, but I'll be buggered if I can find it today. I searched all my posts and it just isn't there.
It's gone. (Admin? It was a double post)
If you want to backtrack to something you have written, click on your Avatar and select Profile Page. There is an option there to view all your recent postings. Also all your threads. (That is if they are still there!)
 
I accidentally deleted the thread whilst deleting a duplicate post.

Please accept my apologies.:oops:
 
I have found another small bug with de-dup through webif.

When a folder has been dedupped, when viewing files on the box after watching a programme when i hit delete it stays listed until i go off the media list and back on again. any files that havent had the name chaged delete off the list immediately.
 
I have found another small bug with de-dup through webif.

When a folder has been dedupped, when viewing files on the box after watching a programme when i hit delete it stays listed until i go off the media list and back on again. any files that havent had the name chaged delete off the list immediately.
Thanks - I think that's due to the name in the .hmt file too. I'll find some time over the weekend to release a new version which fixes this and the other outstanding issues from this thread.
 
Back
Top