Skip to content

App option to toggle showing podcast artwork embedded in show notes#1854

Merged
MiSikora merged 15 commits intoAutomattic:mainfrom
owenlejeune:episode_artwork
Feb 27, 2024
Merged

App option to toggle showing podcast artwork embedded in show notes#1854
MiSikora merged 15 commits intoAutomattic:mainfrom
owenlejeune:episode_artwork

Conversation

@owenlejeune
Copy link
Copy Markdown
Contributor

Description

Recently, a change was made to show artwork that is embedded in a podcast episode's show notes by default. This adds a toggle to appearance settings that functions similarly to the existing toggle for embedded artwork.

Fixes #1709

Testing Instructions

  1. Begin playing an episode that includes artwork embedded in show notes (eg. https://pcast.pocketcasts.net/podcast/ede41160-9eeb-012f-3e7d-525400c11844)
  2. Observe that the default podcast artwork is shown in both the miniplayer and fullscreen player.
  3. Navigate to Settings -> Appearance and toggle "Use episode artwork"
  4. Observe that embedded artwork is show in fullscreen and miniplayer (playback state may need to be toggled for miniplayer to be updated)

Screenshots or Screencast

Screenshot 2024-02-17 at 11 22 16 Screenshot 2024-02-17 at 11 22 19 Screenshot 2024-02-17 at 11 22 32 Screenshot 2024-02-17 at 11 22 28

Checklist

  • If this is a user-facing change, I have added an entry in CHANGELOG.md
  • Ensure the linter passes (./gradlew spotlessApply to automatically apply formatting/linting)
  • I have considered whether it makes sense to add tests for my changes
  • All strings that need to be localized are in modules/services/localization/src/main/res/values/strings.xml
  • Any jetpack compose components I added or changed are covered by compose previews

I have tested any UI changes...

  • with different themes
  • with a landscape orientation
  • with the device set to have a large display and font size
  • for accessibility with TalkBack

@owenlejeune owenlejeune requested a review from a team as a code owner February 17, 2024 17:24
@owenlejeune owenlejeune requested a review from MiSikora February 17, 2024 17:24
@owenlejeune
Copy link
Copy Markdown
Contributor Author

@MiSikora I'm happy to make any changes to the strings if you have better suggestions as well

@CookieyedCodes
Copy link
Copy Markdown

I'd say instead of calling it episode artwork I would call it RSS episode artwork 🤔🤔 and call Embedded artwork MP3 artwork 🤔🤔, my two cents and thus exclude the extra line 😉

@owenlejeune
Copy link
Copy Markdown
Contributor Author

@CookieyedCodes that's not a bad idea, I agree that it might make sense to change the copy for "embedded" artwork to distinguish between RSS and MP3 artwork

@owenlejeune
Copy link
Copy Markdown
Contributor Author

Updated the copy to better distinguish between MP3 and RSS artwork
Screenshot 2024-02-18 at 13 01 27

Copy link
Copy Markdown
Contributor

@MiSikora MiSikora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! I left some comments. There's also two bugs that I found.

  1. Mini player artwork doesn't update with the setting. You can see that when the player is paused toggling the setting doesn't affect the mini player artwork. When the player is playing it works sometimes. I assume it has something to do with the state but I haven't investigated it.
screen-20240221-122019.mp4
  1. Notification center always uses RSS artwork.
screen-20240221-122243.mp4

Comment thread modules/services/localization/src/main/res/values/strings.xml Outdated
@owenlejeune
Copy link
Copy Markdown
Contributor Author

@MiSikora I address the comments you made. One note is that the notification artwork doesn't seem to be reflected immediately if a podcast is playing, but is respected if the podcast is paused. If a podcast is playing when this setting is changed, the change will be reflected when the user changes the playback state. I'm not sure why it's not reflected immediately. I suspect this is not a setting that users will be changing frequently so I'm not sure if that's a blocker or not.

Untitled.mov

Comment thread modules/services/localization/src/main/res/values/strings.xml Outdated
@MiSikora
Copy link
Copy Markdown
Contributor

I address the comments you made. One note is that the notification artwork doesn't seem to be reflected immediately if a podcast is playing, but is respected if the podcast is paused. If a podcast is playing when this setting is changed, the change will be reflected when the user changes the playback state. I'm not sure why it's not reflected immediately. I suspect this is not a setting that users will be changing frequently so I'm not sure if that's a blocker or not.

Yeah, this is perfectly fine. 👍

Copy link
Copy Markdown
Contributor

@MiSikora MiSikora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I won't be able to test it until Monday but code-wise it looks good. I just left two minor comments.

@MiSikora
Copy link
Copy Markdown
Contributor

MiSikora commented Feb 26, 2024

The miniplayer is now broken.

Miniplayer artwork doesn't toggle.

screen-20240226-084243.mp4

Miniplayer doesn't switch artwork at all. Even when playing a different podcast.

screen-20240226-084535.mp4

Miniplayer doesn't close.

screen-20240226-085051.mp4

Another issue is with the chapter artwork. I'm not 100% if this is should happen but I personally would expect this toggle to disable the chapter artwork as well. No changes need. See #1854 (comment) for an update.

screen-20240226-085250.mp4

@CookieyedCodes
Copy link
Copy Markdown

From my understanding the toggle only applys to the next podcast so it makes sence the artwork cache is updated for the miniplayer when it changes episodes 🤔

Miniplayer should close tho hmmmm

Well chapter artwork is embedded in the audio file so while it probably should disable it would be a completely different toggle in my opinion

@MiSikora
Copy link
Copy Markdown
Contributor

From my understanding the toggle only applys to the next podcast so it makes sence the artwork cache is updated for the miniplayer when it changes episodes 🤔

Sorry, I don't understand your point. Are you agreeing with me that it is an issue that the miniplayer doesn't update the artwork when a different episode/podcast is played?

Well chapter artwork is embedded in the audio file so while it probably should disable it would be a completely different toggle in my opinion

If that's the case we should leave this behavior as is. 👍

@CookieyedCodes
Copy link
Copy Markdown

Regarding the confusion, from my understanding the miniplayer artwork caches when the episode loaded not during the episode (same with the player from my understanding, which is probably harder to fix tbh) just saying why it may be happening 🤔 🤔

@MiSikora
Copy link
Copy Markdown
Contributor

MiSikora commented Feb 26, 2024

It might be caching but this change introduced a flag that changes the main player artwork on being toggled. You can see this in my first video in here - #1854 (review). If the main player respects the toggle with live updates so should the mini player. I'm fine with notification center lagging a bit because it is a different beast and would require probably many more changes.

@CookieyedCodes
Copy link
Copy Markdown

Agreed 👍👍

@owenlejeune
Copy link
Copy Markdown
Contributor Author

@MiSikora that's really odd, in my testing I'm pretty sure I was seeing the mini player artwork being updated with that toggle as expected. I'll take another look sometime today

@owenlejeune
Copy link
Copy Markdown
Contributor Author

owenlejeune commented Feb 27, 2024

@MiSikora I was able to repro your issues. Looks like this was a Coroutine Context issue. Flows in MainActivity were launched using Dispatchers.Default while the mini player uses Dispatchers.Main. It looks like this combined flow is the only member of MainActivity using the coroutine context so I changed it to Dispatchers.Main and I'm not longer seeing any issues with the mini player.

Comment thread app/src/main/java/au/com/shiftyjelly/pocketcasts/ui/MainActivity.kt Outdated
Comment thread app/src/main/java/au/com/shiftyjelly/pocketcasts/ui/MainActivity.kt Outdated
Comment thread app/src/main/java/au/com/shiftyjelly/pocketcasts/ui/MainActivity.kt Outdated
MiSikora

This comment was marked as off-topic.

@MiSikora MiSikora dismissed their stale review February 27, 2024 07:11

Approved a wrong PR. I will review once again after the changes are made.

Copy link
Copy Markdown
Contributor

@MiSikora MiSikora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for this PR.

You need to sync with the main branch and move your changelog entry to the 7.59 release.

@MiSikora MiSikora added the [Type] Enhancement Improve an existing feature. label Feb 27, 2024
@MiSikora MiSikora added this to the 7.59 milestone Feb 27, 2024
@owenlejeune
Copy link
Copy Markdown
Contributor Author

@MiSikora sync and CHANGELOG update are complete

Comment thread CHANGELOG.md Outdated
@MiSikora MiSikora mentioned this pull request Feb 27, 2024
9 tasks
@MiSikora MiSikora merged commit e026b94 into Automattic:main Feb 27, 2024
@owenlejeune owenlejeune deleted the episode_artwork branch February 27, 2024 20:38
@MiSikora MiSikora mentioned this pull request Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Enhancement Improve an existing feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add setting to toggle episode artwork from podcast feed

3 participants