mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-22 12:40:56 +03:00
Enabled strict template mode in Angular
Code cleanup
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
<mat-chip-grid class="example-chip" #chipList aria-label="Args array" cdkDropList cdkDropListDisabled
|
||||
cdkDropListOrientation="horizontal"
|
||||
(cdkDropListDropped)="drop($event)">
|
||||
<mat-chip-row [matTooltip]="argsByKey[arg] ? argsByKey[arg]['description'] : null" *ngFor="let arg of args_array; let i = index;" [selectable]="selectable" [removable]="removable" (removed)="remove(i)" cdkDrag>
|
||||
<mat-chip-row [matTooltip]="argsByKey[arg] ? argsByKey[arg]['description'] : null" *ngFor="let arg of args_array; let i = index;" [removable]="removable" (removed)="remove(i)" cdkDrag>
|
||||
{{arg}}
|
||||
<mat-icon matChipRemove *ngIf="removable">cancel</mat-icon>
|
||||
</mat-chip-row>
|
||||
|
||||
@@ -3,7 +3,7 @@ import { COMMA, ENTER } from '@angular/cdk/keycodes';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef, MatDialog } from '@angular/material/dialog';
|
||||
import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';
|
||||
import { UntypedFormControl } from '@angular/forms';
|
||||
import { args, args_info } from './youtubedl_args';
|
||||
import { args, ArgsByCategory, args_info } from './youtubedl_args';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators/map';
|
||||
import { startWith } from 'rxjs/operators/startWith';
|
||||
@@ -38,7 +38,7 @@ export class ArgModifierDialogComponent implements OnInit, AfterViewInit {
|
||||
stateCtrl = new UntypedFormControl();
|
||||
chipCtrl = new UntypedFormControl();
|
||||
availableArgs = null;
|
||||
argsByCategory = null;
|
||||
argsByCategory: ArgsByCategory = null;
|
||||
argsByKey = null;
|
||||
argsInfo = null;
|
||||
filteredOptions: Observable<any>;
|
||||
|
||||
@@ -72,7 +72,7 @@ const download = [
|
||||
{'key': '--hls-prefer-ffmpeg', 'description': 'Use ffmpeg instead of the native HLS downloader'},
|
||||
{'key': '--hls-use-mpegts', 'description': 'Use the mpegts container for HLS videos, allowing to play the video while downloading (some players may not be able to play it)'},
|
||||
{'key': '--external-downloader', 'description': 'Use the specified external downloader. Currently supports aria2c,avconv,axel,curl,ffmpeg,httpie,wget'},
|
||||
{'key': '--external-downloader-args'}
|
||||
{'key': '--external-downloader-args', 'description': 'Give these arguments to the external downloader'}
|
||||
];
|
||||
|
||||
const filesystem = [
|
||||
@@ -195,7 +195,7 @@ const post_processing = [
|
||||
{'key': '--convert-subs', 'description': 'Convert the subtitles to other format (currently supported: srt|ass|vtt|lrc)'}
|
||||
];
|
||||
|
||||
export const args_info = {
|
||||
export const args_info: ArgsInfo = {
|
||||
'uncategorized' : {'label': 'Main'},
|
||||
'network' : {'label': 'Network'},
|
||||
'geo_restriction': {'label': 'Geo Restriction'},
|
||||
@@ -212,7 +212,7 @@ export const args_info = {
|
||||
'post_processing': {'label': 'Post Processing'},
|
||||
};
|
||||
|
||||
export const args = {
|
||||
export const args: ArgsByCategory = {
|
||||
'uncategorized' : uncategorized,
|
||||
'network' : network,
|
||||
'geo_restriction': geo_restriction,
|
||||
@@ -228,3 +228,8 @@ export const args = {
|
||||
'adobe_pass' : adobe_pass,
|
||||
'post_processing': post_processing
|
||||
}
|
||||
|
||||
export type ArgInfo = {label: string}
|
||||
export type ArgsInfo = {[key: string]: ArgInfo}
|
||||
export type Arg = {key: string, description: string};
|
||||
export type ArgsByCategory = {[key: string]: Arg[]};
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
N/A
|
||||
</mat-option>
|
||||
<mat-option *ngFor="let available_category of postsService.categories | keyvalue" [value]="available_category.value">
|
||||
{{available_category.value.name}}
|
||||
{{available_category.value['name']}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
Reference in New Issue
Block a user