[webif] Web interface

I've been meaning to revisit package management for some time so it's nice to have that part restructured. It should make implementing any further suggestions much easier.

0.9.13 (03/08/2012)

  • When clicking on a recording in the media browser, show the files which are associated with that recording in the popup window. Click the + icon for more details;
  • Package management no longer refreshes the page after upgrading, installing or removing a package;
  • Package management enforces only one package operation at a time;
  • Package management shows 'Info' link against installed packages which shows dependencies;
  • Improvements to the in-browser playback using the VLC plugin;
  • Fix problem with automatic background tasks and folders containing [] in their name;
  • Reduce chance of errors with current recording status panels;
  • Change some more instances of squeeze to shrink.
 
  • Reduce chance of errors with current recording status panels;

This seems wrong a lot of the time for me - even with the new update, it says I'm watching 105 Red Button (which is my overnight choice) rather than BBC1 (which has been on for the last hour).

Update: this morning it claims to be recording Moonraker and playing another file (which ended hours ago and has played another file since), when actually it is idling as a media server and tuned to 105.
 
I think I've hit an "unintended consequence".

I have a radio recording xxx.ts in my [AUDIO] folder. Operating entirely within the WebIF, I perform an Extract Audio operation, so now I have xxx.ts and xxx.mp3. Then I delete the xxx.ts, which gets sent to the [Recycle Bin] leaving just xxx.ts. OK so far.

Now, "xxx" is actually a long string including the recording date and time, so I want to change it to "yyy". I do an OPT+ Rename (still in the WebIF), rename it - and the file vanishes from the [AUDIO] folder. Thank AF for undelete (although it might be the cause), I go to the [Recycle Bin] and find xxx.ts and xxx.mp3 in there.

So I tick xxx.mp3 and click "cut", but nothing happens. Then I try OPT+ "Cut to clipboard", which works. Return to [AUDIO] and paste - and both xxx.mp3 and xxx.ts are back (presumably gathered up because they have the same file name).

Then I thought I would try renaming xxx.mp3 before deleting xxx.ts - but they both renamed to yyy.mp3 and yyy.ts. However, deleting the yyy.ts leaves me where I want to be. Correction - having refreshed the various listings, yyy.ts and yyy.mp3 are in the [Recycle Bin].

In summary, I think there are various operations that are acting on xxx.*, whereas they actually need to operate on xxx.ts, xxx.hmt, xxx.nts, and xxx.thm if and only if the principle file is a .ts.
 
You may be interested in the rec2mp3 utility which I have used for many years to convert radio recordings from my Topfield PVR to mp3 format to put on my mp3 player. The author recently changed it to also work on the .ts files you get from the Humax as well as the *.rec files from the Topfield. Essentially they are the same format with just a different extension.

The rec2mp3 utility comes with a batch file so you can get it convert all the recording in one folder on your computer in one go.

Details available here:-

http://forum.toppy.org.uk/forum/vie...ays=0&postorder=asc&highlight=rec2mp3&start=0
 
I recorded the Proms Beethoven cycle and been busy splitting and renaming the individual symphonies (first time I've really put these facilities to use).

Could the Rename facility be expanded to edit the synopsis field? I notice that even after the file name and media list title are edited, the i-button info panel still has a memory of the old media list title - so perhaps complete control of all the data fields that contribute to the info panel?

PS: According to the i-button, Beethoven's 5th & 6th (at the Proms, as performed by Daniel Baremboim and the West-Eastern Divan Orchestra) contains strong language!
 
In summary, I think there are various operations that are acting on xxx.*, whereas they actually need to operate on xxx.ts, xxx.hmt, xxx.nts, and xxx.thm if and only if the principle file is a .ts.

0.9.13-3 contains a number of fixes for directory and file handling, including this. Looking for all files matching xxx.* was causing half of the square bracket problems anyway so I've removed all of the wildcard matching and created a new central TS file method called 'fileset' which is used by everything that needs to know which files make up the set. I think that will fix all of the residual [] problems; there were quite a few that I haven't seen reported such as it being impossible to put anything on the clipboard from within a [] directory.
 
I had my first problem with the Web-IF last night. It occurred after i had updated it.

I was renaming a recording, just having entered the new file name and clicked the OK button. The complete file (recording) disappeared from the listing! It just vanished, no warning or error message.

I checked all my media folders including the recycle bin on the Hummy, but it has gone! I also checked via the native Hummy menu on the device it's self but, alas not there either.

Has any one got any thoughts as to what might have happened? It's never happened before. Out of curiosity I tried to rename another 'not important' recording and that worked fine.

I am just glad it didn't happen when i renamed the Olympic Opening Ceremony. That would have hurt.


Sent from my iPhone 4s using Tapatalk
 
At a guess, I reckon the recording is still there but with a corrupted file extension so it isn't being listed. Try looking at the actual directory listings using Telnet or FTP or a Windows mount.
 
It's just happened here, although it had the lock icon.

I was trying to shrink a 3.37 GB HD recording. It seemed to go correctly: the original appeared in _original, but no sign of the shrunk version.
The recording name contained a colon. Thinking this might be the problem I moved the original recording back to video then, using rename, removed the colon. Result, no recording. :(
 
The recordings are still there but the rename has resulted in the file extensions being added to the file name, the full stop has been missed out, adding the full stop to all of the associated files restores the recording.
 
In case anybody (guess who) is wondering, (in a Telnet console session) mv moves a file from one place to another, so by cd'ing into the relevant folder (eg cd "/media/My Video") then mv filename1 filename2 you effectively rename the file (the operating system is intelligent enough not to bother actually moving the file data unless it is being sent to a different physical drive partition - all it does is patch up the directory entry). ls -l gives you a listing of what's in the current folder. pwd (print working directory) tells you where you are. Note that UNIX is case-sensitive, so you must type the filename exactly as you see it.

Try it out on an easy filename: use the OPT+ button to rename a scratch recording to something simple, then use it to test mv. Note that UNIX does not assign the same significance to the dot as DOS/Windows, use it just like any other character (but don't use it as the first character of the name!) - except of course you have to use it in the way the Humax software expects to see it, as part of a file type suffix .ts .hmt .nts .thm etc.

If the command you are going to need is too long to type without mistakes, you can build it in Notepad and edit to your heart's content, then copy and paste it into the Telnet session.

My bulk renaming (because I'm not overly adept at unix-speak) is going to be easiest in a Windows mount, where I can use the full power of a batch renamer utility!
 
The TAB key can be used to 'auto-finish' any Telnet line of text if the current line of text is unique, if it isn't the 'auto-finish' will stop and allow you to manually chose an ending, it saves an awful lot of time, try it
 
I have confirmed the problem, and restored the recording by editing the dot back into each file name in the suite using iTelnet (which is a sod to use). I found the busybox mv command won't take ", so any path containing spaces has to be enclosed in quotes ' (you can use the same in cd etc).
 
BH, you were right. When I FTP to the media folder on the Hummy, there were three files pertaining to my recording, all without any extension. They were:
  • From Blackpool to Benidormhmt
  • From Blackpool to Benidormnts
  • From Blackpool to Benidormts
Its is quite obvious what the extensions should be, so I simply renamed them to:
  • From Blackpool to Benidorm.hmt
  • From Blackpool to Benidorm.nts
  • From Blackpool to Benidorm.ts
It now is visible in both the Web-IF and in the native Humax media list. It now plays too!
After I confirmed the above had worked, I used the Web-IF to rename the file again. Yep, you guessed it, the same thing happened. The recording disappeared.
I FTP'd into the Hummy again and renamed them back and I have a playable recording again.
I am loath now to try the Web-IF rename function again for the moment. Whether it was just this recording, I don't know for sure. I did try it on an unimportant file and that was OK, but I don't want to chance it on something precious even though I could probably resurrect it through FileZilla.
I have used the Web-IF rename function many times without any problem, but this is the first time since updating to v0.9.13-3. Not sure if it's related.
Anyone else?
 
It's a bug in 0.9.13-3, sorry. Simple fix which I'll upload when I get home.

Code:
Index: lib/ts.class
===================================================================
--- lib/ts.class        (revision 1249)
+++ lib/ts.class        (working copy)
@@ -204,7 +204,7 @@
        foreach ext $tsgroup {
                set f "$root.$ext"
                if {![file exists $f]} continue
-               file rename $f "${dir}/${to}${ext}"
+              file rename $f "${dir}/${to}.${ext}"
        }

        exec /mod/bin/hmt "+setfilename=$to" "${dir}/${to}.hmt"
 
Back
Top