aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/server-commands/miscs/sql-command.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-12-30 15:05:14 +0100
committerChocobozzz <me@florianbigard.com>2022-12-30 15:05:14 +0100
commit54db8e3d5c09fedc82d8421529c81255760a5ac2 (patch)
tree5fc316042884ff6ae9b31e51be61819acc5b42c3 /shared/server-commands/miscs/sql-command.ts
parentfc83f323a85112a0f71879b6936ecfbd34e7f2e6 (diff)
downloadPeerTube-54db8e3d5c09fedc82d8421529c81255760a5ac2.tar.gz
PeerTube-54db8e3d5c09fedc82d8421529c81255760a5ac2.tar.zst
PeerTube-54db8e3d5c09fedc82d8421529c81255760a5ac2.zip
Fix P2P with object storage
Diffstat (limited to 'shared/server-commands/miscs/sql-command.ts')
-rw-r--r--shared/server-commands/miscs/sql-command.ts13
1 files changed, 13 insertions, 0 deletions
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 {
86 return seq.query(query, options) 86 return seq.query(query, options)
87 } 87 }
88 88
89 // ---------------------------------------------------------------------------
90
89 setPluginField (pluginName: string, field: string, value: string) { 91 setPluginField (pluginName: string, field: string, value: string) {
90 const seq = this.getSequelize() 92 const seq = this.getSequelize()
91 93
@@ -102,6 +104,17 @@ export class SQLCommand extends AbstractCommand {
102 return this.setPluginField(pluginName, 'latestVersion', newVersion) 104 return this.setPluginField(pluginName, 'latestVersion', newVersion)
103 } 105 }
104 106
107 // ---------------------------------------------------------------------------
108
109 async getPlaylistInfohash (playlistId: number) {
110 const result = await this.selectQuery('SELECT "p2pMediaLoaderInfohashes" FROM "videoStreamingPlaylist" WHERE id = ' + playlistId)
111 if (!result || result.length === 0) return []
112
113 return result[0].p2pMediaLoaderInfohashes
114 }
115
116 // ---------------------------------------------------------------------------
117
105 setActorFollowScores (newScore: number) { 118 setActorFollowScores (newScore: number) {
106 const seq = this.getSequelize() 119 const seq = this.getSequelize()
107 120