Skip to content

fix: show paid badges in local playlists - #91

Merged
InfinityLoop1308 merged 2 commits into
InfinityLoop1308:devfrom
75ohmantenna:fix/paid-badge-local-playlists
Aug 22, 2026
Merged

fix: show paid badges in local playlists#91
InfinityLoop1308 merged 2 commits into
InfinityLoop1308:devfrom
75ohmantenna:fix/paid-badge-local-playlists

Conversation

@75ohmantenna

Copy link
Copy Markdown
Contributor

Summary

  • Show the Paid badge for paid videos in local playlists instead of displaying their duration in both the classic and experimental Compose UIs.
  • Keep the playback-progress overlay hidden for paid playlist entries, including during state-only UI updates.
  • Preserve the membership flag when converting a PlaylistStreamEntry back into a StreamInfoItem.
  • Add focused regression tests for playlist-entry conversion and paid Compose presentation.

Problem

Paid or members-only videos display a Paid badge in channel and “What’s New” feeds. The same videos display their duration after being saved to a local playlist.

The paid state is already persisted in StreamEntity.isPaid, but the local-playlist item holder did not read it. In addition, PlaylistStreamEntry.toStreamInfoItem() did not transfer the flag to StreamInfoItem.requiresMembership.

Implementation

LocalPlaylistStreamItemHolder now:

  • checks StreamEntity.isPaid before rendering the duration;
  • applies the existing Paid-badge text and styling;
  • hides playback progress for paid entries; and
  • prevents state-only updates from restoring the progress overlay.

PlaylistStreamEntry.toStreamInfoItem() now copies isPaid using setRequiresMembership().

The experimental Compose local-item path now uses the same paid-badge precedence and suppresses playback progress for paid entries. Its presentation logic is covered by a focused unit test.

Testing

  • Confirmed that the regression test fails on the unmodified dev branch.
  • Confirmed that the regression test passes with this change.
  • Ran testDebugUnitTest.
  • Ran lintDebug.
  • Ran assembleDebug.
  • Tested successfully on a Pixel 6a running the latest GrapheneOS build.

Related issue

Refs #90

#90


Disclaimer: This PR and fix were generated with AI assistance, but I have personally read and tested the code to verify that it functions on my device and to ensure its validity. A flesh-and-blood human typed this disclaimer.

75ohmantenna and others added 2 commits August 19, 2026 17:56
Show the paid badge instead of duration or playback progress for paid
local-playlist entries, and preserve the membership flag when converting
playlist entries.

Bug report:
InfinityLoop1308#90
@InfinityLoop1308

Copy link
Copy Markdown
Owner

Thanks. I removed some code: Compose is going to be dropped, and we don't use test in this project.

@InfinityLoop1308
InfinityLoop1308 merged commit 40ed41c into InfinityLoop1308:dev Aug 22, 2026
@75ohmantenna

Copy link
Copy Markdown
Contributor Author

I'll make note of that if I have any future contributions. Thanks for your kindness and keeping this project alive, we appreciate you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants