SubtitleApi - functional programming interface

  • Parameters

    Returns {
        deleteSubtitle(itemId: string, index: number, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        downloadRemoteSubtitles(itemId: string, subtitleId: string, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        getFallbackFont(name: string, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>)>;
        getFallbackFontList(options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<FontFile[]>)>;
        getRemoteSubtitles(subtitleId: string, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>)>;
        getSubtitle(routeItemId: string, routeMediaSourceId: string, routeIndex: number, routeFormat: string, itemId?: string, mediaSourceId?: string, index?: number, format?: string, endPositionTicks?: number, copyTimestamps?: boolean, addVttTimeMap?: boolean, startPositionTicks?: number, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>)>;
        getSubtitlePlaylist(itemId: string, index: number, mediaSourceId: string, segmentLength: number, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>)>;
        getSubtitleWithTicks(routeItemId: string, routeMediaSourceId: string, routeIndex: number, routeStartPositionTicks: number, routeFormat: string, itemId?: string, mediaSourceId?: string, index?: number, startPositionTicks?: number, format?: string, endPositionTicks?: number, copyTimestamps?: boolean, addVttTimeMap?: boolean, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>)>;
        searchRemoteSubtitles(itemId: string, language: string, isPerfectMatch?: boolean, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<RemoteSubtitleInfo[]>)>;
        uploadSubtitle(itemId: string, uploadSubtitleDto: UploadSubtitleDto, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
    }

    • deleteSubtitle:function
      • Parameters

        • itemId: string

          The item id.

        • index: number

          The index of the subtitle file.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

        Deletes an external subtitle file.

    • downloadRemoteSubtitles:function
      • Parameters

        • itemId: string

          The item id.

        • subtitleId: string

          The subtitle id.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

        Downloads a remote subtitle.

    • getFallbackFont:function
      • Parameters

        • name: string

          The name of the fallback font file to get.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>)>

        Gets a fallback font file.

    • getFallbackFontList:function
      • Parameters

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<FontFile[]>)>

        Gets a list of available fallback font files.

    • getRemoteSubtitles:function
      • Parameters

        • subtitleId: string

          The item id.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>)>

        Gets the remote subtitles.

    • getSubtitle:function
      • Parameters

        • routeItemId: string

          The (route) item id.

        • routeMediaSourceId: string

          The (route) media source id.

        • routeIndex: number

          The (route) subtitle stream index.

        • routeFormat: string

          The (route) format of the returned subtitle.

        • OptionalitemId: string

          The item id.

        • OptionalmediaSourceId: string

          The media source id.

        • Optionalindex: number

          The subtitle stream index.

        • Optionalformat: string

          The format of the returned subtitle.

        • OptionalendPositionTicks: number

          Optional. The end position of the subtitle in ticks.

        • OptionalcopyTimestamps: boolean

          Optional. Whether to copy the timestamps.

        • OptionaladdVttTimeMap: boolean

          Optional. Whether to add a VTT time map.

        • OptionalstartPositionTicks: number

          The start position of the subtitle in ticks.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>)>

        Gets subtitles in a specified format.

    • getSubtitlePlaylist:function
      • Parameters

        • itemId: string

          The item id.

        • index: number

          The subtitle stream index.

        • mediaSourceId: string

          The media source id.

        • segmentLength: number

          The subtitle segment length.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>)>

        Gets an HLS subtitle playlist.

    • getSubtitleWithTicks:function
      • Parameters

        • routeItemId: string

          The (route) item id.

        • routeMediaSourceId: string

          The (route) media source id.

        • routeIndex: number

          The (route) subtitle stream index.

        • routeStartPositionTicks: number

          The (route) start position of the subtitle in ticks.

        • routeFormat: string

          The (route) format of the returned subtitle.

        • OptionalitemId: string

          The item id.

        • OptionalmediaSourceId: string

          The media source id.

        • Optionalindex: number

          The subtitle stream index.

        • OptionalstartPositionTicks: number

          The start position of the subtitle in ticks.

        • Optionalformat: string

          The format of the returned subtitle.

        • OptionalendPositionTicks: number

          Optional. The end position of the subtitle in ticks.

        • OptionalcopyTimestamps: boolean

          Optional. Whether to copy the timestamps.

        • OptionaladdVttTimeMap: boolean

          Optional. Whether to add a VTT time map.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>)>

        Gets subtitles in a specified format.

    • searchRemoteSubtitles:function
      • Parameters

        • itemId: string

          The item id.

        • language: string

          The language of the subtitles.

        • OptionalisPerfectMatch: boolean

          Optional. Only show subtitles which are a perfect match.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<RemoteSubtitleInfo[]>)>

        Search remote subtitles.

    • uploadSubtitle:function
      • Parameters

        • itemId: string

          The item the subtitle belongs to.

        • uploadSubtitleDto: UploadSubtitleDto

          The request body.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

        Upload an external subtitle file.