mirror of
https://github.com/truewhile/MeBox.git
synced 2026-09-30 03:36:37 +08:00
feat: refresh libraries after STRM updates
This commit is contained in:
@@ -8,6 +8,7 @@ export type GenerateSTRMInput = {
|
||||
overwrite?: boolean
|
||||
include_local?: boolean
|
||||
preserve_tree?: boolean
|
||||
refresh_library?: boolean
|
||||
}
|
||||
|
||||
export type GenerateSTRMResult = {
|
||||
@@ -24,6 +25,7 @@ export type GenerateSTRMResult = {
|
||||
previewed?: number
|
||||
errors?: string[]
|
||||
ignored_items?: string[]
|
||||
refresh?: STRMRefreshResult
|
||||
items?: Array<{
|
||||
media_id: string
|
||||
title: string
|
||||
@@ -47,12 +49,14 @@ export type GenerateSTRMTreeInput = {
|
||||
dry_run?: boolean
|
||||
batch_limit?: number
|
||||
transfer_subtitles?: boolean
|
||||
refresh_library?: boolean
|
||||
}
|
||||
|
||||
export type RepairSTRMInput = {
|
||||
output_dir: string
|
||||
base_url?: string
|
||||
dry_run?: boolean
|
||||
refresh_library?: boolean
|
||||
}
|
||||
|
||||
export type RepairSTRMResult = {
|
||||
@@ -61,6 +65,7 @@ export type RepairSTRMResult = {
|
||||
previewed?: number
|
||||
skipped: number
|
||||
errors?: string[]
|
||||
refresh?: STRMRefreshResult
|
||||
items?: Array<{
|
||||
file_path: string
|
||||
before?: string
|
||||
@@ -70,6 +75,18 @@ export type RepairSTRMResult = {
|
||||
}>
|
||||
}
|
||||
|
||||
export type STRMRefreshResult = {
|
||||
requested: boolean
|
||||
queued: boolean
|
||||
reason?: string
|
||||
targets?: Array<{
|
||||
library_id: string
|
||||
root_id?: string
|
||||
name: string
|
||||
path: string
|
||||
}>
|
||||
}
|
||||
|
||||
export const strmAPI = {
|
||||
set: (mediaID: string, url: string) =>
|
||||
api.put(`/media/${mediaID}/strm`, { url }).then((r) => r.data),
|
||||
|
||||
Reference in New Issue
Block a user