Verified Commit 32fde390 authored by Chocobozzz's avatar Chocobozzz
Browse files

Use unknown when category is not set

Unstead of Misc, that could be a real category
parent 1f6dd008
......@@ -90,7 +90,6 @@ Object.values(VIDEO_CATEGORIES)
// More keys
Object.assign(serverKeys, {
Misc: 'Misc',
Unknown: 'Unknown'
})
......
......@@ -488,7 +488,7 @@ function videoModelToActivityPubObject (video: MVideoAP): VideoObject {
}
function getCategoryLabel (id: number) {
return VIDEO_CATEGORIES[id] || 'Misc'
return VIDEO_CATEGORIES[id] || 'Unknown'
}
function getLicenceLabel (id: number) {
......
......@@ -41,7 +41,7 @@ async function checkVideosServer1 (server: PeerTubeServer, idHttp: string, idMag
const videoTorrent = await server.videos.get({ id: idTorrent })
for (const video of [ videoMagnet, videoTorrent ]) {
expect(video.category.label).to.equal('Misc')
expect(video.category.label).to.equal('Unknown')
expect(video.licence.label).to.equal('Unknown')
expect(video.language.label).to.equal('Unknown')
expect(video.nsfw).to.be.false
......
......@@ -59,7 +59,7 @@ async function completeVideoCheck (
expect(video.name).to.equal(attributes.name)
expect(video.category.id).to.equal(attributes.category)
expect(video.category.label).to.equal(attributes.category !== null ? VIDEO_CATEGORIES[attributes.category] : 'Misc')
expect(video.category.label).to.equal(attributes.category !== null ? VIDEO_CATEGORIES[attributes.category] : 'Unknown')
expect(video.licence.id).to.equal(attributes.licence)
expect(video.licence.label).to.equal(attributes.licence !== null ? VIDEO_LICENCES[attributes.licence] : 'Unknown')
expect(video.language.id).to.equal(attributes.language)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment