]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/core/server/server.service.ts
Disable webtorrent support in client
[github/Chocobozzz/PeerTube.git] / client / src / app / core / server / server.service.ts
index acaca8a019efec712801f68020b285853ac86036..8e76bebb1c417dc037b68554568d0ce82a1e21e3 100644 (file)
@@ -10,6 +10,7 @@ import { isDefaultLocale, peertubeTranslate } from '../../../../../shared/models
 import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils'
 import { sortBy } from '@app/shared/misc/utils'
 import { VideoPlaylistPrivacy } from '@shared/models/videos/playlist/video-playlist-privacy.model'
+import { cloneDeep } from 'lodash-es'
 
 @Injectable()
 export class ServerService {
@@ -41,6 +42,13 @@ export class ServerService {
         css: ''
       }
     },
+    plugin: {
+      registered: []
+    },
+    theme: {
+      registered: [],
+      default: 'default'
+    },
     email: {
       enabled: false
     },
@@ -57,6 +65,9 @@ export class ServerService {
       enabledResolutions: [],
       hls: {
         enabled: false
+      },
+      webtorrent: {
+        enabled: true
       }
     },
     avatar: {
@@ -98,6 +109,16 @@ export class ServerService {
       videos: {
         intervalDays: 0
       }
+    },
+    autoBlacklist: {
+      videos: {
+        ofUsers: {
+          enabled: false
+        }
+      }
+    },
+    tracker: {
+      enabled: true
     }
   }
   private videoCategories: Array<VideoConstant<number>> = []
@@ -150,27 +171,27 @@ export class ServerService {
   }
 
   getConfig () {
-    return this.config
+    return cloneDeep(this.config)
   }
 
   getVideoCategories () {
-    return this.videoCategories
+    return cloneDeep(this.videoCategories)
   }
 
   getVideoLicences () {
-    return this.videoLicences
+    return cloneDeep(this.videoLicences)
   }
 
   getVideoLanguages () {
-    return this.videoLanguages
+    return cloneDeep(this.videoLanguages)
   }
 
   getVideoPrivacies () {
-    return this.videoPrivacies
+    return cloneDeep(this.videoPrivacies)
   }
 
   getVideoPlaylistPrivacies () {
-    return this.videoPlaylistPrivacies
+    return cloneDeep(this.videoPlaylistPrivacies)
   }
 
   private loadAttributeEnum (