update: 播客声音上传接口和文档

This commit is contained in:
binaryify
2023-09-07 23:55:26 +08:00
parent 846b7e5fbc
commit dd2365bcb7
7 changed files with 210 additions and 105 deletions
+19 -18
View File
@@ -19,9 +19,8 @@ module.exports = async (query, request) => {
if (query.songFile.name.indexOf('flac') > -1) {
ext = 'flac'
}
const filename =
query.filename ||
query.songName ||
query.songFile.name
.replace('.' + ext, '')
.replace(/\s/g, '')
@@ -102,19 +101,20 @@ module.exports = async (query, request) => {
voiceData: JSON.stringify([
{
name: filename,
autoPublish: true,
autoPublishText: '',
autoPublish: query.autoPublish == 1 ? true : false,
autoPublishText: query.autoPublishText || '',
description: query.description,
// 换成自己的
voiceListId: query.voiceListId,
coverImgId: query.coverImgId,
dfsId: docId,
categoryId: query.categoryId,
secondCategoryId: query.secondCategoryId,
composedSongs: [],
privacy: true,
publishTime: 0,
orderNo: 1,
composedSongs: query.composedSongs
? query.composedSongs.split(',')
: [],
privacy: query.privacy == 1 ? true : false,
publishTime: query.publishTime || 0,
orderNo: query.orderNo || 1,
},
]),
},
@@ -135,19 +135,20 @@ module.exports = async (query, request) => {
voiceData: JSON.stringify([
{
name: filename,
autoPublish: true,
autoPublishText: '',
autoPublish: query.autoPublish == 1 ? true : false,
autoPublishText: query.autoPublishText || '',
description: query.description,
// 换成自己的
voiceListId: query.voiceListId || 994681645,
voiceListId: query.voiceListId,
coverImgId: query.coverImgId,
dfsId: docId,
categoryId: query.categoryId,
secondCategoryId: query.secondCategoryId || 466050,
composedSongs: [],
privacy: true,
publishTime: 0,
orderNo: 1,
secondCategoryId: query.secondCategoryId,
composedSongs: query.composedSongs
? query.composedSongs.split(',')
: [],
privacy: query.privacy == 1 ? true : false,
publishTime: query.publishTime || 0,
orderNo: query.orderNo || 1,
},
]),
},
+3 -2
View File
@@ -1,8 +1,9 @@
module.exports = (query, request) => {
const data = {
fee: '-1',
limit: '200',
podcastName: '',
limit: query.limit || '200',
offset: query.offset || '0',
podcastName: query.podcastName || '',
}
return request(
'POST',