From 54db8e3d5c09fedc82d8421529c81255760a5ac2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 30 Dec 2022 15:05:14 +0100 Subject: Fix P2P with object storage --- shared/server-commands/miscs/sql-command.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'shared/server-commands') diff --git a/shared/server-commands/miscs/sql-command.ts b/shared/server-commands/miscs/sql-command.ts index dbc441aba..823fc9e38 100644 --- a/shared/server-commands/miscs/sql-command.ts +++ b/shared/server-commands/miscs/sql-command.ts @@ -86,6 +86,8 @@ export class SQLCommand extends AbstractCommand { return seq.query(query, options) } + // --------------------------------------------------------------------------- + setPluginField (pluginName: string, field: string, value: string) { const seq = this.getSequelize() @@ -102,6 +104,17 @@ export class SQLCommand extends AbstractCommand { return this.setPluginField(pluginName, 'latestVersion', newVersion) } + // --------------------------------------------------------------------------- + + async getPlaylistInfohash (playlistId: number) { + const result = await this.selectQuery('SELECT "p2pMediaLoaderInfohashes" FROM "videoStreamingPlaylist" WHERE id = ' + playlistId) + if (!result || result.length === 0) return [] + + return result[0].p2pMediaLoaderInfohashes + } + + // --------------------------------------------------------------------------- + setActorFollowScores (newScore: number) { const seq = this.getSequelize() -- cgit v1.2.3