aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/fixtures/peertube-plugin-test-video-constants/main.js
blob: 3e650e0a12c542588781695af6f98919ecf7dcea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
async function register ({
  registerHook,
  registerSetting,
  settingsManager,
  storageManager,
  videoCategoryManager,
  videoLicenceManager,
  videoLanguageManager,
  videoPrivacyManager,
  playlistPrivacyManager
}) {
  videoLanguageManager.addLanguage('al_bhed', 'Al Bhed')
  videoLanguageManager.addLanguage('al_bhed2', 'Al Bhed 2')
  videoLanguageManager.addLanguage('al_bhed3', 'Al Bhed 3')
  videoLanguageManager.deleteLanguage('en')
  videoLanguageManager.deleteLanguage('fr')
  videoLanguageManager.deleteLanguage('al_bhed3')

  videoCategoryManager.addCategory(42, 'Best category')
  videoCategoryManager.addCategory(43, 'High best category')
  videoCategoryManager.deleteCategory(1) // Music
  videoCategoryManager.deleteCategory(2) // Films

  videoLicenceManager.addLicence(42, 'Best licence')
  videoLicenceManager.addLicence(43, 'High best licence')
  videoLicenceManager.deleteLicence(1) // Attribution
  videoLicenceManager.deleteLicence(7) // Public domain

  videoPrivacyManager.deletePrivacy(2)
  playlistPrivacyManager.deletePlaylistPrivacy(3)
}

async function unregister () {
  return
}

module.exports = {
  register,
  unregister
}

// ############################################################################

function addToCount (obj) {
  return Object.assign({}, obj, { count: obj.count + 1 })
}