1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 18:29:27 +02:00

Fix P2P with object storage

This commit is contained in:
Chocobozzz 2022-12-30 15:05:14 +01:00
parent fc83f323a8
commit 54db8e3d5c
No known key found for this signature in database
GPG key ID: 583A612D890159BE
5 changed files with 29 additions and 2 deletions

View file

@ -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()