Problem Joining files - option no longer working

David White

New Member
First, thanks to all who have contributed to the Humax Custom firmware and packages, they are absolutely brilliant.

Now my problem. Occasionally I have to join two files (eg when C5 broadcast a film in two parts) and would select them on the browse page and hit join. It would go to a new page and ask for the name of the joined file and then do the deed.

Recently I have encountered a problem. After hitting join, it takes me to a new page with the text: Drag the files below into order, enter a name for the resulting file and then click the Join button.
followed by a blank page. There is no option to select files, nothing. I have restarted the machine but still have the problem.

Any idea what I am doing wrong?

Thanks.
 
It is working for me on Firefox
Are there any messages in webif-error.log that might provide a clue?
Or in the browser console log (hidden under More Tools on the Firefox menu)
 
I can confirm that it works for me with W10 / Edge, although I usually prefer to combine and edit these files with Avidemux.
 
Occasionally I have to join two files (eg when C5 broadcast a film in two parts) and would select them on the browse page and hit join. It would go to a new page and ask for the name of the joined file and then do the deed.

Recently I have encountered a problem. After hitting join, it takes me to a new page with the text: Drag the files below into order, enter a name for the resulting file and then click the Join button.
followed by a blank page. There is no option to select files, nothing. I have restarted the machine but still have the problem.

Any idea what I am doing wrong?
I joined 2 files yesterday using a version of Firefox but it may be a different version to yours. Also other details between what you are you using and what I am using may be different.
If MymsMan suggested lookups (post #4) does not resolve then my details where it is working without issue are:
  • Firefox 95.0.2
  • A Windows 10 environment
  • Web interface version: 1.4.9
  • Custom firmware version: 3.13 (build 4028)
  • Humax Version: 1.03.12 (kernel HDR_CFW_3.13)
  • Ad blocker on PC but not active for the Humax IPAddress
  • The files I joined did not have any special characters in their names
 
Last edited:
Hmm - just tried it on my other Humax (2) and it works fine. Must presume it is something within Humax 1 as they are set up exactly the same.
 
Worked out what it is in my set up. I was joining two parts of a film and the title had an ampersand in the title. Changed it to 'and' and all okay.
 
Worked out what it is in my set up. I was joining two parts of a film and the title had an ampersand in the title. Changed it to 'and' and all okay.
Special characters frequently bork things, it just depends whether that particular instance has been spotted and patched.

After hitting join, it takes me to a new page with the text: Drag the files below into order, enter a name for the resulting file and then click the Join button.
followed by a blank page. There is no option to select files, nothing. I have restarted the machine but still have the problem.
Could it be that previously it has worked for StDef and this is an example in HiDef? Or is this happening before files are even selected?
 
Wow, what a fantastic response. I am using Mac OS Mojave and Safari with Custom firmware version: 3.03 (build 2368) but got the same problem with Firefox. I usually use join for HD files but they were SD in this case.

However, the files I wanted to join had two "&"'s in the file name. I tried changing the "&" to a "+" and got the same problem. The fix was to change & to "and". With that modification everything was working as before.

Many thanks for all your suggestions and to Black Hole for the tip on special characters that seems to have been the problem in this case.
 
Many thanks for all your suggestions and to Black Hole for the tip on special characters that seems to have been the problem in this case.
Yes many thanks to Black Hole for being the third poster to bring up special characters. :D
Third time lucky. :D
 
I was thinking similar! Sometimes it's how you express it. Plenty of my stuff which should, doesn't get "liked", so I'll take it.

To explain in more detail: there is a mixture of scripting languages under the bonnet, passing parameters such as file names from process to process. Thus there are differing expectations as to what constitutes a string – what the delimiters should be, whether and how special characters should be escaped... and particularly what gets stripped from the string before it gets passed on (sometimes requiring double-escaping or delimiting).

It's a dog's breakfast, and getting it right requires considerable analysis (or experimentation)... and if the author doesn't think of some combination to proof against which then happens to come along, it fails (ditto the Humax networking stack!).
 
Not a fix, merely a workaround, but I always schedule a manual recording for split programmes (like films) so you only get one recording. This is also advantageous when playing the files on other devices as you don't get a jump in the timestamp at the join which can cause problems with some players.
 
...
However, the files I wanted to join had two "&"'s in the file name. I tried changing the "&" to a "+" and got the same problem. The fix was to change & to "and". With that modification everything was working as before.
...
This is a defect in the WebIf code.

Typically, an error like this comes about through failing to encode a filename when it is passed as a URL parameter. Quite a few such issues have already been fixed, so let's hope this is the last one. In this case, the problem is around l.1041 of webif/html/browse/script.js:
Code:
 $('#join').button({icons: {primary: "ui-icon-video"}})                  
     .click(function() {                                                 
         var files = new Array();                                      
         var els = $('input.fsts:checked + a').each(function() {        
-                files.push($(this).attr('file'));  
+                files.push(encodeURIComponent($(this).attr('file')));  
         });                                                           
         //console.log("%o", files);                                  
         window.location.href = '/browse/join/join.jim?files=' +      
             files.join();                                             
     });
 
Anyone wishing to apply the above fix (and previous similar fixes) without manual editing can download an updated WebIF as follows:

You can install as follows from the command prompt (or Webshell etc.):
Code:
humax# cd /tmp
humax# wget https://dl.dropbox.com/s/w3oz4dmw7y0wnlr/webif_1.4.9-6d_mipsel.opk
humax# opkg install webif_1.4.9-6d_mipsel.opk

This is, unfortunately and regrettably, necessary because the normal process of development and roll-out as firmware updates has become unavailable and inaccessible. Thanks to /df, prpr, et al for continuing development, and prpr for making patches available to download.
 
Back
Top