-
-import { HttpStatusCode } from '../../core-utils/miscs/http-error-codes'
-import { unwrapBody, unwrapText } from '../requests'
+import { HttpStatusCode } from '@shared/models'
+import { unwrapBody, unwrapTextOrDecode, unwrapBodyOrDecodeToJSON } from '../requests'
import { AbstractCommand, OverrideCommandOptions } from '../shared'
export class StreamingPlaylistsCommand extends AbstractCommand {
get (options: OverrideCommandOptions & {
url: string
}) {
- return unwrapText(this.getRawRequest({
+ return unwrapTextOrDecode(this.getRawRequest({
...options,
url: options.url,
url: string
range?: string
}) {
- return unwrapText(this.getRawRequest({
+ return unwrapBody<Buffer>(this.getRawRequest({
...options,
url: options.url,
getSegmentSha256 (options: OverrideCommandOptions & {
url: string
}) {
- return unwrapBody<{ [ id: string ]: string }>(this.getRawRequest({
+ return unwrapBodyOrDecodeToJSON<{ [ id: string ]: string }>(this.getRawRequest({
...options,
url: options.url,