From 3d0a0deaeb6b86fbd35b16e9cd95661aef86257f Mon Sep 17 00:00:00 2001 From: Paul Sori Date: Wed, 21 Nov 2018 02:43:25 -0500 Subject: [PATCH] fix download file --- public/css/master.css | 1 + public/js/mstream.vue-player-controls.js | 7 ++----- public/mstream.html | 6 ++---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/public/css/master.css b/public/css/master.css index 9c5c4d0..0f4b663 100755 --- a/public/css/master.css +++ b/public/css/master.css @@ -247,6 +247,7 @@ ul.jp-controls li { list-style-type: none !important; } #downform { + display: none; position: absolute; } .controls div { diff --git a/public/js/mstream.vue-player-controls.js b/public/js/mstream.vue-player-controls.js index 4712091..16d5674 100644 --- a/public/js/mstream.vue-player-controls.js +++ b/public/js/mstream.vue-player-controls.js @@ -90,11 +90,8 @@ var VUEPLAYER = (function () { MSTREAMPLAYER.removeSongAtPosition(this.index, false); }, downloadSong: function (event) { - $("#downform2").attr("action", "/media/" + this.song.filepath + "?token=" + MSTREAMAPI.currentServer.token); - //submit form - $('#downform2').submit(); - // clear the form - $('#downform2').empty(); + $("#download-file").attr("href", "/media/" + this.song.filepath + "?token=" + MSTREAMAPI.currentServer.token); + document.getElementById('download-file').click(); }, createPopper: function (event) { if (currentPopperSongIndex === this.index) { diff --git a/public/mstream.html b/public/mstream.html index d8784a6..788c405 100755 --- a/public/mstream.html +++ b/public/mstream.html @@ -139,12 +139,10 @@
- + -
- - +