[PR #4035] [MERGED] Play first podcast episode in table #4151

Closed
opened 2026-04-25 00:18:33 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/4035
Author: @nichwall
Created: 2/23/2025
Status: Merged
Merged: 2/26/2025
Merged by: @advplyr

Base: masterHead: podcast_episode_play_order


📝 Commits (4)

  • 706b2d7 Add: store for filtered podcast episodes
  • 5f105dc Change: Play button for podcast picks first episode in table
  • 7216999 Fix: double reverse of array
  • fd1c8ee Update episode list to come from component ref, populate queue from table order when playing episode

📊 Changes

2 files changed (+14 additions, -12 deletions)

View changed files

📝 client/components/tables/podcast/LazyEpisodesTable.vue (+8 -8)
📝 client/pages/item/_id/index.vue (+6 -4)

📄 Description

Brief summary

This PR changes the "Play" button on the podcast page to play the first incomplete episode in the table instead of the "newest published". The "first episode" is the top row, and is dependent on the sorting and filtering options.

Which issue is fixed?

Related to https://github.com/advplyr/audiobookshelf/issues/1321.

In-depth Description

This PR adds a new field to the Vuex store to track the podcast episode IDs in the LazyEpisodesTable. This takes the current sorting and filtering of the table into account. Then, when pressing the "Play" button, the uppermost incomplete episode is played instead of the most recently released incomplete episode.

This does not fully fix the issue as mentioned in https://github.com/advplyr/audiobookshelf/issues/1321#issuecomment-2492456282 because the sorting is applied to all podcasts instead of being remembered individually. No changes should need to be made for this logic once the sort order is podcast specific.

Commit overview:

  1. Add the sortedEpisodeIds to the store, which stores the episode IDs of the sorted and filtered table.
  2. Change the logic to use the first row of the table.
  3. Update comments and remove double reverse of array

Additional question Should this just play the very first episode instead of the first incomplete episode? The filter defaults to "incomplete", so if a user has changed to show all episodes, I think it should play whatever is in the first row, regardless of the completion status.

How have you tested this?

Added several podcasts (some serial and some episodic). Changed sort and filter options, navigating between podcasts to ensure that the state was being updated correctly and the first incomplete episode was correctly played.

Screenshots

To illustrate what is happening, the episode in the red box is the episode which will be played when pressing the "Play" button above the description.

Screenshot from 2025-02-22 21-59-02

Screenshot from 2025-02-22 21-59-39


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/4035 **Author:** [@nichwall](https://github.com/nichwall) **Created:** 2/23/2025 **Status:** ✅ Merged **Merged:** 2/26/2025 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `podcast_episode_play_order` --- ### 📝 Commits (4) - [`706b2d7`](https://github.com/advplyr/audiobookshelf/commit/706b2d7d7262890931b15a1bd88754803a641f68) Add: store for filtered podcast episodes - [`5f105dc`](https://github.com/advplyr/audiobookshelf/commit/5f105dc6cca0fbf352cb62123c884583436cc52f) Change: Play button for podcast picks first episode in table - [`7216999`](https://github.com/advplyr/audiobookshelf/commit/72169990ac622cdb35d6ec7f6b017ff1a4a742cf) Fix: double reverse of array - [`fd1c8ee`](https://github.com/advplyr/audiobookshelf/commit/fd1c8ee51332e990ab5633f78fe5179962ca4f85) Update episode list to come from component ref, populate queue from table order when playing episode ### 📊 Changes **2 files changed** (+14 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `client/components/tables/podcast/LazyEpisodesTable.vue` (+8 -8) 📝 `client/pages/item/_id/index.vue` (+6 -4) </details> ### 📄 Description <!-- For Work In Progress Pull Requests, please use the Draft PR feature, see https://github.blog/2019-02-14-introducing-draft-pull-requests/ for further details. If you do not follow this template, the PR may be closed without review. Please ensure all checks pass. If you are a new contributor, the workflows will need to be manually approved before they run. --> ## Brief summary This PR changes the "Play" button on the podcast page to play the first incomplete episode in the table instead of the "newest published". The "first episode" is the top row, and is dependent on the sorting and filtering options. ## Which issue is fixed? Related to https://github.com/advplyr/audiobookshelf/issues/1321. ## In-depth Description This PR adds a new field to the Vuex store to track the podcast episode IDs in the `LazyEpisodesTable`. This takes the current sorting and filtering of the table into account. Then, when pressing the "Play" button, the uppermost incomplete episode is played instead of the most recently released incomplete episode. This does not fully fix the issue as mentioned in https://github.com/advplyr/audiobookshelf/issues/1321#issuecomment-2492456282 because the sorting is applied to all podcasts instead of being remembered individually. No changes should need to be made for this logic once the sort order is podcast specific. Commit overview: 1. Add the `sortedEpisodeIds` to the store, which stores the episode IDs of the sorted and filtered table. 2. Change the logic to use the first row of the table. 3. Update comments and remove double reverse of array **Additional question** Should this just play the very first episode instead of the first incomplete episode? The filter defaults to "incomplete", so if a user has changed to show all episodes, I think it should play whatever is in the first row, regardless of the completion status. ## How have you tested this? Added several podcasts (some serial and some episodic). Changed sort and filter options, navigating between podcasts to ensure that the state was being updated correctly and the first incomplete episode was correctly played. ## Screenshots To illustrate what is happening, the episode in the red box is the episode which will be played when pressing the "Play" button above the description. ![Screenshot from 2025-02-22 21-59-02](https://github.com/user-attachments/assets/d4997072-d107-41cf-9d5a-3ab2cb34efec) ![Screenshot from 2025-02-22 21-59-39](https://github.com/user-attachments/assets/444d2e9e-9e38-4475-ae03-4aa19c860c55) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:18:33 +02:00
adam closed this issue 2026-04-25 00:18:34 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#4151