This commit is contained in:
Flo 2024-08-05 10:25:56 +00:00
parent 450be793d0
commit 42ec2d22c8
2 changed files with 20 additions and 2 deletions

View File

@ -11,6 +11,15 @@
(change)="readList()"
[(ngModel)]="onlyTagless"
/>
<div class="basis-auto">
<button (click)="analyze()">
<div
class="block px-3 py-1.5 rounded rounded-lg bg-zinc-700 hover:bg-zinc-900 font-bold text-black dark:text-white"
>
Analyze
</div>
</button>
</div>
</div>
<shared-table [items]="videos" [columns]="videoListColumns" />

View File

@ -12,7 +12,7 @@ import { ColumnDefinition } from 'src/app/shared/components/table/table.componen
export class ListComponent {
query$ = new Subject<string>();
query: string = '';
onlyTagless: boolean = false;
onlyTagless: boolean = true;
videos: VideoListEntry[] = [];
total: number = 0;
page: number = 1;
@ -57,9 +57,18 @@ export class ListComponent {
this.readList();
}
analyze(): void {
this.requestService.post('analyze/analyze-videos', {}, (response: any) => {
if (response.length > 0) {
alert(response.length + ' videos were updated');
this.readList();
}
});
}
readList(): void {
this.requestService.post(
'video-list/read-list',
'analyze/read-video-list',
{
query: this.query,
page: this.page,