mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Fix xml danmaku content (fix #2875)
This commit is contained in:
parent
a486792ea8
commit
bc5be9fcce
File diff suppressed because one or more lines are too long
@ -247,9 +247,12 @@ export const getBlobByType = async (type: DanmakuDownloadType, input: {
|
||||
const danmaku = await new JsonDanmaku(aid, cid).fetchInfo()
|
||||
switch (type) {
|
||||
case 'xml': {
|
||||
return new Blob([
|
||||
danmaku.xmlDanmakus.map(x => new XmlDanmaku(x).text()).join('\n'),
|
||||
], {
|
||||
const xmlText = `
|
||||
<?xml version="1.0" encoding="UTF-8"?><i><chatserver>chat.bilibili.com</chatserver><chatid>${cid}</chatid><mission>0</mission><maxlimit>${danmaku.xmlDanmakus.length}</maxlimit><state>0</state><real_name>0</real_name><source>k-v</source>
|
||||
${danmaku.xmlDanmakus.map(x => new XmlDanmaku(x).text()).join('\n')}
|
||||
</i>
|
||||
`.trim()
|
||||
return new Blob([xmlText], {
|
||||
type: 'text/xml',
|
||||
})
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user