fix(route): 内蒙古广播电视台点播enclosure_type缺失 (#11360)
This commit is contained in:
+20
-14
@@ -19,20 +19,26 @@ module.exports = async (ctx) => {
|
||||
|
||||
const data = response.data;
|
||||
|
||||
const items = data.map((item) => ({
|
||||
title: item.title,
|
||||
link: item.content_url,
|
||||
author: item.column_name,
|
||||
pubDate: timezone(parseDate(item.publish_time), +8),
|
||||
description: art(path.join(__dirname, 'templates/description.art'), {
|
||||
type: item.type,
|
||||
image: item.index_pic,
|
||||
file: `${hostUrl}/${item.target_path}${item.target_filename}`,
|
||||
}),
|
||||
enclosure_url: `${hostUrl}/${item.target_path}${item.target_filename}`,
|
||||
itunes_duration: item.video.duration,
|
||||
itunes_item_image: item.index_pic,
|
||||
}));
|
||||
const items = data.map((item) => {
|
||||
const enclosure_url = `${hostUrl}/${item.target_path}${item.target_filename}`;
|
||||
const enclosure_type = `${item.type}/${enclosure_url.match(/\.(\w+)$/)[1]}`;
|
||||
|
||||
return {
|
||||
title: item.title,
|
||||
link: item.content_url,
|
||||
author: item.column_name,
|
||||
pubDate: timezone(parseDate(item.publish_time), +8),
|
||||
description: art(path.join(__dirname, 'templates/description.art'), {
|
||||
type: item.type,
|
||||
image: item.index_pic,
|
||||
file: enclosure_url,
|
||||
}),
|
||||
enclosure_url,
|
||||
enclosure_type,
|
||||
itunes_duration: item.video.duration,
|
||||
itunes_item_image: item.index_pic,
|
||||
};
|
||||
});
|
||||
|
||||
const author = data[0].column_name;
|
||||
const imageUrl = data[0].column_info.indexpic;
|
||||
|
||||
Reference in New Issue
Block a user