Merge pull request #218 from NotWoods/api-generator

Generate types from OpenAPI
This commit is contained in:
Tzahi12345
2021-09-30 22:29:03 -06:00
committed by GitHub
116 changed files with 2892 additions and 976 deletions

View File

@@ -98,7 +98,7 @@ export class CustomPlaylistsComponent implements OnInit {
this.getAllPlaylists();
});
}
editPlaylistDialog(args) {
const playlist = args.playlist;
const index = args.index;

View File

@@ -1,6 +1,7 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { PostsService } from 'app/posts.services';
import { Router } from '@angular/router';
import { FileType } from '../../../api-types';
import { MatPaginator } from '@angular/material/paginator';
import { Subject } from 'rxjs';
import { distinctUntilChanged } from 'rxjs/operators';
@@ -227,7 +228,7 @@ export class RecentVideosComponent implements OnInit {
}
downloadSubscriptionFile(file) {
const type = file.isAudio ? 'audio' : 'video';
const type = (file.isAudio ? 'audio' : 'video') as FileType;
const ext = type === 'audio' ? '.mp3' : '.mp4'
const sub = this.postsService.getSubscriptionByID(file.sub_id);
this.postsService.downloadFileFromServer(file.uid).subscribe(res => {
@@ -239,7 +240,7 @@ export class RecentVideosComponent implements OnInit {
}
downloadNormalFile(file) {
const type = file.isAudio ? 'audio' : 'video';
const type = (file.isAudio ? 'audio' : 'video') as FileType;
const ext = type === 'audio' ? '.mp3' : '.mp4'
const name = file.id;
this.downloading_content[type][name] = true;