1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. The forum software that supports hummy.tv will be upgraded on Sunday to XenForo 2.0 and so will be unavailable for periods during the day. This is a major upgrade which changes the look and feel of the forum somewhat but brings a host of improvements too. Please bear with us, there will doubtless be further style changes required following this work.

De-Duplicate / Tidy on Webif breaks decryption

Discussion in 'HD/HDR-FOX T2 Customised Firmware' started by SiHa, Oct 24, 2011.

  1. SiHa

    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.
  2. af123

    af123 Administrator Staff Member

    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.
  3. SiHa

    SiHa Member

    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.

    OK, makes sense.

    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.
  4. oijonesey

    oijonesey Hummy.tv SEO Guru

    4291 likes this.
  5. 4291

    4291 Well-Known Member

    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!)
    SiHa likes this.
  6. Brian

    Brian Administrator Staff Member

    I accidentally deleted the thread whilst deleting a duplicate post.

    Please accept my apologies.:oops:
  7. Black Hole

    Black Hole May contain traces of nut

    See? It was the black hole!!

    Car parking duties for you
  8. af123

    af123 Administrator Staff Member

    Surely a PBCAK?
  9. oijonesey

    oijonesey Hummy.tv SEO Guru

    Quite possibly - but either way I'm sure Spock was not impressed
    (Sorry for meandering off topic but I stumbled on this one double checking PBCAK and it appealed to my mindless sense of humour!!)
  10. SiHa

    SiHa Member

    Well, my apologies for sparking the whole thing off with a duplicate post.:confused:
    oijonesey and Peter Galbavy like this.
  11. keytouch

    keytouch Member

    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.
  12. af123

    af123 Administrator Staff Member

    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.