Converted allow_autoplay to force_autoplay as per #695

pull/809/head
Tzahi12345 3 years ago
parent 61973510f7
commit c10b062832

@ -196,7 +196,7 @@ const DEFAULT_CONFIG = {
"file_manager_enabled": true, "file_manager_enabled": true,
"allow_quality_select": true, "allow_quality_select": true,
"download_only_mode": false, "download_only_mode": false,
"allow_autoplay": true, "force_autoplay": false,
"enable_downloads_manager": true, "enable_downloads_manager": true,
"allow_playlist_categorization": true, "allow_playlist_categorization": true,
"enable_notifications": true, "enable_notifications": true,

@ -68,9 +68,9 @@ exports.CONFIG_ITEMS = {
'key': 'ytdl_download_only_mode', 'key': 'ytdl_download_only_mode',
'path': 'YoutubeDLMaterial.Extra.download_only_mode' 'path': 'YoutubeDLMaterial.Extra.download_only_mode'
}, },
'ytdl_allow_autoplay': { 'ytdl_force_autoplay': {
'key': 'ytdl_allow_autoplay', 'key': 'ytdl_force_autoplay',
'path': 'YoutubeDLMaterial.Extra.allow_autoplay' 'path': 'YoutubeDLMaterial.Extra.force_autoplay'
}, },
'ytdl_enable_downloads_manager': { 'ytdl_enable_downloads_manager': {
'key': 'ytdl_enable_downloads_manager', 'key': 'ytdl_enable_downloads_manager',

@ -72,7 +72,7 @@
Only Audio Only Audio
</ng-container> </ng-container>
</mat-checkbox> </mat-checkbox>
<mat-checkbox *ngIf="allowAutoplay" [disabled]="getURLArray(url).length > 1" (change)="autoplayChanged($event)" [(ngModel)]="autoplay" style="float: right; margin-top: -12px"> <mat-checkbox *ngIf="!forceAutoplay" [disabled]="getURLArray(url).length > 1" (change)="autoplayChanged($event)" [(ngModel)]="autoplay" style="float: right; margin-top: -12px">
<ng-container i18n="Autoplay checkbox"> <ng-container i18n="Autoplay checkbox">
Autoplay Autoplay
</ng-container> </ng-container>

@ -49,7 +49,7 @@ export class MainComponent implements OnInit {
fileManagerEnabled = false; fileManagerEnabled = false;
allowQualitySelect = false; allowQualitySelect = false;
downloadOnlyMode = false; downloadOnlyMode = false;
allowAutoplay = false; forceAutoplay = false;
use_youtubedl_archive = false; use_youtubedl_archive = false;
globalCustomArgs = null; globalCustomArgs = null;
allowAdvancedDownload = false; allowAdvancedDownload = false;
@ -187,7 +187,7 @@ export class MainComponent implements OnInit {
this.fileManagerEnabled = this.postsService.config['Extra']['file_manager_enabled'] this.fileManagerEnabled = this.postsService.config['Extra']['file_manager_enabled']
&& this.postsService.hasPermission('filemanager'); && this.postsService.hasPermission('filemanager');
this.downloadOnlyMode = this.postsService.config['Extra']['download_only_mode']; this.downloadOnlyMode = this.postsService.config['Extra']['download_only_mode'];
this.allowAutoplay = this.postsService.config['Extra']['allow_autoplay']; this.forceAutoplay = this.postsService.config['Extra']['force_autoplay'];
this.use_youtubedl_archive = this.postsService.config['Downloader']['use_youtubedl_archive']; this.use_youtubedl_archive = this.postsService.config['Downloader']['use_youtubedl_archive'];
this.globalCustomArgs = this.postsService.config['Downloader']['custom_args']; this.globalCustomArgs = this.postsService.config['Downloader']['custom_args'];
this.youtubeSearchEnabled = this.postsService.config['API'] && this.postsService.config['API']['use_youtube_API'] && this.youtubeSearchEnabled = this.postsService.config['API'] && this.postsService.config['API']['use_youtube_API'] &&
@ -268,7 +268,8 @@ export class MainComponent implements OnInit {
this.audioOnly = localStorage.getItem('audioOnly') === 'true'; this.audioOnly = localStorage.getItem('audioOnly') === 'true';
} }
if (localStorage.getItem('autoplay') !== null) { this.autoplay = this.forceAutoplay;
if (!this.forceAutoplay && localStorage.getItem('autoplay') !== null) {
this.autoplay = localStorage.getItem('autoplay') === 'true'; this.autoplay = localStorage.getItem('autoplay') === 'true';
} }

@ -232,7 +232,7 @@
<mat-checkbox color="accent" [(ngModel)]="new_config['Extra']['download_only_mode']"><ng-container i18n="Download only mode setting">Download only mode</ng-container></mat-checkbox> <mat-checkbox color="accent" [(ngModel)]="new_config['Extra']['download_only_mode']"><ng-container i18n="Download only mode setting">Download only mode</ng-container></mat-checkbox>
</div> </div>
<div class="col-12 mb-2"> <div class="col-12 mb-2">
<mat-checkbox color="accent" [(ngModel)]="new_config['Extra']['allow_autoplay']"><ng-container i18n="Allow autoplay setting">Allow autoplay</ng-container></mat-checkbox> <mat-checkbox color="accent" [(ngModel)]="new_config['Extra']['force_autoplay']"><ng-container i18n="Force autoplay setting">Force autoplay</ng-container></mat-checkbox>
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save