|
|
|
@@ -74,6 +74,14 @@ async getNormalUrl(bvid: string, cid: number) : Promise<Result<NormalMediaUrl, C
|
|
|
|
|
if(e instanceof Error) throw e;
|
|
|
|
|
else return { status: "error", error: e as any };
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async getBangumiUrl(cid: number) : Promise<Result<BangumiMediaUrl, CommandError>> {
|
|
|
|
|
try {
|
|
|
|
|
return { status: "ok", data: await TAURI_INVOKE("get_bangumi_url", { cid }) };
|
|
|
|
|
} catch (e) {
|
|
|
|
|
if(e instanceof Error) throw e;
|
|
|
|
|
else return { status: "error", error: e as any };
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -99,19 +107,24 @@ export type Area = { id: number; name: string }
|
|
|
|
|
export type ArgueInfo = { argue_msg: string; argue_type: number; argue_link: string }
|
|
|
|
|
export type Author = { mid: number; name: string; face: string }
|
|
|
|
|
export type BadgeInfo = { bg_color: string; bg_color_night: string; text: string }
|
|
|
|
|
export type BangumiMediaUrl = { accept_format: string; code: number; seek_param: string; is_preview: number; fnval: number; video_project: boolean; fnver: number; type: string; bp: number; seek_type: string; result: string; vip_type: number | null; from: string; video_codecid: number; record_info: RecordInfo | null; is_drm: boolean; no_rexcode: number; format: string; support_formats: SupportFormatInBangumi[]; message: string; accept_quality: number[]; quality: number; timelength: number; durls: DurlInBangumi[]; has_paid: boolean; vip_status: number | null; error_code: number; dash: DashInBangumi | null; clip_info_list: ClipInfoList[]; accept_description: string[]; status: number }
|
|
|
|
|
export type BangumiInfo = { activity: Activity; actors: string; alias: string; areas: Area[]; bkg_cover: string; cover: string; delivery_fragment_video: boolean; enable_vt: boolean; episodes: EpInBangumi[]; evaluate: string; hide_ep_vv_vt_dm: number; icon_font: IconFont; jp_title: string; link: string; media_id: number; mode: number; new_ep: NewEp; payment: PaymentInBangumi | null; play_strategy: PlayStrategy | null; positive: Positive; publish: Publish; rating: Rating | null; record: string; rights: RightsInBangumi; season_id: number; season_title: string; seasons: Season[]; section: SectionInBangumi[] | null; series: Series; share_copy: string; share_sub_title: string; share_url: string; show: Show; show_season_type: number; square_cover: string; staff: string; stat: StatInBangumi; status: number; styles: string[]; subtitle: string; title: string; total: number; type: number; up_info: UpInfoInBangumi | null; user_status: UserStatusInBangumi }
|
|
|
|
|
export type Brief = { content: string; img: Img[]; title: string; type: number }
|
|
|
|
|
export type CheeseInfo = { abtest_info: AbtestInfo; be_subscription: boolean; brief: Brief; consulting: Consulting; cooperation: Cooperation; course_content: string; cover: string; ep_count: number; episode_page: EpPage; episode_sort: number; episode_tag: EpTag; episodes: EpInCheese[]; expiry_day: number; expiry_info_content: string; faq: Faq; faq1: Faq1; is_enable_cash: boolean; is_series: boolean; live_ep_count: number; opened_ep_count: number; paid_jump: PaidJump; paid_view: boolean; payment: Payment; previewed_purchase_note: PreviewedPurchaseNote; purchase_format_note: PurchaseFormatNote; purchase_note: PurchaseNote; purchase_protocol: PurchaseProtocol; recommend_seasons: RecommendSeason[]; release_bottom_info: string; release_info: string; release_info2: string; release_status: string; season_id: number; season_tag: number; share_url: string; short_link: string; show_watermark: boolean; stat: StatInCheese; status: number; stop_sell: boolean; subscription_update_count_cycle_text: string; subtitle: string; title: string; up_info: UpInfoInCheese; update_status: number; user_status: UserStatusInCheese; watermark_interval: number }
|
|
|
|
|
export type ClipInfoList = { materialNo: number; start: number; end: number; toastText: string; clipType: string }
|
|
|
|
|
export type CommandError = { err_title: string; err_message: string }
|
|
|
|
|
export type Config = { downloadDir: string; enableFileLogger: boolean; sessdata: string }
|
|
|
|
|
export type Consulting = { consulting_flag: boolean; consulting_url: string }
|
|
|
|
|
export type ContentList = { bold: boolean; content: string; number: string }
|
|
|
|
|
export type Cooperation = { link: string }
|
|
|
|
|
export type DashInBangumi = { duration: number; min_buffer_time: number; video: MediaInBangumi[]; audio: MediaInBangumi[] | null }
|
|
|
|
|
export type DashInNormal = { duration: number; min_buffer_time: number; video: MediaInNormal[]; audio: MediaInNormal[] | null; dolby: Dolby; flac: Flac | null }
|
|
|
|
|
export type DescV2 = { raw_text: string; type: number; biz_id: number }
|
|
|
|
|
export type Dimension = { width: number; height: number; rotate: number }
|
|
|
|
|
export type DimensionInBangumi = { height: number; rotate: number; width: number }
|
|
|
|
|
export type Dolby = { type: number; audio: MediaInNormal[] | null }
|
|
|
|
|
export type DurlDetailInBangumi = { size: number; ahead: string; length: number; vhead: string; backup_url: string[]; url: string; order: number; md5: string }
|
|
|
|
|
export type DurlInBangumi = { durl: DurlDetailInBangumi[]; quality: number }
|
|
|
|
|
export type Ed = { end: number; start: number }
|
|
|
|
|
export type EpInBangumi = { aid: number; badge: string; badge_info: BadgeInfo; badge_type: number | null; bvid: string | null; cid: number; cover: string; dimension: DimensionInBangumi | null; duration: number | null; enable_vt: boolean; ep_id: number; from: string | null; id: number; is_view_hide: boolean; link: string; link_type: string | null; long_title: string | null; pub_time: number; pv: number; release_date: string | null; rights: RightsInBangumiEp | null; section_type: number; share_copy: string | null; share_url: string | null; short_link: string | null; showDrmLoginDialog: boolean; show_title: string | null; skip: Skip | null; status: number; subtitle: string | null; title: string; vid: string | null; icon_font: IconFont | null }
|
|
|
|
|
export type EpInCheese = { aid: number; catalogue_index: number; cid: number; cover: string; duration: number; ep_status: number; episode_can_view: boolean; from: string; id: number; index: number; label: string | null; page: number; play: number; play_way: number; playable: boolean; release_date: number; show_vt: boolean; status: number; subtitle: string; title: string; watched: boolean; watchedHistory: number }
|
|
|
|
@@ -134,6 +147,7 @@ export type LabelInUserInfo = { path: string; text: string; label_theme: string;
|
|
|
|
|
export type LevelInfoInUserInfo = { current_level: number; current_min: number; current_exp: number }
|
|
|
|
|
export type LogEvent = { timestamp: string; level: LogLevel; fields: { [key in string]: JsonValue }; target: string; filename: string; line_number: number }
|
|
|
|
|
export type LogLevel = "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR"
|
|
|
|
|
export type MediaInBangumi = { start_with_sap: number; bandwidth: number; sar: string; backup_url: string[]; codecs: string; base_url: string; segment_base: SegmentBaseInBangumi; mime_type: string; frame_rate: string; codecid: number; size: number; width: number; id: number; height: number; md5: string }
|
|
|
|
|
export type MediaInNormal = { id: number; start_with_sap: number; bandwidth: number; sar: string; codecs: string; base_url: string; backup_url: string[]; segment_base: SegmentBaseInNormal; mime_type: string; frame_rate: string; width: number; height: number; codecid: number }
|
|
|
|
|
export type NewEp = { desc: string; id: number; is_new: number; title: string }
|
|
|
|
|
export type NewEpInSeason = { cover: string; id: number; index_show: string }
|
|
|
|
@@ -163,6 +177,7 @@ export type QrcodeData = { url: string; qrcode_key: string }
|
|
|
|
|
export type QrcodeStatus = { url: string; refresh_token: string; timestamp: number; code: number; message: string }
|
|
|
|
|
export type Rating = { count: number; score: number }
|
|
|
|
|
export type RecommendSeason = { cover: string; ep_count: string; id: number; season_url: string; subtitle: string; title: string; view: number }
|
|
|
|
|
export type RecordInfo = { record_icon: string; record: string }
|
|
|
|
|
export type Rights = { bp: number; elec: number; download: number; movie: number; pay: number; hd5: number; no_reprint: number; autoplay: number; ugc_pay: number; is_cooperation: number; ugc_pay_preview: number; no_background: number; clean_mode: number; is_stein_gate: number; is_360: number; no_share: number; arc_pay: number; free_watch: number }
|
|
|
|
|
export type RightsInBangumi = { allow_bp: number; allow_bp_rank: number; allow_download: number; allow_review: number; area_limit: number; ban_area_show: number; can_watch: number; copyright: string; forbid_pre: number; freya_white: number; is_cover_show: number; is_preview: number; only_vip_download: number; resource: string; watch_platform: number }
|
|
|
|
|
export type RightsInBangumiEp = { allow_dm: number; allow_download: number; area_limit: number }
|
|
|
|
@@ -170,6 +185,7 @@ export type RightsInNormalEp = { bp: number; elec: number; download: number; mov
|
|
|
|
|
export type Season = { badge: string; badge_info: BadgeInfo; badge_type: number; cover: string; enable_vt: boolean; horizontal_cover_1610: string; horizontal_cover_169: string; icon_font: IconFont; media_id: number; new_ep: NewEpInSeason; season_id: number; season_title: string; season_type: number; stat: StatInSeason }
|
|
|
|
|
export type SectionInBangumi = { attr: number; episodes: EpInBangumi[]; id: number; title: string; type: number; type2: number }
|
|
|
|
|
export type SectionInNormal = { season_id: number; id: number; title: string; type: number; episodes: EpInNormal[] }
|
|
|
|
|
export type SegmentBaseInBangumi = { initialization: string; index_range: string }
|
|
|
|
|
export type SegmentBaseInNormal = { initialization: string; index_range: string }
|
|
|
|
|
export type Series = { display_type: number; series_id: number; series_title: string }
|
|
|
|
|
export type Show = { wide_screen: number }
|
|
|
|
@@ -183,6 +199,7 @@ export type StatInNormalSeason = { season_id: number; view: number; danmaku: num
|
|
|
|
|
export type StatInSeason = { favorites: number; series_follow: number; views: number; vt: number }
|
|
|
|
|
export type SubtitleDetailInNormal = { id: number; lan: string; lan_doc: string; is_lock: boolean; subtitle_url: string; type: number; id_str: string; ai_type: number; ai_status: number }
|
|
|
|
|
export type SubtitleInNormal = { allow_submit: boolean; list: SubtitleDetailInNormal[] }
|
|
|
|
|
export type SupportFormatInBangumi = { display_desc: string; has_preview: boolean; sub_description: string; superscript: string; need_login: boolean | null; codecs: string[]; format: string; description: string; need_vip: boolean | null; attribute: number; quality: number; new_description: string }
|
|
|
|
|
export type SupportFormatInNormal = { quality: number; format: string; new_description: string; display_desc: string; superscript: string; codecs: string[] }
|
|
|
|
|
export type UgcSeason = { id: number; title: string; cover: string; mid: number; intro: string; sign_state: number; attribute: number; sections: SectionInNormal[]; stat: StatInNormalSeason; ep_count: number; season_type: number; is_pay_season: boolean; enable_vt: number }
|
|
|
|
|
export type UpInfoInBangumi = { avatar: string; mid: number; uname: string }
|
|
|
|
|