1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Add schema.org tags to videos

This commit is contained in:
Chocobozzz 2018-01-23 17:09:06 +01:00
parent 63c4b44961
commit 093237cf79
No known key found for this signature in database
GPG key ID: 583A612D890159BE
2 changed files with 26 additions and 2 deletions

View file

@ -990,8 +990,7 @@ export class VideoModel extends Model<VideoModel> {
type: 'Video' as 'Video',
id: this.url,
name: this.name,
// https://www.w3.org/TR/activitystreams-vocabulary/#dfn-duration
duration: 'PT' + this.duration + 'S',
duration: this.getActivityStreamDuration(),
uuid: this.uuid,
tag,
category,
@ -1161,6 +1160,11 @@ export class VideoModel extends Model<VideoModel> {
return unlinkPromise(torrentPath)
}
getActivityStreamDuration () {
// https://www.w3.org/TR/activitystreams-vocabulary/#dfn-duration
return 'PT' + this.duration + 'S'
}
private getBaseUrls () {
let baseUrlHttp
let baseUrlWs