-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
67 changed files
with
55,757 additions
and
9,401 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
lib | ||
/videos/*.ts | ||
crunchy | ||
crunchy | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Generated by https://quicktype.io | ||
|
||
export interface FunimationSearch { | ||
count: number; | ||
items: Items; | ||
limit: string; | ||
offset: string; | ||
} | ||
|
||
export interface Items { | ||
hits: Hit[]; | ||
} | ||
|
||
export interface Hit { | ||
ratings: string; | ||
description: string; | ||
title: string; | ||
image: { | ||
showThumbnail: string, | ||
[key: string]: string | ||
}; | ||
starRating: number; | ||
slug: string; | ||
languages: string[]; | ||
synopsis: string; | ||
quality: Quality; | ||
id: string; | ||
txDate: number; | ||
} | ||
|
||
export interface Quality { | ||
quality: string; | ||
height: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
import { HLSCallback } from 'hls-download'; | ||
import type { FunimationSearch } from './funiSearch'; | ||
import type { AvailableMuxer } from '../modules/module.args'; | ||
|
||
export interface MessageHandler { | ||
auth: (data: AuthData) => Promise<AuthResponse>; | ||
checkToken: () => Promise<CheckTokenResponse>; | ||
search: (data: SearchData) => Promise<SearchResponse>, | ||
availableDubCodes: () => Promise<string[]>, | ||
handleDefault: (name: string) => Promise<any>, | ||
resolveItems: (data: ResolveItemsData) => Promise<ResponseBase<QueueItem[]>>, | ||
listEpisodes: (id: string) => Promise<EpisodeListResponse>, | ||
downloadItem: (data) => void, | ||
isDownloading: () => boolean, | ||
writeToClipboard: (text: string) => void, | ||
openFolder: (path: string[]) => void | ||
} | ||
|
||
export type QueueItem = { | ||
title: string, | ||
episode: string, | ||
ids: string[], | ||
fileName: string, | ||
parent: { | ||
title: string, | ||
season: string | ||
}, | ||
q: number, | ||
dubLang: string[], | ||
} | ||
|
||
export type ResolveItemsData = { | ||
id: string, | ||
dubLang: string[], | ||
all: boolean, | ||
but: boolean, | ||
e: string, | ||
fileName: string, | ||
q: number | ||
} | ||
|
||
export type SearchResponseItem = { | ||
image: string, | ||
name: string, | ||
desc?: string, | ||
id: string, | ||
lang?: string[], | ||
rating: number | ||
}; | ||
|
||
export type Episode = { | ||
e: string, | ||
lang: string[], | ||
name: string, | ||
season: string, | ||
seasonTitle: string, | ||
episode: string, | ||
id: string, | ||
img: string, | ||
description: string, | ||
time: string | ||
} | ||
|
||
export type SearchResponse = ResponseBase<SearchResponseItem[]> | ||
export type EpisodeListResponse = ResponseBase<Episode[]> | ||
|
||
export type FuniEpisodeData = { | ||
title: string, | ||
episode: string, | ||
episodeID: string, | ||
seasonTitle: string, | ||
seasonNumber: string, | ||
}; | ||
|
||
export type AuthData = { username: string, password: string }; | ||
export type SearchData = { search: string, page?: number, 'search-type'?: string, 'search-locale'?: string }; | ||
export type FuniGetShowData = { id: number, e?: string, but: boolean, all: boolean }; | ||
export type FuniGetEpisodeData = { subs: FuniSubsData, fnSlug: FuniEpisodeData, simul?: boolean; dubLang: string[], s: string } | ||
export type FuniStreamData = { callbackMaker?: (data: DownloadInfo) => HLSCallback, q: number, x: number, fileName: string, numbers: number, novids?: boolean, | ||
timeout: number, partsize: number, fsRetryTime: number, noaudio?: boolean, mp4: boolean, ass: boolean, fontSize: number, fontName?: string, skipmux?: boolean, | ||
forceMuxer: AvailableMuxer | undefined, simul: boolean, skipSubMux: boolean, nocleanup: boolean } | ||
export type FuniSubsData = { nosubs?: boolean, sub: boolean, dlsubs: string[] } | ||
export type DownloadData = { id: string, e: string, dubLang: string[], fileName: string, q: number } | ||
|
||
export type AuthResponse = ResponseBase<undefined>; | ||
export type FuniSearchReponse = ResponseBase<FunimationSearch>; | ||
export type FuniShowResponse = ResponseBase<FuniEpisodeData[]>; | ||
export type FuniGetEpisodeResponse = ResponseBase<undefined>; | ||
export type CheckTokenResponse = ResponseBase<undefined>; | ||
|
||
|
||
export type ResponseBase<T> = ({ | ||
isOk: true, | ||
value: T | ||
} | { | ||
isOk: false, | ||
reason: Error | ||
}); | ||
|
||
export type ProgressData = { | ||
total: number, | ||
cur: number, | ||
percent: number|string, | ||
time: number, | ||
downloadSpeed: number | ||
}; | ||
|
||
export type PossibleMessanges = keyof ServiceHandler; | ||
|
||
export type DownloadInfo = { | ||
image: string, | ||
parent: { | ||
title: string | ||
}, | ||
title: string, | ||
fileName: string | ||
} | ||
|
||
export type ExtendedProgress = { | ||
progress: ProgressData, | ||
downloadInfo: DownloadInfo | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { ExtendedProgress } from "./messageHandler"; | ||
|
||
export type RandomEvents = { | ||
progress: ExtendedProgress, | ||
finish: undefined | ||
} | ||
|
||
export interface RandomEvent<T extends keyof RandomEvents> { | ||
name: T, | ||
data: RandomEvents[T] | ||
} | ||
|
||
export type Handler<T extends keyof RandomEvents> = (data: RandomEvent<T>) => unknown; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface ServiceClass { | ||
cli: () => Promise<boolean|undefined|void> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
- [ ] Hls-Download force yes or no on rewrite promt as well as for mkvmerge/ffmpeg | ||
- [x] Pick up if a download is currently in progress | ||
- [x] Send more information with the progress event like the title and image to display more information | ||
- [x] Use Click away listener for the search popup | ||
- [x] Quality select button is uncrontrolled/controlled | ||
- [ ] Set Options font in divider | ||
- [x] Window title | ||
- [x] Only open dev tools in test version | ||
- [ ] Add help information (version, contributor, documentation...) | ||
- [ ] App Icon with electron-forge make | ||
- [x] ContextMenu | ||
- [x] Better episode listing with selectio via left mouse button | ||
- [x] Use Child for Context Menu |
Oops, something went wrong.