Rename last few active API routes

This commit is contained in:
Tiger Oakes
2020-09-25 10:26:05 -07:00
parent 4d74c375f4
commit fe7a3075d6
7 changed files with 106 additions and 72 deletions

View File

@@ -20,7 +20,7 @@ import { CreatePlaylistComponent } from 'app/create-playlist/create-playlist.com
import { Platform } from '@angular/cdk/platform';
import { v4 as uuid } from 'uuid';
import { ArgModifierDialogComponent } from 'app/dialogs/arg-modifier-dialog/arg-modifier-dialog.component';
import type { FileType } from 'api-types';
import type { FileType } from '../../api-types';
export let audioFilesMouseHovering = false;
export let videoFilesMouseHovering = false;
@@ -34,7 +34,7 @@ export interface Download {
percent_complete: number;
downloading: boolean;
is_playlist: boolean;
error: boolean | string;
error?: boolean | string;
fileNames?: string[];
complete?: boolean;
timestamp_start?: number;
@@ -740,7 +740,7 @@ export class MainComponent implements OnInit {
downloadAudioFile(name) {
this.downloading_content['audio'][name] = true;
this.postsService.downloadFileFromServer(name, 'audio').subscribe(res => {
this.postsService.downloadFileFromServer(name, 'audio' as FileType).subscribe(res => {
this.downloading_content['audio'][name] = false;
const blob: Blob = res;
saveAs(blob, decodeURIComponent(name) + '.mp3');
@@ -757,7 +757,7 @@ export class MainComponent implements OnInit {
downloadVideoFile(name) {
this.downloading_content['video'][name] = true;
this.postsService.downloadFileFromServer(name, 'video').subscribe(res => {
this.postsService.downloadFileFromServer(name, 'video' as FileType).subscribe(res => {
this.downloading_content['video'][name] = false;
const blob: Blob = res;
saveAs(blob, decodeURIComponent(name) + '.mp4');