]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Flat shared module directory
authorChocobozzz <me@florianbigard.com>
Tue, 14 Aug 2018 12:59:53 +0000 (14:59 +0200)
committerChocobozzz <me@florianbigard.com>
Tue, 14 Aug 2018 13:00:01 +0000 (15:00 +0200)
27 files changed:
client/src/standalone/videos/embed.ts
server/initializers/constants.ts
server/models/video/video-caption.ts
server/tests/api/server/follows.ts
server/tests/api/videos/video-captions.ts
server/tests/utils/videos/video-abuses.ts
shared/models/users/user.model.ts
shared/models/videos/abuse/video-abuse-create.model.ts [moved from shared/models/videos/video-abuse-create.model.ts with 100% similarity]
shared/models/videos/abuse/video-abuse-state.model.ts [moved from shared/models/videos/video-abuse-state.model.ts with 100% similarity]
shared/models/videos/abuse/video-abuse-update.model.ts [moved from shared/models/videos/video-abuse-update.model.ts with 100% similarity]
shared/models/videos/abuse/video-abuse.model.ts [moved from shared/models/videos/video-abuse.model.ts with 75% similarity]
shared/models/videos/blacklist/video-blacklist-create.model.ts [moved from shared/models/videos/video-blacklist-create.model.ts with 100% similarity]
shared/models/videos/blacklist/video-blacklist-update.model.ts [moved from shared/models/videos/video-blacklist-update.model.ts with 100% similarity]
shared/models/videos/blacklist/video-blacklist.model.ts [moved from shared/models/videos/video-blacklist.model.ts with 100% similarity]
shared/models/videos/caption/video-caption-update.model.ts [moved from shared/models/videos/video-caption-update.model.ts with 100% similarity]
shared/models/videos/caption/video-caption.model.ts [moved from shared/models/videos/video-caption.model.ts with 61% similarity]
shared/models/videos/channel/video-channel-create.model.ts [moved from shared/models/videos/video-channel-create.model.ts with 100% similarity]
shared/models/videos/channel/video-channel-update.model.ts [moved from shared/models/videos/video-channel-update.model.ts with 100% similarity]
shared/models/videos/channel/video-channel.model.ts [moved from shared/models/videos/video-channel.model.ts with 53% similarity]
shared/models/videos/import/video-import-create.model.ts [moved from shared/models/videos/video-import-create.model.ts with 75% similarity]
shared/models/videos/import/video-import-state.enum.ts [moved from shared/models/videos/video-import-state.enum.ts with 100% similarity]
shared/models/videos/import/video-import.model.ts [moved from shared/models/videos/video-import.model.ts with 76% similarity]
shared/models/videos/index.ts
shared/models/videos/rate/user-video-rate-update.model.ts [moved from shared/models/videos/user-video-rate-update.model.ts with 100% similarity]
shared/models/videos/rate/user-video-rate.model.ts [moved from shared/models/videos/user-video-rate.model.ts with 100% similarity]
shared/models/videos/rate/user-video-rate.type.ts [moved from shared/models/videos/user-video-rate.type.ts with 100% similarity]
shared/models/videos/video.model.ts

index 98ce732579a4f01ba83cf0957aa5939ff3175809..2aabb5fe8ee526e2d852ac53173e56e2e93e9c94 100644 (file)
@@ -24,7 +24,7 @@ import { ResultList, VideoDetails } from '../../../../shared'
 import { addContextMenu, getVideojsOptions, loadLocale } from '../../assets/player/peertube-player'
 import { PeerTubeResolution } from '../player/definitions'
 import { VideoJSCaption } from '../../assets/player/peertube-videojs-typings'
-import { VideoCaption } from '../../../../shared/models/videos/video-caption.model'
+import { VideoCaption } from '../../../../shared/models/videos/caption/video-caption.model'
 
 /**
  * Embed API exposes control of the embed player to the outside world via
index ff8e64330f9153d7270df910ba9469dbc046607c..bce7971595def5663a7f74a15d9f0a27d5bdbb1b 100644 (file)
@@ -3,12 +3,11 @@ import { dirname, join } from 'path'
 import { JobType, VideoRateType, VideoState } from '../../shared/models'
 import { ActivityPubActorType } from '../../shared/models/activitypub'
 import { FollowState } from '../../shared/models/actors'
-import { VideoPrivacy, VideoAbuseState } from '../../shared/models/videos'
+import { VideoPrivacy, VideoAbuseState, VideoImportState } from '../../shared/models/videos'
 // Do not use barrels, remain constants as independent as possible
 import { buildPath, isTestInstance, root, sanitizeHost, sanitizeUrl } from '../helpers/core-utils'
 import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type'
 import { invert } from 'lodash'
-import { VideoImportState } from '../../shared/models/videos/video-import-state.enum'
 
 // Use a variable to reload the configuration if we need
 let config: IConfig = require('config')
index 4a25097f8a6c5a1c152c8d66b4940f7d1f13f7d6..3593646a2ca1a857ed45ad355aee1a5ea9b1f4c6 100644 (file)
@@ -15,7 +15,7 @@ import {
 import { throwIfNotValid } from '../utils'
 import { VideoModel } from './video'
 import { isVideoCaptionLanguageValid } from '../../helpers/custom-validators/video-captions'
-import { VideoCaption } from '../../../shared/models/videos/video-caption.model'
+import { VideoCaption } from '../../../shared/models/videos/caption/video-caption.model'
 import { CONFIG, STATIC_PATHS, VIDEO_LANGUAGES } from '../../initializers'
 import { join } from 'path'
 import { logger } from '../../helpers/logger'
index b91cb75c2c2e5dc21f759ac06681fd4c72224bb4..1cad8998cf5cdf9ede92df030d6264d482aa687e 100644 (file)
@@ -27,7 +27,7 @@ import {
 import { rateVideo } from '../../utils/videos/videos'
 import { waitJobs } from '../../utils/server/jobs'
 import { createVideoCaption, listVideoCaptions, testCaptionFile } from '../../utils/videos/video-captions'
-import { VideoCaption } from '../../../../shared/models/videos/video-caption.model'
+import { VideoCaption } from '../../../../shared/models/videos/caption/video-caption.model'
 
 const expect = chai.expect
 
index ba9ebbdd62471c05ccae7b3a193dbf2b2a3df6b6..6e441410d3fb1e9e4143b829e6b5639796a1c24c 100644 (file)
@@ -6,7 +6,7 @@ import { checkVideoFilesWereRemoved, doubleFollow, flushAndRunMultipleServers, r
 import { flushTests, killallServers, ServerInfo, setAccessTokensToServers } from '../../utils/index'
 import { waitJobs } from '../../utils/server/jobs'
 import { createVideoCaption, deleteVideoCaption, listVideoCaptions, testCaptionFile } from '../../utils/videos/video-captions'
-import { VideoCaption } from '../../../../shared/models/videos/video-caption.model'
+import { VideoCaption } from '../../../../shared/models/videos/caption/video-caption.model'
 
 const expect = chai.expect
 
index 5f138d6b3b773bb18918cd21c7c2bb5df5aeba92..14907e6a0921ac430314d7919e255c7e8f442689 100644 (file)
@@ -1,5 +1,5 @@
 import * as request from 'supertest'
-import { VideoAbuseUpdate } from '../../../../shared/models/videos/video-abuse-update.model'
+import { VideoAbuseUpdate } from '../../../../shared/models/videos/abuse/video-abuse-update.model'
 import { makeDeleteRequest, makePutBodyRequest } from '..'
 
 function reportVideoAbuse (url: string, token: string, videoId: number | string, reason: string, specialStatus = 200) {
index d3085267f713f648057895c42a03454b7abbb962..8eddaa49660d7038a5c87bf24073ee167ed69441 100644 (file)
@@ -1,5 +1,5 @@
 import { Account } from '../actors'
-import { VideoChannel } from '../videos/video-channel.model'
+import { VideoChannel } from '../videos/channel/video-channel.model'
 import { UserRole } from './user-role'
 import { NSFWPolicyType } from '../videos/nsfw-policy.type'
 
similarity index 75%
rename from shared/models/videos/video-abuse.model.ts
rename to shared/models/videos/abuse/video-abuse.model.ts
index b2319aa0055dfd1dcb84f809ae0b5a79447d040d..4f668795a86cc5a065eeaf42defade88621fdb4d 100644 (file)
@@ -1,5 +1,5 @@
-import { Account } from '../actors'
-import { VideoConstant } from './video-constant.model'
+import { Account } from '../../actors/index'
+import { VideoConstant } from '../video-constant.model'
 import { VideoAbuseState } from './video-abuse-state.model'
 
 export interface VideoAbuse {
similarity index 61%
rename from shared/models/videos/video-caption.model.ts
rename to shared/models/videos/caption/video-caption.model.ts
index 4695224ce5b3f625a9e36b4057125b05e53fb076..d3c73e1a679ae6d8176b75455a6cc07cc87eb543 100644 (file)
@@ -1,4 +1,4 @@
-import { VideoConstant } from './video-constant.model'
+import { VideoConstant } from '../video-constant.model'
 
 export interface VideoCaption {
   language: VideoConstant<string>
similarity index 53%
rename from shared/models/videos/video-channel.model.ts
rename to shared/models/videos/channel/video-channel.model.ts
index 6e61183a72db3c5f3331f4fce330c619da7dcaba..92918f66cae1133a447b7faec249fe8331b858d1 100644 (file)
@@ -1,6 +1,6 @@
-import { Actor } from '../actors/actor.model'
-import { Video } from './video.model'
-import { Account } from '../actors'
+import { Actor } from '../../actors/actor.model'
+import { Video } from '../video.model'
+import { Account } from '../../actors/index'
 
 export interface VideoChannel extends Actor {
   displayName: string
similarity index 75%
rename from shared/models/videos/video-import-create.model.ts
rename to shared/models/videos/import/video-import-create.model.ts
index e76084e067ae608ffeadb88a6c8ea2c464ac57b7..4254773899cdd689ba807ae480aae8dfbf7138ad 100644 (file)
@@ -1,4 +1,4 @@
-import { VideoUpdate } from './video-update.model'
+import { VideoUpdate } from '../video-update.model'
 
 export interface VideoImportCreate extends VideoUpdate {
   targetUrl?: string
similarity index 76%
rename from shared/models/videos/video-import.model.ts
rename to shared/models/videos/import/video-import.model.ts
index 29385400630e42e38d5ddd25821c54e122938c87..e2a56617d6da8d88f687dcc56d2d2e2e2382eb82 100644 (file)
@@ -1,5 +1,5 @@
-import { Video } from './video.model'
-import { VideoConstant } from './video-constant.model'
+import { Video } from '../video.model'
+import { VideoConstant } from '../video-constant.model'
 import { VideoImportState } from './video-import-state.enum'
 
 export interface VideoImport {
index b99dd2d8fdb1058c3715f1bad00a8ba71bd98535..6b579cf3ed5b497f59b79105b207f2c6d5807b8b 100644 (file)
@@ -1,16 +1,16 @@
-export * from './user-video-rate-update.model'
-export * from './user-video-rate.model'
-export * from './user-video-rate.type'
-export * from './video-abuse-state.model'
-export * from './video-abuse-create.model'
-export * from './video-abuse.model'
-export * from './video-abuse-update.model'
-export * from './video-blacklist.model'
-export * from './video-blacklist-create.model'
-export * from './video-blacklist-update.model'
-export * from './video-channel-create.model'
-export * from './video-channel-update.model'
-export * from './video-channel.model'
+export * from './rate/user-video-rate-update.model'
+export * from './rate/user-video-rate.model'
+export * from './rate/user-video-rate.type'
+export * from './abuse/video-abuse-state.model'
+export * from './abuse/video-abuse-create.model'
+export * from './abuse/video-abuse.model'
+export * from './abuse/video-abuse-update.model'
+export * from './blacklist/video-blacklist.model'
+export * from './blacklist/video-blacklist-create.model'
+export * from './blacklist/video-blacklist-update.model'
+export * from './channel/video-channel-create.model'
+export * from './channel/video-channel-update.model'
+export * from './channel/video-channel.model'
 export * from './video-create.model'
 export * from './video-privacy.enum'
 export * from './video-rate.type'
@@ -18,8 +18,8 @@ export * from './video-resolution.enum'
 export * from './video-update.model'
 export * from './video.model'
 export * from './video-state.enum'
-export * from './video-caption-update.model'
-export * from './video-import-create.model'
-export * from './video-import-state.enum'
-export * from './video-import.model'
+export * from './caption/video-caption-update.model'
+export * from './import/video-import-create.model'
+export * from './import/video-import-state.enum'
+export * from './import/video-import.model'
 export { VideoConstant } from './video-constant.model'
index 8dfa96069283529a1bbd0ef5634f7b1d00e79dbb..8e1fbe444269eb7cb78f2f302ad2488475da4b60 100644 (file)
@@ -1,7 +1,7 @@
 import { VideoResolution, VideoState } from '../../index'
 import { Account } from '../actors'
 import { Avatar } from '../avatars/avatar.model'
-import { VideoChannel } from './video-channel.model'
+import { VideoChannel } from './channel/video-channel.model'
 import { VideoPrivacy } from './video-privacy.enum'
 import { VideoScheduleUpdate } from './video-schedule-update.model'
 import { VideoConstant } from './video-constant.model'