-type VideoFetchByUrlType = 'all' | 'only-video'
-function fetchVideoByUrl (url: string, fetchType: VideoFetchByUrlType) {
- if (fetchType === 'all') return VideoModel.loadByUrlAndPopulateAccount(url)
+function getPrivaciesForFederation () {
+ return (CONFIG.FEDERATION.VIDEOS.FEDERATE_UNLISTED === true)
+ ? [ { privacy: VideoPrivacy.PUBLIC }, { privacy: VideoPrivacy.UNLISTED } ]
+ : [ { privacy: VideoPrivacy.PUBLIC } ]
+}
+
+function getExtFromMimetype (mimeTypes: { [id: string]: string | string[] }, mimeType: string) {
+ const value = mimeTypes[mimeType]
+
+ if (Array.isArray(value)) return value[0]