diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-11 14:36:07 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-11 14:36:07 +0200 |
commit | 7c3a6636fdd9b905345996d825c249a18add8a2c (patch) | |
tree | 2392a297d579345837fc2ed9f225693888ee1bd4 /server/models/video/video.ts | |
parent | fd6a74a83594bfb59e28bf9cae71a39884ebcc2f (diff) | |
download | PeerTube-7c3a6636fdd9b905345996d825c249a18add8a2c.tar.gz PeerTube-7c3a6636fdd9b905345996d825c249a18add8a2c.tar.zst PeerTube-7c3a6636fdd9b905345996d825c249a18add8a2c.zip |
Move get* video methods to formatter
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r-- | server/models/video/video.ts | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 2d8b7b653..f3782fb43 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -1556,26 +1556,6 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> { | |||
1556 | } | 1556 | } |
1557 | } | 1557 | } |
1558 | 1558 | ||
1559 | static getCategoryLabel (id: number) { | ||
1560 | return VIDEO_CATEGORIES[id] || 'Misc' | ||
1561 | } | ||
1562 | |||
1563 | static getLicenceLabel (id: number) { | ||
1564 | return VIDEO_LICENCES[id] || 'Unknown' | ||
1565 | } | ||
1566 | |||
1567 | static getLanguageLabel (id: string) { | ||
1568 | return VIDEO_LANGUAGES[id] || 'Unknown' | ||
1569 | } | ||
1570 | |||
1571 | static getPrivacyLabel (id: number) { | ||
1572 | return VIDEO_PRIVACIES[id] || 'Unknown' | ||
1573 | } | ||
1574 | |||
1575 | static getStateLabel (id: number) { | ||
1576 | return VIDEO_STATES[id] || 'Unknown' | ||
1577 | } | ||
1578 | |||
1579 | isBlacklisted () { | 1559 | isBlacklisted () { |
1580 | return !!this.VideoBlacklist | 1560 | return !!this.VideoBlacklist |
1581 | } | 1561 | } |