1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Undelete / dustbin...

Discussion in 'HD/HDR-FOX T2 Customised Firmware' started by af123, Jan 8, 2012.

Thread Status:
Not open for further replies.
  1. af123

    af123 Administrator Staff Member

    I have a working undelete / dustbin system for the HDR : )
    Needs some more work to ensure that the system can be easily recovered if anything goes wrong with it, but it's working nicely for me.. Anyone interested in beta testing it later in the week?
  2. Brian

    Brian Administrator Staff Member

    Could you explain this in a bit more detail please? Is it anything like the "Recycle Bin" feature in the "MyStuff" tap for Topfield pvr's, where a deleted programme is removed from the archive list and placed in the recycle bin folder, which can be set to empty it's contents after a certain time has elapsed, or can be emptied manually, or it allows individual programmes to be "undeleted" and restored to their previous location. I would be interested in testing this feature if it was anything like I have just described.:)
  3. af123

    af123 Administrator Staff Member

    Yes, it's along those lines. Anything deleted goes into a holding area and is really deleted after X days (or can be manually deleted). Recovery is just copying/moving the file back out of the bin. I've got this working with things deleted by/via the Humax software, extending the web interface to do the same thing is the easy part that I haven't yet done.
  4. Brian

    Brian Administrator Staff Member

    Yes that sounds good, you can count me in for the testing then.:)
  5. ChrisDaniels

    ChrisDaniels Well-Known Member

    I would be interested in this too :)
  6. af123

    af123 Administrator Staff Member

    This seems fairly stable for me so I'll give a public beta a go, however please note:

    This is a test/beta package which modifies the operating environment in order to trap and divert media deletions.
    (As usual,) use of this software is at your sole risk.

    This beta is for the HDR-Fox T2 only. If there is enough interest then, following the trial, I will add support for the HD-Fox T2.

    Anything you delete will be moved into the _dustbin folder at the top level of the media tree and automatically removed from there after 7 days (that time period is configurable through the Settings screen in the web interface). You can also manually remove things from the dustbin at any time, or move them out to somewhere else to recover.

    First, update your firmware to the version at http://www.4shared.com/file/TApYkK-Y/HDR_FOX_T2_10220_mod_116_upgra.html
    This is the same as customised firmware 1.15 with the addition of hooks which allow the undelete extension to automatically disable itself if the main Humax software crashes. The extension will run fine on firmware 1.15 but the upgrade offers some insurance during the beta period. If you choose to run under firmware 1.15 then if anything goes wrong you will probably need to load version 1.16 to recover.

    Install the undelete package directly from the test repository:
    humax# opkg update
    humax# diag install_dustbin
    Enable debug logging (recommended for the beta):
    humax# touch /var/lib/humaxtv/mod/debugtv
    humax# touch /var/lib/humaxtv/mod/dustbindebug
    Restart the box (via remote control is fine) to activate.

    Diagnostic output will appear in /var/log/humaxtv.log, e.g.
    unlink(/mnt/hd2/My Video/Weatherview/Weatherview_20120101_0218.ts)
    subdirectory, '/mnt/hd2/My Video/_dustbin/Weatherview/'
    dustbin_mkdir_p(/mnt/hd2/My Video/_dustbin/Weatherview/)
    dustbin_mkdir_p(/mnt/hd2/My Video/_dustbin/Weatherview)
    dustbin_mkdir_p(/mnt/hd2/My Video/_dustbin)
      created '/mnt/hd2/My Video/_dustbin' (directly).
      created '/mnt/hd2/My Video/_dustbin/Weatherview'.
    /mnt/hd2/My Video/Weatherview/Weatherview_20120101_0218.ts
        -> /mnt/hd2/My Video/_dustbin/Weatherview/Weatherview_20120101_0218.ts
    Let me know how you get on!
  7. Black Hole

    Black Hole Ron Glum

    I like the sound of this, but I'm going to chicken out and let a few others take the lead.
  8. Brian

    Brian Administrator Staff Member

    I have just installed this on one of my HDR's, I updated to cf 1.16 ok, then tried to install "undelete" which produced the following error
    humax2# opkg install http://hummypkg.org.uk/hdrfoxt2/test/undelete_0.1_mipsel.opk
    Downloading http://hummypkg.org.uk/hdrfoxt2/test/undelete_0.1_mipsel.opk.
    Installing undelete (0.1) to root...
    Collected errors:
    * satisfy_dependencies_for: Cannot satisfy the following dependencies for undelete:
    * webif (>= 0.8.11-1) *
    * opkg_install_cmd: Cannot install package undelete.
    I got round this by updating "webif" to 0.8.11-1, then "undelete" installed ok.

    I enabled debug logging, and restarted the box, then looked for my dustbin folder but could not see one. Does this only get created when you delete a programme file?

    I tried a couple of 10 min recordings, then deleted them, No dustbin folder to be seen.

    Here is part of the "humaxtv.log"
    unlink(/mnt/hd2/My Video/Frozen Planet_20120111_0155.ts) /mnt/hd2/My Video/Frozen Planet_20120111_0155.ts -> /mnt/hd2/My Video/_dustbin/The Zone_ QVC_20120111_0135.tsFrozen Planet_20120111_0155.ts (rename failed, 2) /mnt/hd2/My Video/Frozen Planet_20120111_0155.ts -> /mnt/hd2/My Video/_dustbin/Frozen Planet_20120111_0155.ts (rename failed, 2) unlink(/mnt/hd2/My Video/Frozen Planet_20120111_0155.nts) /mnt/hd2/My Video/Frozen Planet_20120111_0155.nts -> Frozen Planet_20120111_0155.nts (rename failed, 18) /mnt/hd2/My Video/Frozen Planet_20120111_0155.nts -> /mnt/hd2/My Video/_dustbin/Frozen Planet_20120111_0155.nts (rename failed, 2) unlink(/mnt/hd2/My Video/Frozen Planet_20120111_0155.hmt) /mnt/hd2/My Video/Frozen Planet_20120111_0155.hmt -> /mnt/hd2/My Video/_dustbin/Frozen Planet_20120111_0155.ntsFrozen Planet_20120111_0155.hmt (rename failed, 2) /mnt/hd2/My Video/Frozen Planet_20120111_0155.hmt -> /mnt/hd2/My Video/_dustbin/Frozen Planet_20120111_0155.hmt (rename failed, 2) Error>> Cannot support video format [DI_MEDIA_Probe] Error - Fail in P_MEDIA_ProbeOpen scanThread END---------------- thread detach 1070048464 
    Does this make any sense to you?

    P.S. will this cause any problems running alongside flatten?
  9. af123

    af123 Administrator Staff Member

    Yes, I should have put opkg update in the instructions (will edit it in now, thanks)

    It's a bug! It's because the first file you deleted was at the top level, and not in a folder. I had tested with recordings at the top level but not as the first one I deleted - most of my testing was with Weatherview recordings : )

    Create a folder, move a test recording into it and then delete the recording. The dustbin folder should appear then it should work fine from then on.

    I'll fix this tonight and update the package.

    No, that should be fine.
  10. Brian

    Brian Administrator Staff Member

    I'll put a recording in a folder then delete it and see if it works, and will report back soon. Will the dustbin folder need to be made" NoFlatten" to stop it from being deleted?
  11. af123

    af123 Administrator Staff Member

    Very good point - yes, otherwise everything will just float back to the top!
  12. Brian

    Brian Administrator Staff Member

    I created a "Test" folder and put my ready to delete "Hollyoaks" recording in it, then deleted it. This created the "_dustbin" folder which I decided to make "NoFlatten". I then deleted an "Emmerdale" recording, and now when I look inside the "_dustbin" I see,
    [​IMG] [parent directory]
    [​IMG] Test (162.9MiB) [​IMG]
    [​IMG] Emmerdale_20120109_1902.ntsEmmerdale_20120109_1902.thmEmmerdale_20120109_1902.hmt (13.56 KiB) [​IMG]

    the Test folder contains the following,
    [​IMG] [parent directory]
    [​IMG] Hollyoaks_20120109_1831.ts (80.00 MiB) [​IMG] [​IMG]
    [​IMG] Hollyoaks_20120109_1831.tsEmmerdale_20120109_1902.ts (80.00 MiB) [​IMG]
    does this look ok to you?
  13. af123

    af123 Administrator Staff Member

    No... but it could be forum formatting.

    Can you post the output of the dustbin diag using code tags to preserve the formatting?
  14. Brian

    Brian Administrator Staff Member

    Is this what you mean?
    >>> Beginning diagnostic dustbin diag Running: dustbin -rw-r--r-- 1 root root 3430016 Jan 9 19:33 Emmerdale_20120109_1902.nts -rw-r--r-- 1 root root 43680 Jan 9 21:30 Emmerdale_20120109_1902.ntsEmmerdale_20120109_1902.thm -rw-r--r-- 1 root root 13888 Jan 11 09:43 Emmerdale_20120109_1902.ntsEmmerdale_20120109_1902.thmEmmerdale_20120109_1902.hmt drwxr-xr-x 2 root root 4096 Jan 11 09:43 Test -rw-r--r-- 1 root root 13888 Jan 11 09:43 /mnt/hd2/My Video/_dustbin/Emmerdale_20120109_1902.ntsEmmerdale_20120109_1902.thmEmmerdale_20120109_1902.hmt -rw-r--r-- 1 root root 3430016 Jan 9 19:33 /mnt/hd2/My Video/_dustbin/Emmerdale_20120109_1902.nts -rw-r--r-- 1 root root 13888 Jan 11 09:11 Hollyoaks_20120109_1831.hmt -rw-r--r-- 1 root root 2848960 Jan 9 19:00 Hollyoaks_20120109_1831.nts -rw-r--r-- 1 root root 43680 Jan 9 21:30 Hollyoaks_20120109_1831.thm -rw-r--r-- 1 root root 83886080 Jan 11 09:13 Hollyoaks_20120109_1831.ts -rw-r--r-- 1 root root 83886080 Jan 11 09:43 Hollyoaks_20120109_1831.tsEmmerdale_20120109_1902.ts -rw-r--r-- 1 root root 13888 Jan 11 09:11 /mnt/hd2/My Video/_dustbin/Test/Hollyoaks_20120109_1831.hmt -rw-r--r-- 1 root root 83886080 Jan 11 09:13 /mnt/hd2/My Video/_dustbin/Test/Hollyoaks_20120109_1831.ts -rw-r--r-- 1 root root 83886080 Jan 11 09:43 /mnt/hd2/My Video/_dustbin/Test/Hollyoaks_20120109_1831.tsEmmerdale_20120109_1902.ts -rw-r--r-- 1 root root 43680 Jan 9 21:30 /mnt/hd2/My Video/_dustbin/Test/Hollyoaks_20120109_1831.thm -rw-r--r-- 1 root root 2848960 Jan 9 19:00 /mnt/hd2/My Video/_dustbin/Test/Hollyoaks_20120109_1831.nts -rw-rw-rw- 1 root root 0 Jan 11 09:14 /mnt/hd2/My Video/_dustbin/.noflatten -rw-r--r-- 1 root root 43680 Jan 9 21:30 /mnt/hd2/My Video/_dustbin/Emmerdale_20120109_1902.ntsEmmerdale_20120109_1902.thm >>> Ending diagnostic dustbin diag
  15. Brian

    Brian Administrator Staff Member

    Something doesn't look quite right here, I now have 4 off 30 min HD recordings in my dustbin, and when viewed via webif "Browse Media Files", is only indicating 332.9MiB contents instead of around 5.0GiB.
  16. af123

    af123 Administrator Staff Member

    Definitely not right. I'll do some testing tonight and try and replicate. I probably haven't deleted enough recordings from the top level in my testing.
  17. Brian

    Brian Administrator Staff Member

  18. oijonesey

    oijonesey Hummy.tv SEO Guru

    Not sure if I really need this or not but I might give it a shot - but just one question. Does the underscore put the dustbin at the top of the list in the Media screen? Could we have something to put it at the bottom instead? (This was why I got rid of Nicesplice magic folders and just used the webif). After all I'm not exepcting to use this all the time - just the odd occasion where I get the delete wrong? Also IIRC you can press Up at the top of a list to jump to the bottom so still easy to get to the bin on the (hopefully) odd occasion that you need it.
  19. Brian

    Brian Administrator Staff Member

    On my box, the "_dustbin" folder is at the bottom of my folder list.
    oijonesey likes this.
  20. af123

    af123 Administrator Staff Member

    Yes, that's why I use the underscore.
Thread Status:
Not open for further replies.