diff --git a/ts/category.ts b/ts/category.ts index e9c7f52..b21ba00 100644 --- a/ts/category.ts +++ b/ts/category.ts @@ -15,7 +15,8 @@ class VideoMeta { let link = document.createElement('a') if(this.name) { - link.href = `/clip/${this.category}/${this.name}` + const file_name = this.name.slice(0, this.name.lastIndexOf('.')) + link.href = `/clip/${this.category}/${file_name}` link.text = this.name for(const chars of ['.', '-', '_', 'mp4', 'mkv', 'webm']) { link.text = link.text.replace(chars, ' ')