mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Handle announces in inbox
This commit is contained in:
parent
8e10cf1a5a
commit
d846501818
17 changed files with 264 additions and 23 deletions
|
@ -39,7 +39,7 @@ function processAddVideo (account: AccountInstance, videoChannelUrl: string, vid
|
|||
async function addRemoteVideo (account: AccountInstance, videoChannelUrl: string, videoToCreateData: VideoTorrentObject) {
|
||||
logger.debug('Adding remote video %s.', videoToCreateData.url)
|
||||
|
||||
await db.sequelize.transaction(async t => {
|
||||
return db.sequelize.transaction(async t => {
|
||||
const sequelizeOptions = {
|
||||
transaction: t
|
||||
}
|
||||
|
@ -66,7 +66,10 @@ async function addRemoteVideo (account: AccountInstance, videoChannelUrl: string
|
|||
const tags = videoToCreateData.tag.map(t => t.name)
|
||||
const tagInstances = await db.Tag.findOrCreateTags(tags, t)
|
||||
await videoCreated.setTags(tagInstances, sequelizeOptions)
|
||||
|
||||
logger.info('Remote video with uuid %s inserted.', videoToCreateData.uuid)
|
||||
|
||||
return videoCreated
|
||||
})
|
||||
|
||||
logger.info('Remote video with uuid %s inserted.', videoToCreateData.uuid)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue