Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert changes to ott-common #1377

Merged
merged 4 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 1 addition & 21 deletions common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,8 @@
"name": "ott-common",
"version": "0.10.0",
"license": "AGPL-3.0-or-later",
"module": "es2020",
"type": "module",
"main": "ts-out/index.js",
"module": "ts-out/index.js",
"files": [
"ts-out/"
],
"exports": {
".": "./ts-out/index.js",
"./constants": "./ts-out/constants.js",
"./exceptions": "./ts-out/exceptions.js",
"./models/messages": "./ts-out/models/messages.js",
"./models/rest-api": "./ts-out/models/rest-api.js",
"./models/types": "./ts-out/models/types.js",
"./models/video": "./ts-out/models/video.js",
"./permissions": "./ts-out/permissions.js",
"./queueexport": "./ts-out/queueexport.js",
"./result": "./ts-out/result.js",
"./serialize": "./ts-out/serialize.js",
"./timestamp": "./ts-out/timestamp.js",
"./userutils": "./ts-out/userutils.js",
"./voteskip": "./ts-out/voteskip.js"
},
"scripts": {
"build": "tsc",
"lint": "tsc --noEmit && eslint --ext .js,.ts --fix .",
Expand Down
2 changes: 1 addition & 1 deletion deploy/monolith.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ COPY deploy/$DEPLOY_TARGET.toml /usr/app/env/production.toml
HEALTHCHECK --interval=30s --timeout=3s CMD ( curl -f http://localhost:8080/api/status || exit 1 )

# Start Server
CMD ["yarn", "workspace", "ott-server", "run", "start-lean"]
CMD ["yarn", "workspace", "ott-server", "run", "start-lean"]
2 changes: 1 addition & 1 deletion server/admin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OttException } from "ott-common/exceptions";
import { OttException } from "../common/exceptions";
import { conf } from "./ott-config";

/**
Expand Down
6 changes: 3 additions & 3 deletions server/api/announce.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { getLogger } from "../logger";
import { conf } from "../ott-config";
import express, { RequestHandler } from "express";
import { redisClient } from "../redisclient";
import { ANNOUNCEMENT_CHANNEL } from "ott-common/constants";
import { OttResponseBody } from "ott-common/models/rest-api";
import { OttException } from "ott-common/exceptions";
import { ANNOUNCEMENT_CHANNEL } from "../../common/constants";
import { OttResponseBody } from "../../common/models/rest-api";
import { OttException } from "../../common/exceptions";
import { BadApiArgumentException } from "../exceptions";

const router = express.Router();
Expand Down
4 changes: 2 additions & 2 deletions server/api/data.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { getLogger } from "../logger";
import { conf } from "../ott-config";
import express, { RequestHandler, ErrorRequestHandler } from "express";
import { OttApiResponseAddPreview, OttResponseBody } from "ott-common/models/rest-api";
import { OttException } from "ott-common/exceptions";
import { OttApiResponseAddPreview, OttResponseBody } from "../../common/models/rest-api";
import { OttException } from "../../common/exceptions";
import { BadApiArgumentException } from "../exceptions";
import InfoExtract from "../infoextractor";
import { consumeRateLimitPoints } from "../rate-limit";
Expand Down
2 changes: 1 addition & 1 deletion server/api/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import express from "express";
import { rateLimiter } from "../rate-limit";
import roommanager from "../roommanager";
import { RoomRequestType } from "ott-common/models/messages";
import { RoomRequestType } from "../../common/models/messages";

Check warning on line 5 in server/api/dev.ts

View check run for this annotation

Codecov / codecov/patch

server/api/dev.ts#L5

Added line #L5 was not covered by tests
import usermanager from "../usermanager";
import faker from "faker";
import tokens from "../auth/tokens";
Expand Down
18 changes: 9 additions & 9 deletions server/api/room.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import _ from "lodash";
import { getLogger } from "../logger";
import roommanager from "../roommanager";
import { QueueMode, Visibility } from "ott-common/models/types";
import { QueueMode, Visibility } from "../../common/models/types";
import { consumeRateLimitPoints } from "../rate-limit";
import { BadApiArgumentException, FeatureDisabledException } from "../exceptions";
import { OttException } from "ott-common/exceptions";
import { OttException } from "../../common/exceptions";
import express, { RequestHandler, ErrorRequestHandler } from "express";
import clientmanager from "../clientmanager";
import {
ApplySettingsRequest,
RoomRequestType,
UndoRequest,
AddRequest,
} from "ott-common/models/messages";
} from "../../common/models/messages";
import storage from "../storage";
import { Grants } from "ott-common/permissions";
import { Video } from "ott-common/models/video";
import { ROOM_NAME_REGEX } from "ott-common/constants";
import { Grants } from "../../common/permissions";
import { Video } from "../../common/models/video.js";
import { ROOM_NAME_REGEX } from "../../common/constants";
import {
OttApiRequestAddToQueue,
OttApiRequestPatchRoom,
Expand All @@ -27,7 +27,7 @@
OttApiResponseRoomCreate,
OttApiResponseRoomGenerate,
OttResponseBody,
} from "ott-common/models/rest-api";
} from "../../common/models/rest-api";
import { getApiKey } from "../admin";
import { v4 as uuidv4 } from "uuid";
import { counterHttpErrors } from "../metrics";
Expand Down Expand Up @@ -431,7 +431,7 @@
} else {
throw new BadApiArgumentException("service,id", "missing");
}
await room.processUnauthorizedRequest(roomRequest, { token: req.token! });
await room.processUnauthorizedRequest(roomRequest, { token: req.token });

Check warning on line 434 in server/api/room.ts

View check run for this annotation

Codecov / codecov/patch

server/api/room.ts#L434

Added line #L434 was not covered by tests
res.json({
success: true,
});
Expand All @@ -454,7 +454,7 @@
type: RoomRequestType.RemoveRequest,
video: { service: req.body.service, id: req.body.id },
},
{ token: req.token! }
{ token: req.token }

Check warning on line 457 in server/api/room.ts

View check run for this annotation

Codecov / codecov/patch

server/api/room.ts#L457

Added line #L457 was not covered by tests
);
res.json({
success: true,
Expand Down
6 changes: 3 additions & 3 deletions server/auth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import express from "express";
import tokens, { SessionInfo } from "./tokens";
import { uniqueNamesGenerator } from "unique-names-generator";
import passport from "passport";
import { AuthToken, MySession } from "ott-common/models/types";
import { AuthToken, MySession } from "../../common/models/types";
import nocache from "nocache";
import usermanager from "../usermanager";
import { OttException } from "ott-common/exceptions";
import { OttException } from "../../common/exceptions";
import { requireApiKey } from "../admin";

const router = express.Router();
Expand Down Expand Up @@ -55,7 +55,7 @@ export async function authTokenMiddleware(
req.token = token;
}

if (!req.token || !(await tokens.validate(req.token))) {
if (!(await tokens.validate(req.token))) {
res.status(400).json({
success: false,
error: {
Expand Down
2 changes: 1 addition & 1 deletion server/auth/tokens.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import crypto from "crypto";
import { redisClient } from "../redisclient";
import { AuthToken } from "ott-common/models/types";
import { AuthToken } from "../../common/models/types";

const PREFIX = "auth";
const EXPIRATION_TIME = 14 * 24 * 60 * 60; // 14 days in seconds
Expand Down
6 changes: 3 additions & 3 deletions server/balancer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

import { getLogger } from "./logger";
import { conf } from "./ott-config";
import { Result, err, ok, intoResult } from "ott-common/result";
import { AuthToken, ClientId } from "ott-common/models/types";
import { replacer } from "ott-common/serialize";
import { Result, err, ok, intoResult } from "../common/result";
import { AuthToken, ClientId } from "../common/models/types";
import { replacer } from "../common/serialize";
import { OttWebsocketError } from "ott-common/models/types";
import roommanager from "./roommanager";
import type { RoomListItem } from "./api/room";
Expand Down Expand Up @@ -40,7 +40,7 @@
balancerManager.addBalancerConnection(conn);
});
wss.on("error", error => {
log.error(`Balancer websocket error: ${error}`);

Check warning on line 43 in server/balancer.ts

View workflow job for this annotation

GitHub Actions / lint (18.x)

Invalid type "Error" of template literal expression

Check warning on line 43 in server/balancer.ts

View workflow job for this annotation

GitHub Actions / lint (18.x)

Invalid type "Error" of template literal expression
});
wss.on("listening", () => {
log.info(
Expand Down Expand Up @@ -99,7 +99,7 @@
}

private onBalancerError(conn: BalancerConnection, error: WebSocket.ErrorEvent) {
log.error(`Error from balancer ${conn.id}: ${error}`);

Check warning on line 102 in server/balancer.ts

View workflow job for this annotation

GitHub Actions / lint (18.x)

Invalid type "ErrorEvent" of template literal expression

Check warning on line 102 in server/balancer.ts

View workflow job for this annotation

GitHub Actions / lint (18.x)

Invalid type "ErrorEvent" of template literal expression
this.emit("error", conn, error);
}

Expand Down Expand Up @@ -216,7 +216,7 @@
}
this.emit("message", result.value);
} else {
log.error(`Error parsing incoming balancer message: ${result.value} - ${data}`);

Check warning on line 219 in server/balancer.ts

View workflow job for this annotation

GitHub Actions / lint (18.x)

Invalid type "Error" of template literal expression

Check warning on line 219 in server/balancer.ts

View workflow job for this annotation

GitHub Actions / lint (18.x)

Invalid type "Data" of template literal expression

Check warning on line 219 in server/balancer.ts

View workflow job for this annotation

GitHub Actions / lint (18.x)

Invalid type "Error" of template literal expression

Check warning on line 219 in server/balancer.ts

View workflow job for this annotation

GitHub Actions / lint (18.x)

Invalid type "Data" of template literal expression
}
}

Expand Down Expand Up @@ -276,7 +276,7 @@
const result = await roommanager.getRoom(roomName, { mustAlreadyBeLoaded: true });
if (!result.ok) {
log.error(
`Failed to grab room that should have been loaded. Can't inform balancers. room=${roomName}: ${result.value}`

Check warning on line 279 in server/balancer.ts

View workflow job for this annotation

GitHub Actions / lint (18.x)

Invalid type "RoomNotFoundException | RoomAlreadyLoadedException" of template literal expression

Check warning on line 279 in server/balancer.ts

View workflow job for this annotation

GitHub Actions / lint (18.x)

Invalid type "RoomNotFoundException | RoomAlreadyLoadedException" of template literal expression
);
return;
}
Expand Down
6 changes: 3 additions & 3 deletions server/client.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { AuthToken, ClientId, ClientInfo, OttWebsocketError } from "ott-common/models/types";
import type { ClientMessage, ServerMessage } from "ott-common/models/messages";
import { AuthToken, ClientId, ClientInfo, OttWebsocketError } from "../common/models/types";
import type { ClientMessage, ServerMessage } from "../common/models/messages";
import WebSocket from "ws";
import { SessionInfo, setSessionInfo } from "./auth/tokens";
import { v4 as uuidv4 } from "uuid";
import EventEmitter from "events";
import { getLogger } from "./logger";
import { getSessionInfo } from "./auth/tokens";
import { BalancerConnection, BalancerConnectionReal } from "./balancer";
import { replacer } from "ott-common/serialize";
import { replacer } from "../common/serialize";

const log = getLogger("client");

Expand Down Expand Up @@ -141,7 +141,7 @@
}

onError(err: Error) {
log.error(`Error on socket for client ${this.id}: ${err}`);

Check warning on line 144 in server/client.ts

View workflow job for this annotation

GitHub Actions / lint (18.x)

Invalid type "Error" of template literal expression

Check warning on line 144 in server/client.ts

View workflow job for this annotation

GitHub Actions / lint (18.x)

Invalid type "Error" of template literal expression
}

sendRaw(msg: string) {
Expand Down
10 changes: 5 additions & 5 deletions server/clientmanager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
ServerMessageSync,
ServerMessageUser,
ServerMessageYou,
} from "ott-common/models/messages";
} from "../common/models/messages";
import { ClientNotFoundInRoomException, MissingToken } from "./exceptions";
import { MySession, OttWebsocketError, AuthToken, ClientId } from "ott-common/models/types";
import { MySession, OttWebsocketError, AuthToken, ClientId } from "../common/models/types";
import roommanager from "./roommanager";
import { ANNOUNCEMENT_CHANNEL, ROOM_NAME_REGEX } from "ott-common/constants";
import { ANNOUNCEMENT_CHANNEL, ROOM_NAME_REGEX } from "../common/constants";
import tokens, { SessionInfo } from "./auth/tokens";
import { RoomStateSyncable } from "./room";
import { Gauge } from "prom-client";
import { replacer } from "ott-common/serialize";
import { replacer } from "../common/serialize";
import { Client, ClientJoinStatus, DirectClient, BalancerClient } from "./client";
import { BalancerConnection, MsgB2M, balancerManager, initBalancerConnections } from "./balancer";
import usermanager from "./usermanager";
import { OttException } from "ott-common/exceptions";
import { OttException } from "../common/exceptions";
import { conf } from "./ott-config";

const log = getLogger("clientmanager");
Expand Down Expand Up @@ -344,7 +344,7 @@
}

function onBalancerError(conn: BalancerConnection, error: WebSocket.ErrorEvent) {
log.error(`Error from balancer ${conn.id}: ${error}`);

Check warning on line 347 in server/clientmanager.ts

View workflow job for this annotation

GitHub Actions / lint (18.x)

Invalid type "ErrorEvent" of template literal expression

Check warning on line 347 in server/clientmanager.ts

View workflow job for this annotation

GitHub Actions / lint (18.x)

Invalid type "ErrorEvent" of template literal expression
}

async function makeRoomRequest(client: Client, request: RoomRequest): Promise<void> {
Expand Down
2 changes: 1 addition & 1 deletion server/exceptions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { URL } from "url";
import { OttException } from "ott-common/exceptions";
import { OttException } from "../common/exceptions";

// export type OttException = UnsupportedServiceException | InvalidAddPreviewInputException | OutOfQuotaException | InvalidVideoIdException | FeatureDisabledException | UnsupportedMimeTypeException | LocalFileException | MissingMetadataException | IncompleteServiceAdapterException | PermissionDeniedException | ImpossiblePromotionException | InvalidRoleException | RoomNotFoundException | RoomAlreadyLoadedException | RoomNameTakenException | VideoAlreadyQueuedException | VideoNotFoundException | BadApiArgumentException

Expand Down
2 changes: 1 addition & 1 deletion server/express-types.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { User as UserAccount } from "./models/user";
import { AuthToken } from "ott-common/models/types";
import { AuthToken } from "./common/models/types";
import { SessionInfo } from "./auth/tokens";
import * as core from "express-serve-static-core";

Expand Down
4 changes: 2 additions & 2 deletions server/infoextractor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import {
import { getLogger } from "./logger";
import { redisClient } from "./redisclient";
import { isSupportedMimeType } from "./mime";
import { Video, VideoId, VideoMetadata, VideoService } from "ott-common/models/video";
import { Video, VideoId, VideoMetadata, VideoService } from "../common/models/video";
import { ServiceAdapter } from "./serviceadapter";
import { OttException } from "ott-common/exceptions";
import { OttException } from "../common/exceptions";
import TubiAdapter from "./services/tubi";
import { Counter } from "prom-client";
import { conf } from "./ott-config";
Expand Down
2 changes: 1 addition & 1 deletion server/mailer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Result, ok, err } from "ott-common/result";
import { Result, ok, err } from "../common/result";
import Mailjet, { Client as MailjetClient } from "node-mailjet";
import { conf } from "./ott-config";
import { getLogger } from "./logger";
Expand Down
4 changes: 2 additions & 2 deletions server/models/cachedvideo.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ALL_VIDEO_SERVICES } from "ott-common/constants";
import { VideoService } from "ott-common/models/video";
import { ALL_VIDEO_SERVICES } from "../../common/constants";
import { VideoService } from "../../common/models/video";
import { Sequelize, Model, DataTypes, Optional } from "sequelize";

interface CachedVideoAttributes {
Expand Down
8 changes: 4 additions & 4 deletions server/models/room.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Sequelize, Model, DataTypes, Optional } from "sequelize";
import { QueueMode, Visibility, Role, BehaviorOption } from "ott-common/models/types";
import { QueueMode, Visibility, Role, BehaviorOption } from "../../common/models/types";
import { User } from "./user";
import { ALL_SKIP_CATEGORIES, ROOM_NAME_REGEX } from "ott-common/constants";
import type { OldRoleGrants, GrantMask } from "ott-common/permissions";
import { QueueItem } from "ott-common/models/video";
import { ALL_SKIP_CATEGORIES, ROOM_NAME_REGEX } from "../../common/constants";
import type { OldRoleGrants, GrantMask } from "../../common/permissions";
import { QueueItem } from "../../common/models/video";
import { Category } from "sponsorblock-api";

export interface RoomAttributes {
Expand Down
4 changes: 2 additions & 2 deletions server/ott-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import validator from "validator";
import convict from "convict";
import toml from "toml";
import type winston from "winston";
import { ALL_VIDEO_SERVICES } from "ott-common/constants";
import { Result, err, ok, intoResult } from "ott-common/result";
import { ALL_VIDEO_SERVICES } from "../common/constants";
import { Result, err, ok, intoResult } from "../common/result";

convict.addParser({ extension: "toml", parse: toml.parse });

Expand Down
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"module": "esnext",
"scripts": {
"start": "node --experimental-specifier-resolution=node --loader ts-node/esm app.ts",
"start-lean": "node --experimental-specifier-resolution=node --optimize-for-size --max-old-space-size=200 ts-out/app.js",
"start-lean": "node --experimental-specifier-resolution=node --optimize-for-size --max-old-space-size=200 ts-out/server/app.js",
"debug": "nodemon --exec node --experimental-specifier-resolution=node --loader ts-node/esm --ignore 'tests/*' --inspect -e ts,js app.ts",
"build": "tsc",
"lint": "tsc --noEmit && eslint --fix .",
Expand Down
24 changes: 12 additions & 12 deletions server/room.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import permissions, { GrantMask, Grants } from "ott-common/permissions";
import permissions, { GrantMask, Grants } from "../common/permissions";
import { redisClient } from "./redisclient";
import { getLogger } from "./logger";
import winston from "winston";
Expand Down Expand Up @@ -28,7 +28,7 @@ import {
ShuffleRequest,
PlaybackSpeedRequest,
KickRequest,
} from "ott-common/models/messages";
} from "../common/models/messages";
import _ from "lodash";
import InfoExtract from "./infoextractor";
import usermanager from "./usermanager";
Expand All @@ -45,12 +45,12 @@ import {
RoomSettings,
AuthToken,
BehaviorOption,
} from "ott-common/models/types";
} from "../common/models/types";
import { User } from "./models/user";
import type { QueueItem, Video, VideoId } from "ott-common/models/video";
import type { QueueItem, Video, VideoId } from "../common/models/video";
import dayjs, { Dayjs } from "dayjs";
import type { PickFunctions } from "ott-common/typeutils";
import { replacer } from "ott-common/serialize";
import type { PickFunctions } from "../common/typeutils";
import { replacer } from "../common/serialize";
import {
ClientNotFoundInRoomException,
ImpossiblePromotionException,
Expand All @@ -59,19 +59,19 @@ import {
} from "./exceptions";
import storage from "./storage";
import tokens, { SessionInfo } from "./auth/tokens";
import { OttException } from "ott-common/exceptions";
import { OttException } from "../common/exceptions";
import { getSponsorBlock } from "./sponsorblock";
import { ResponseError as SponsorblockResponseError, Segment, Category } from "sponsorblock-api";
import { VideoQueue } from "./videoqueue";
import { Counter } from "prom-client";
import roommanager from "./roommanager";
import { calculateCurrentPosition } from "ott-common/timestamp";
import { RestoreQueueRequest } from "ott-common/models/messages";
import { countEligibleVoters, voteSkipThreshold } from "ott-common";
import { calculateCurrentPosition } from "../common/timestamp";
import { RestoreQueueRequest } from "../common/models/messages";
import { countEligibleVoters, voteSkipThreshold } from "../common";
import type { ClientManagerCommand } from "./clientmanager";
import { canKickUser } from "ott-common/userutils";
import { canKickUser } from "../common/userutils";
import { conf } from "./ott-config";
import { ALL_SKIP_CATEGORIES } from "ott-common/constants";
import { ALL_SKIP_CATEGORIES } from "../common/constants";

/**
* Represents a User from the Room's perspective.
Expand Down
8 changes: 4 additions & 4 deletions server/roommanager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Room, RoomState, RoomStateFromRedis, RoomStatePersistable } from "./room";
import { AuthToken, Role, RoomOptions, Visibility } from "ott-common/models/types";
import { AuthToken, Role, RoomOptions, Visibility } from "../common/models/types";
import _ from "lodash";
import { getLogger } from "./logger";
import { redisClient } from "./redisclient";
Expand All @@ -9,11 +9,11 @@ import {
RoomNameTakenException,
RoomNotFoundException,
} from "./exceptions";
import { RoomRequest, RoomRequestContext, ServerMessage } from "ott-common/models/messages";
import { RoomRequest, RoomRequestContext, ServerMessage } from "../common/models/messages";
import { Gauge } from "prom-client";
import { EventEmitter } from "events";
import { Result, ok, err } from "ott-common/result";
import { Grants } from "ott-common/permissions";
import { Result, ok, err } from "../common/result";
import { Grants } from "../common/permissions";
import type { ClientManagerCommand } from "./clientmanager";

export const log = getLogger("roommanager");
Expand Down
2 changes: 1 addition & 1 deletion server/serviceadapter.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable no-unused-vars */
import { Video, VideoId, VideoMetadata, VideoService } from "ott-common/models/video";
import { Video, VideoId, VideoMetadata, VideoService } from "../common/models/video";
import { IncompleteServiceAdapterException } from "./exceptions";
import { getLogger } from "./logger";

Expand Down
2 changes: 1 addition & 1 deletion server/services/dailymotion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { URL } from "url";
import axios from "axios";
import { ServiceAdapter } from "../serviceadapter";
import { InvalidVideoIdException } from "../exceptions";
import { Video } from "ott-common/models/video";
import { Video } from "../../common/models/video";

export default class DailyMotionAdapter extends ServiceAdapter {
api = axios.create({
Expand Down
2 changes: 1 addition & 1 deletion server/services/dash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from "../exceptions";
import { getMimeType, isSupportedMimeType } from "../mime";
import { getLogger } from "../logger";
import { Video } from "ott-common/models/video";
import { Video } from "../../common/models/video";
import { DashMPD } from "@liveinstantly/dash-mpd-parser";
import axios from "axios";
import { parseIso8601Duration } from "./parsing/iso8601";
Expand Down
Loading
Loading