fix: aplayer lrc

This commit is contained in:
DIYgod 2023-04-18 00:39:40 +01:00
parent 50f65cbdca
commit a20b243e0d
No known key found for this signature in database
3 changed files with 3 additions and 7 deletions

View File

@ -4,7 +4,7 @@
"link": "https://github.com/Crossbell-Box/xLog/graphs/contributors",
"list": [
10, 30, 12, 32022, 32179, 45, 19, 4583, 4381, 32168, 33446, 33492, 52055,
153, 50143, 51470, 31132, 45089, 50351, 52343, 5825
153, 50143, 51470, 31132, 45089, 50351, 52343, 5825, 51406
]
}
]

View File

@ -15,9 +15,6 @@ export const APlayer: React.FC<
if (cover) {
cover = toGateway(cover)
}
if (lrc) {
lrc = toGateway(lrc)
}
if (name) {
name = name.replace(/^user-content-/, "")
}

View File

@ -394,10 +394,9 @@ export default function SubdomainEditor() {
try {
if (
!file.type.startsWith("image/") &&
!file.type.startsWith("audio/") &&
!(file.type === "text/plain" && file.name.endsWith(".lrc"))
!file.type.startsWith("audio/")
) {
throw new Error("You can only upload images, audios or .lrc files")
throw new Error("You can only upload images and audios")
}
const { key } = await uploadFile(file)