mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-03 12:21:29 +03:00
Merge branch 'master' of https://github.com/Tzahi12345/YoutubeDL-Material into homepage-redesign
This commit is contained in:
@@ -82,6 +82,7 @@ export class PostsService implements CanActivate {
|
||||
if (result) {
|
||||
this.config = result['YoutubeDLMaterial'];
|
||||
if (this.config['Advanced']['multi_user_mode']) {
|
||||
this.checkAdminCreationStatus();
|
||||
// login stuff
|
||||
if (localStorage.getItem('jwt_token') && localStorage.getItem('jwt_token') !== 'null') {
|
||||
this.token = localStorage.getItem('jwt_token');
|
||||
@@ -173,12 +174,8 @@ export class PostsService implements CanActivate {
|
||||
ui_uid: ui_uid}, this.httpOptions);
|
||||
}
|
||||
|
||||
getFileStatusMp3(name: string) {
|
||||
return this.http.post(this.path + 'fileStatusMp3', {name: name}, this.httpOptions);
|
||||
}
|
||||
|
||||
getFileStatusMp4(name: string) {
|
||||
return this.http.post(this.path + 'fileStatusMp4', {name: name}, this.httpOptions);
|
||||
killAllDownloads() {
|
||||
return this.http.post(this.path + 'killAllDownloads', {}, this.httpOptions);
|
||||
}
|
||||
|
||||
loadNavItems() {
|
||||
@@ -299,6 +296,10 @@ export class PostsService implements CanActivate {
|
||||
audioOnly: audioOnly, customArgs: customArgs, customFileOutput: customFileOutput}, this.httpOptions);
|
||||
}
|
||||
|
||||
updateSubscription(subscription) {
|
||||
return this.http.post(this.path + 'updateSubscription', {subscription: subscription}, this.httpOptions);
|
||||
}
|
||||
|
||||
unsubscribe(sub, deleteMode = false) {
|
||||
return this.http.post(this.path + 'unsubscribe', {sub: sub, deleteMode: deleteMode}, this.httpOptions)
|
||||
}
|
||||
@@ -421,7 +422,6 @@ export class PostsService implements CanActivate {
|
||||
}
|
||||
|
||||
sendToLogin() {
|
||||
this.checkAdminCreationStatus();
|
||||
if (!this.initialized) {
|
||||
this.setInitialized();
|
||||
}
|
||||
@@ -451,8 +451,8 @@ export class PostsService implements CanActivate {
|
||||
password: password}, this.httpOptions);
|
||||
}
|
||||
|
||||
checkAdminCreationStatus(skip_check = false) {
|
||||
if (!skip_check && !this.config['Advanced']['multi_user_mode']) {
|
||||
checkAdminCreationStatus(force_show = false) {
|
||||
if (!force_show && !this.config['Advanced']['multi_user_mode']) {
|
||||
return;
|
||||
}
|
||||
this.adminExists().subscribe(res => {
|
||||
|
||||
Reference in New Issue
Block a user