Download Refactor (#483)
# Added - New: Cards when processing a download shows a spinner for the progress of the download # Changed - Changed: Downloads now always take the backend filename and are streamed in a more optimal manner, reducing the javascript processing that was needed previously. ================================== * Started refactor of downloader to be more UX friendly and much faster. * Completed refactor of Volume download to use a new mechanism. Downloads are streamed over and filename used exclusively from header. Backend has additional DB calls to get the Series Name information to make filenames nice. * download service has been updated so all download functions use new event based observable. Duplicates code for downloading, but much cleaner and faster. * Small code cleanup
This commit is contained in:
parent
855f452d14
commit
89b68bc301
20 changed files with 439 additions and 92 deletions
|
@ -1,6 +1,7 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { Chapter } from 'src/app/_models/chapter';
|
||||
import { MangaFormat } from 'src/app/_models/manga-format';
|
||||
import { Series } from 'src/app/_models/series';
|
||||
import { Volume } from 'src/app/_models/volume';
|
||||
|
||||
export enum KEY_CODES {
|
||||
|
@ -85,4 +86,28 @@ export class UtilityService {
|
|||
}
|
||||
}
|
||||
|
||||
isVolume(d: any) {
|
||||
return d != null && d.hasOwnProperty('chapters');
|
||||
}
|
||||
|
||||
isChapter(d: any) {
|
||||
return d != null && d.hasOwnProperty('volumeId');
|
||||
}
|
||||
|
||||
isSeries(d: any) {
|
||||
return d != null && d.hasOwnProperty('originalName');
|
||||
}
|
||||
|
||||
asVolume(d: any) {
|
||||
return <Volume>d;
|
||||
}
|
||||
|
||||
asChapter(d: any) {
|
||||
return <Chapter>d;
|
||||
}
|
||||
|
||||
asSeries(d: any) {
|
||||
return <Series>d;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue