Fixed bug that when multi-download mode was enabled, videos could not be navigated to

This commit is contained in:
Tzahi12345
2020-04-29 23:09:00 -04:00
parent 2d66d653f6
commit d2af233a1f

View File

@@ -402,9 +402,9 @@ export class MainComponent implements OnInit {
public goToFile(name, isAudio, uid) { public goToFile(name, isAudio, uid) {
if (isAudio) { if (isAudio) {
this.downloadHelperMp3(name, uid, false, false); this.downloadHelperMp3(name, uid, false, false, null, true);
} else { } else {
this.downloadHelperMp4(name, uid, false, false); this.downloadHelperMp4(name, uid, false, false, null, true);
} }
} }
@@ -473,10 +473,9 @@ export class MainComponent implements OnInit {
// download helpers // download helpers
downloadHelperMp3(name, uid, is_playlist = false, forceView = false, new_download = null) { downloadHelperMp3(name, uid, is_playlist = false, forceView = false, new_download = null, navigate_mode = false) {
this.downloadingfile = false; this.downloadingfile = false;
if (this.multiDownloadMode && !this.downloadOnlyMode && !navigate_mode) {
if (this.multiDownloadMode && !this.downloadOnlyMode) {
// do nothing // do nothing
} else { } else {
// if download only mode, just download the file. no redirect // if download only mode, just download the file. no redirect
@@ -511,9 +510,9 @@ export class MainComponent implements OnInit {
} }
} }
downloadHelperMp4(name, uid, is_playlist = false, forceView = false, new_download = null) { downloadHelperMp4(name, uid, is_playlist = false, forceView = false, new_download = null, navigate_mode = false) {
this.downloadingfile = false; this.downloadingfile = false;
if (this.multiDownloadMode && !this.downloadOnlyMode) { if (this.multiDownloadMode && !this.downloadOnlyMode && !navigate_mode) {
// do nothing // do nothing
} else { } else {
// if download only mode, just download the file. no redirect // if download only mode, just download the file. no redirect