[Bug]: only download 1 episode #1235

Closed
opened 2026-04-24 23:36:35 +02:00 by adam · 4 comments
Owner

Originally created by @Rookiewan on GitHub (Jul 5, 2023).

Describe the issue

I have an rss address and the returned address is like this:

<item>
    <title>
        <![CDATA[ 错失金曲奖的赵雷,不需要任何遗憾 ]]>
    </title>
    <description>
        <![CDATA[ <img src="https://p2.music.126.net/09kdbroxvw5wHw6XlPMjhQ==/109951168713843130.jpg" referrerpolicy="no-referrer"><div> <p>第三十四届金曲奖落下帷幕,因为之前公布的名单当中,大家发现赵雷入围了最佳华语男歌手,所以很多喜欢民谣的听众也非常关注这次颁奖。不知道是不是意料之中,赵雷这次并没有坐上歌王的宝座,但对于喜欢雷子的歌迷来说,或者对于我这个喜欢雷子的歌迷来说,丝毫没有遗憾。</p> <p></p> <p></p> <p>在2000年左右,金曲奖被视作流行音乐的最高荣誉,当年华语乐坛如日中天,一众天王天后神仙打架,周杰伦至今还再抱怨,自己的最佳新人奖被孙燕姿获得,十分遗憾。虽然发展到今天的金曲奖充满了争议,但依然是一位华语歌手,不能忽视的荣誉。但这份荣誉,赵雷是否期待,而作为歌迷的我们,又如何看待呢。我仅以自己的观点,与大家分享我的心情。我觉得,错失这一荣誉,对赵雷来说,未尝不是一件好事。</p> </div><div><audio src="https://music.163.com/song/media/outer/url?id=2060749176.mp3" controls="controls"></audio><p>时长: 29:08</p><p><a href="https://music.163.com/program/2525436054">查看节目</a></p></div> ]]>
    </description>
    <pubDate>Mon, 03 Jul 2023 08:55:45 GMT</pubDate>
    <guid isPermaLink="false">https://music.163.com/program/2525436054</guid>
    <link>https://music.163.com/program/2525436054</link>
    <itunes:image href="https://p2.music.126.net/09kdbroxvw5wHw6XlPMjhQ==/109951168713843130.jpg" />
    <enclosure url="https://music.163.com/song/media/outer/url?id=2060749176.mp3" type="audio/mpeg" />
    <itunes:duration>0:29:08</itunes:duration>
    <author>
        <![CDATA[ 民谣在路上onthefolk ]]>
    </author>
</item>

The enclosure url is "https://music.163.com/song/media/outer/url?id=2060749176.mp3" and i found the filter code in https://github.com/advplyr/audiobookshelf/blob/65cf928afe04abf6fdbc5079c35890dc31fbf19a/client/components/modals/podcast/EpisodeFeed.vue#L201C27-L201C36, It is divided by ?, and only the first one is taken, As a result, only one episode can be downloaded.

Steps to reproduce the issue

  1. add rss feed: https://rsshub.app/163/music/djradio/331652055
  2. select one episode

Audiobookshelf version

v2.2.23

How are you running audiobookshelf?

Docker

Originally created by @Rookiewan on GitHub (Jul 5, 2023). ### Describe the issue I have an rss address and the returned address is like this: ```xml <item> <title> <![CDATA[ 错失金曲奖的赵雷,不需要任何遗憾 ]]> </title> <description> <![CDATA[ <img src="https://p2.music.126.net/09kdbroxvw5wHw6XlPMjhQ==/109951168713843130.jpg" referrerpolicy="no-referrer"><div> <p>第三十四届金曲奖落下帷幕,因为之前公布的名单当中,大家发现赵雷入围了最佳华语男歌手,所以很多喜欢民谣的听众也非常关注这次颁奖。不知道是不是意料之中,赵雷这次并没有坐上歌王的宝座,但对于喜欢雷子的歌迷来说,或者对于我这个喜欢雷子的歌迷来说,丝毫没有遗憾。</p> <p></p> <p></p> <p>在2000年左右,金曲奖被视作流行音乐的最高荣誉,当年华语乐坛如日中天,一众天王天后神仙打架,周杰伦至今还再抱怨,自己的最佳新人奖被孙燕姿获得,十分遗憾。虽然发展到今天的金曲奖充满了争议,但依然是一位华语歌手,不能忽视的荣誉。但这份荣誉,赵雷是否期待,而作为歌迷的我们,又如何看待呢。我仅以自己的观点,与大家分享我的心情。我觉得,错失这一荣誉,对赵雷来说,未尝不是一件好事。</p> </div><div><audio src="https://music.163.com/song/media/outer/url?id=2060749176.mp3" controls="controls"></audio><p>时长: 29:08</p><p><a href="https://music.163.com/program/2525436054">查看节目</a></p></div> ]]> </description> <pubDate>Mon, 03 Jul 2023 08:55:45 GMT</pubDate> <guid isPermaLink="false">https://music.163.com/program/2525436054</guid> <link>https://music.163.com/program/2525436054</link> <itunes:image href="https://p2.music.126.net/09kdbroxvw5wHw6XlPMjhQ==/109951168713843130.jpg" /> <enclosure url="https://music.163.com/song/media/outer/url?id=2060749176.mp3" type="audio/mpeg" /> <itunes:duration>0:29:08</itunes:duration> <author> <![CDATA[ 民谣在路上onthefolk ]]> </author> </item> ``` The enclosure url is "https://music.163.com/song/media/outer/url?id=2060749176.mp3" and i found the filter code in https://github.com/advplyr/audiobookshelf/blob/65cf928afe04abf6fdbc5079c35890dc31fbf19a/client/components/modals/podcast/EpisodeFeed.vue#L201C27-L201C36, It is divided by ?, and only the first one is taken, As a result, only one episode can be downloaded. ### Steps to reproduce the issue 1. add rss feed: https://rsshub.app/163/music/djradio/331652055 2. select one episode ### Audiobookshelf version v2.2.23 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:36:35 +02:00
adam closed this issue 2026-04-24 23:36:36 +02:00
Author
Owner

@advplyr commented on GitHub (Jul 7, 2023):

This seems like a unique case but I fixed this by leaving the id in the query string.

For future reference, this is the comment I made in the code that explains the reasoning.

 * RSS feed episode url is used for matching with existing downloaded episodes.
 * Some RSS feeds include timestamps in the episode url (e.g. patreon) that can change on requests.
 * These need to be removed in order to detect the same episode each time the feed is pulled.
 *
 * An RSS feed may include an `id` in the query string. In these cases we want to leave the `id`.
@advplyr commented on GitHub (Jul 7, 2023): This seems like a unique case but I fixed this by leaving the `id` in the query string. For future reference, this is the comment I made in the code that explains the reasoning. * RSS feed episode url is used for matching with existing downloaded episodes. * Some RSS feeds include timestamps in the episode url (e.g. patreon) that can change on requests. * These need to be removed in order to detect the same episode each time the feed is pulled. * * An RSS feed may include an `id` in the query string. In these cases we want to leave the `id`.
Author
Owner

@deanishe commented on GitHub (Jul 7, 2023):

Is it not possible to key downloads by the item guid, at least preferentially?

Trying to infer meaning from other applications' query strings sounds like a can of worms.

@deanishe commented on GitHub (Jul 7, 2023): Is it not possible to key downloads by the item `guid`, at least preferentially? Trying to infer meaning from other applications' query strings sounds like a can of worms.
Author
Owner

@advplyr commented on GitHub (Jul 8, 2023):

Yeah last year when I was looking into this I was surprised there was no unique identifier for RSS feed items. I can't remember why I didn't use the GUID, maybe because it is not on every RSS feed.

Currently this is only used in that episode select modal so it'll be very easy to update this to GUID if that is reliable. Or like you said, we could try GUID first, then fallback to the url.

@advplyr commented on GitHub (Jul 8, 2023): Yeah last year when I was looking into this I was surprised there was no unique identifier for RSS feed items. I can't remember why I didn't use the GUID, maybe because it is not on every RSS feed. Currently this is only used in that episode select modal so it'll be very easy to update this to GUID if that is reliable. Or like you said, we could try GUID first, then fallback to the url.
Author
Owner

@advplyr commented on GitHub (Jul 21, 2023):

Fixed in v2.3.0

@advplyr commented on GitHub (Jul 21, 2023): Fixed in v2.3.0
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1235