From 68b4e172f52d9da060424f097434892aaec775c3 Mon Sep 17 00:00:00 2001 From: Zhi Yang Date: Sun, 19 Apr 2020 19:00:37 +0800 Subject: [PATCH] feat: Support itunes_category and itunes_explicit (#4483) --- lib/routes/ximalaya/album.js | 2 ++ lib/views/rss.art | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/routes/ximalaya/album.js b/lib/routes/ximalaya/album.js index 8d114f9779..fb6a0944b8 100644 --- a/lib/routes/ximalaya/album.js +++ b/lib/routes/ximalaya/album.js @@ -66,6 +66,8 @@ module.exports = async (ctx) => { enclosure_url: enclosure_url, enclosure_length: enclosure_length, enclosure_type: 'audio/x-m4a', + itunes_category: album_category, + itunes_explicit: 'clean', // 内容是否为限制级 }; return Promise.resolve(resultItem); }) diff --git a/lib/views/rss.art b/lib/views/rss.art index e59f4c5dcd..c9d782e072 100644 --- a/lib/views/rss.art +++ b/lib/views/rss.art @@ -35,6 +35,8 @@ {{ if $value.itunes_item_image }}{{ /if }} {{ if $value.enclosure_url }}{{ /if }} {{ if itunes_author && $value.itunes_duration }}{{ $value.itunes_duration }} {{ /if }} + {{ if itunes_author && $value.itunes_category }}{{ $value.itunes_category }} {{ /if }} + {{ if itunes_author && $value.itunes_explicit }}{{ $value.itunes_explicit }} {{ /if }} {{ if $value.author }}{{ /if }} {{ if typeof $value.category === 'string' }} {{ $value.category }}