Skip to content

Commit

Permalink
Fixed bug that when multi-download mode was enabled, videos could not…
Browse files Browse the repository at this point in the history
… be navigated to
  • Loading branch information
Tzahi12345 committed Apr 30, 2020
1 parent 2d66d65 commit d2af233
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/app/main/main.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,9 @@ export class MainComponent implements OnInit {

public goToFile(name, isAudio, uid) {
if (isAudio) {
this.downloadHelperMp3(name, uid, false, false);
this.downloadHelperMp3(name, uid, false, false, null, true);
} else {
this.downloadHelperMp4(name, uid, false, false);
this.downloadHelperMp4(name, uid, false, false, null, true);
}
}

Expand Down Expand Up @@ -473,10 +473,9 @@ export class MainComponent implements OnInit {

// 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;

if (this.multiDownloadMode && !this.downloadOnlyMode) {
if (this.multiDownloadMode && !this.downloadOnlyMode && !navigate_mode) {
// do nothing
} else {
// if download only mode, just download the file. no redirect
Expand Down Expand Up @@ -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;
if (this.multiDownloadMode && !this.downloadOnlyMode) {
if (this.multiDownloadMode && !this.downloadOnlyMode && !navigate_mode) {
// do nothing
} else {
// if download only mode, just download the file. no redirect
Expand Down

0 comments on commit d2af233

Please sign in to comment.