mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
Remove deprecated server code
This commit is contained in:
parent
11fd3a4618
commit
3842a527f6
39 changed files with 40 additions and 173 deletions
|
@ -20,7 +20,7 @@ function isPlaylistRedundancyUrlValid (url: any) {
|
|||
isActivityPubUrlValid(url.href)
|
||||
}
|
||||
|
||||
// TODO: compat with < 6.1, use isRemoteVideoUrlValid instead in 7.0
|
||||
// TODO: compat with < 6.1, use isRemoteVideoUrlValid instead in 8.0
|
||||
function isRedundancyUrlVideoValid (url: any) {
|
||||
const size = url.size || url['_:size']
|
||||
const fps = url.fps || url['_fps']
|
||||
|
|
|
@ -7,7 +7,7 @@ import { isActivityPubUrlValid } from './misc.js'
|
|||
export function isPlaylistObjectValid (object: PlaylistObject) {
|
||||
if (!object || object.type !== 'Playlist') return false
|
||||
|
||||
// TODO: compat with < 6.1, remove in 7.0
|
||||
// TODO: compat with < 6.1, remove in 8.0
|
||||
if (!object.uuid && object['identifier']) object.uuid = object['identifier']
|
||||
|
||||
return validator.default.isInt(object.totalItems + '') &&
|
||||
|
|
|
@ -47,7 +47,7 @@ export function sanitizeAndCheckVideoTorrentObject (video: VideoObject) {
|
|||
if (!setValidStoryboard(video)) return fail('preview (storyboard)')
|
||||
if (!setValidLicence(video)) return fail('licence')
|
||||
|
||||
// TODO: compat with < 6.1, remove in 7.0
|
||||
// TODO: compat with < 6.1, remove in 8.0
|
||||
if (!video.uuid && video['identifier']) video.uuid = video['identifier']
|
||||
|
||||
// Default attributes
|
||||
|
|
|
@ -7,7 +7,7 @@ import { isActivityPubVideoDurationValid, isObjectValid } from './misc.js'
|
|||
function isWatchActionObjectValid (action: WatchActionObject) {
|
||||
if (!action || action.type !== 'WatchAction') return false
|
||||
|
||||
// TODO: compat with < 6.1, remove in 7.0
|
||||
// TODO: compat with < 6.1, remove in 8.0
|
||||
if (!action.uuid && action['identifier']) action.uuid = action['identifier']
|
||||
|
||||
if (action['_:actionStatus'] && !action.actionStatus) action.actionStatus = action['_:actionStatus']
|
||||
|
@ -43,7 +43,7 @@ function isLocationValid (location: any) {
|
|||
|
||||
function areWatchSectionsValid (sections: WatchActionObject['watchSections']) {
|
||||
return Array.isArray(sections) && sections.every(s => {
|
||||
// TODO: compat with < 6.1, remove in 7.0
|
||||
// TODO: compat with < 6.1, remove in 8.0
|
||||
if (s['_:endTimestamp'] && !s.endTimestamp) s.endTimestamp = s['_:endTimestamp']
|
||||
|
||||
return isVideoTimeValid(s.startTimestamp) && isVideoTimeValid(s.endTimestamp)
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
function isValidPlayerMode (value: any) {
|
||||
// TODO: remove webtorrent in v7
|
||||
return value === 'webtorrent' || value === 'web-video' || value === 'p2p-media-loader'
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export {
|
||||
isValidPlayerMode
|
||||
export function isValidPlayerMode (value: any) {
|
||||
return value === 'web-video' || value === 'p2p-media-loader'
|
||||
}
|
||||
|
|
|
@ -1,12 +1,5 @@
|
|||
import { exists } from './misc.js'
|
||||
|
||||
function isValidCreateTranscodingType (value: any) {
|
||||
return exists(value) &&
|
||||
(value === 'hls' || value === 'webtorrent' || value === 'web-video') // TODO: remove webtorrent in v7
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export {
|
||||
isValidCreateTranscodingType
|
||||
export function isValidCreateTranscodingType (value: any) {
|
||||
return exists(value) && (value === 'hls' || value === 'web-video')
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue