• The forum software that supports hummy.tv has been upgraded to XenForo 2.3!

    Please bear with us as we continue to tweak things, and feel free to post any questions, issues or suggestions in the upgrade thread.

[webif] Problem with deleting recording

MymsMan

Ad detector
Minor problem deleting a downloaded .mp4 file using the multi-select delete option, likely to be caused by % in name
Also affects Copy and Cut
1734735803489.png
Deleting via webif opt+ menu works hence not a major problem
 
Last edited:
Try this:
Code:
diff --git a/webif/html/browse/script.js b/webif/html/browse/script.js
index 4dcb613..903e6f0 100755
--- a/webif/html/browse/script.js
+++ b/webif/html/browse/script.js
@@ -1060,7 +1060,7 @@ $('#delete').button({icons: {primary: "ui-icon-trash"}})
     .click(function() {
      var files = new Array();
      var els = $('input.fs:checked + a').each(function() {
-             files.push(decodeURIComponent($(this).attr('file')));
+             files.push($(this).attr('file'));
      });
      //console.log("%o", files);
      var str = 'Are you sure you want to delete ' + files.length +
@@ -1100,7 +1100,7 @@ $('#copy,#cut')
     .click(function() {
      var files = new Array();
      var els = $('input.fs:checked + a').each(function() {
-             files.push(decodeURIComponent($(this).attr('file')));
+             files.push($(this).attr('file'));
      });
      //console.log("%o", files);
      var action = $(this).attr('id');
@@ -1165,7 +1165,7 @@ $('#so_queue').button()
     .click(function() {
      var files = new Array();
      var els = $('input.fs:checked + a').each(function() {
-             files.push(decodeURIComponent($(this).attr('file')));
+             files.push($(this).attr('file'));
      });

      disableall();
Works for me now.
 
Last edited:
I realise this is second guessing, but if the decodeURIComponent wrapper isn't needed why was it ever there? What I'm getting at is that it might be the cause of this particular problem, but might not taking it out have a knock-on effect?
 
I don't know why. The names seem not to be stored coded, so it is incorrect to attempt to decode them. Perhaps things were done differently in the past (there are several files to check at various points in the history and it's too hard/time-consuming to work it out) and this just got forgotten.

I've just found another lack-of-coding bug when playing non-native files (e.g. .mp3) from the browser.

Coding and decoding the same number of times using the same method is key to all this. Remember those images of & stuff I posted in the Arms for example.
 
Back
Top