Add ability to disable webtorrent
In favour of HLS
This commit is contained in:
parent
14981d7331
commit
d7a25329f9
80 changed files with 1189 additions and 540 deletions
|
@ -79,6 +79,15 @@ function afterCommitIfTransaction (t: Transaction, fn: Function) {
|
|||
return fn()
|
||||
}
|
||||
|
||||
function deleteNonExistingModels <T extends { hasSameUniqueKeysThan (other: T): boolean } & Model<T>> (
|
||||
fromDatabase: T[],
|
||||
newModels: T[],
|
||||
t: Transaction
|
||||
) {
|
||||
return fromDatabase.filter(f => !newModels.find(newModel => newModel.hasSameUniqueKeysThan(f)))
|
||||
.map(f => f.destroy({ transaction: t }))
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export {
|
||||
|
@ -86,5 +95,6 @@ export {
|
|||
retryTransactionWrapper,
|
||||
transactionRetryer,
|
||||
updateInstanceWithAnother,
|
||||
afterCommitIfTransaction
|
||||
afterCommitIfTransaction,
|
||||
deleteNonExistingModels
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue