Fixed bug were downloadOnlyMode failed to work when multiDownloadMode was enabled

pull/45/head
Isaac Grynsztein 5 years ago
parent 66cb0af762
commit b993c8e1d6

@ -466,9 +466,9 @@ export class MainComponent implements OnInit {
downloadHelperMp3(name, is_playlist = false, forceView = false, new_download = null) { downloadHelperMp3(name, is_playlist = false, forceView = false, new_download = null) {
this.downloadingfile = false; this.downloadingfile = false;
if (new_download && this.current_download !== new_download) { if (this.multiDownloadMode && !this.downloadOnlyMode) {
// console.log('mismatched downloads'); // console.log('mismatched downloads');
} else if (!this.multiDownloadMode || !new_download) { } else {
// if download only mode, just download the file. no redirect // if download only mode, just download the file. no redirect
if (forceView === false && this.downloadOnlyMode && !this.iOS) { if (forceView === false && this.downloadOnlyMode && !this.iOS) {
if (is_playlist) { if (is_playlist) {
@ -503,10 +503,9 @@ export class MainComponent implements OnInit {
downloadHelperMp4(name, is_playlist = false, forceView = false, new_download = null) { downloadHelperMp4(name, is_playlist = false, forceView = false, new_download = null) {
this.downloadingfile = false; this.downloadingfile = false;
if (this.multiDownloadMode && !this.downloadOnlyMode) {
if (new_download && this.current_download !== new_download) {
// console.log('mismatched downloads'); // console.log('mismatched downloads');
} else if (!this.multiDownloadMode || !new_download) { } else {
// if download only mode, just download the file. no redirect // if download only mode, just download the file. no redirect
if (forceView === false && this.downloadOnlyMode) { if (forceView === false && this.downloadOnlyMode) {
if (is_playlist) { if (is_playlist) {

Loading…
Cancel
Save