mirror of https://github.com/morpheus65535/bazarr
22 lines
472 B
TypeScript
22 lines
472 B
TypeScript
import BaseApi from "./base";
|
|
|
|
class SubtitlesApi extends BaseApi {
|
|
constructor() {
|
|
super("/subtitles");
|
|
}
|
|
|
|
async info(names: string[]) {
|
|
const response = await this.get<DataWrapper<SubtitleInfo[]>>(`/info`, {
|
|
filenames: names,
|
|
});
|
|
return response.data;
|
|
}
|
|
|
|
async modify(action: string, form: FormType.ModifySubtitle) {
|
|
await this.patch("", form, { action });
|
|
}
|
|
}
|
|
|
|
const subtitlesApi = new SubtitlesApi();
|
|
export default subtitlesApi;
|