Don't expose constants directly in initializers/
This commit is contained in:
parent
6dd9de95df
commit
74dc3bca2b
114 changed files with 168 additions and 144 deletions
|
@ -1,11 +1,12 @@
|
|||
import { CONFIG, initDatabaseModels } from '../server/initializers'
|
||||
import { WEBSERVER } from '../server/initializers/constants'
|
||||
import { ActorFollowModel } from '../server/models/activitypub/actor-follow'
|
||||
import { VideoModel } from '../server/models/video/video'
|
||||
import { ActorModel } from '../server/models/activitypub/actor'
|
||||
import {
|
||||
getAccountActivityPubUrl,
|
||||
getVideoActivityPubUrl,
|
||||
getVideoAnnounceActivityPubUrl,
|
||||
getVideoActivityPubUrl, getVideoChannelActivityPubUrl,
|
||||
getVideoChannelActivityPubUrl,
|
||||
getVideoCommentActivityPubUrl
|
||||
} from '../server/lib/activitypub'
|
||||
import { VideoShareModel } from '../server/models/video/video-share'
|
||||
|
@ -14,6 +15,7 @@ import { getServerActor } from '../server/helpers/utils'
|
|||
import { AccountModel } from '../server/models/account/account'
|
||||
import { VideoChannelModel } from '../server/models/video/video-channel'
|
||||
import { VideoStreamingPlaylistModel } from '../server/models/video/video-streaming-playlist'
|
||||
import { initDatabaseModels } from '../server/initializers'
|
||||
|
||||
run()
|
||||
.then(() => process.exit(0))
|
||||
|
@ -62,7 +64,7 @@ async function run () {
|
|||
actor.url = newUrl
|
||||
actor.inboxUrl = newUrl + '/inbox'
|
||||
actor.outboxUrl = newUrl + '/outbox'
|
||||
actor.sharedInboxUrl = CONFIG.WEBSERVER.URL + '/inbox'
|
||||
actor.sharedInboxUrl = WEBSERVER.URL + '/inbox'
|
||||
actor.followersUrl = newUrl + '/followers'
|
||||
actor.followingUrl = newUrl + '/following'
|
||||
|
||||
|
@ -123,8 +125,8 @@ async function run () {
|
|||
}
|
||||
|
||||
for (const playlist of video.VideoStreamingPlaylists) {
|
||||
playlist.playlistUrl = CONFIG.WEBSERVER.URL + VideoStreamingPlaylistModel.getHlsMasterPlaylistStaticPath(video.uuid)
|
||||
playlist.segmentsSha256Url = CONFIG.WEBSERVER.URL + VideoStreamingPlaylistModel.getHlsSha256SegmentsStaticPath(video.uuid)
|
||||
playlist.playlistUrl = WEBSERVER.URL + VideoStreamingPlaylistModel.getHlsMasterPlaylistStaticPath(video.uuid)
|
||||
playlist.segmentsSha256Url = WEBSERVER.URL + VideoStreamingPlaylistModel.getHlsSha256SegmentsStaticPath(video.uuid)
|
||||
|
||||
await playlist.save()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue