mirror of
https://github.com/koel/koel.git
synced 2026-04-25 00:36:03 +03:00
[PR #2161] [MERGED] feat: delete podcast upon last unsubscription #2119
Labels
No labels
Authentication
Dependencies
Documentation
Feature Request
Flac
Help Wanted
Installation/Setup
Integration
Mobile
PR Welcome
Pending Release
Performance
Playlist
S3
Search
Sync
[Pri] Low
[Pri] Normal
[Status] Keep Open
[Status] Needs Author Reply
[Status] Needs Review
[Status] Stale
[Status] Will Implement
[Type] Blessed
[Type] Bug
[Type] Duplicate
[Type] Enhancement
[Type] Help Request
[Type] Question
[Type] Task
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/koel-koel#2119
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/koel/koel/pull/2161
Author: @phanan
Created: 10/28/2025
Status: ✅ Merged
Merged: 10/28/2025
Merged by: @phanan
Base:
master← Head:del-podcast📝 Commits (1)
bb8dcacfeat: delete podcast upon last unsubscription📊 Changes
7 files changed (+120 additions, -2 deletions)
View changed files
➕
app/Events/UserUnsubscribedFromPodcast.php(+13 -0)➕
app/Listeners/DeletePodcastIfNoSubscribers.php(+21 -0)📝
app/Listeners/WriteScanLog.php(+1 -1)📝
app/Providers/EventServiceProvider.php(+6 -0)📝
app/Services/PodcastService.php(+8 -1)📝
tests/Integration/Services/PodcastServiceTest.php(+20 -0)➕
tests/Unit/Listeners/DeletePodcastIfNoSubscribersTest.php(+51 -0)📄 Description
Description
Dispatch an event to delete a podcast if it doesn't have any subscribers.
Motivation
In the past, unsubscribing a user simply "detached" them from a podcast, when the podcast itself remained in the database. The reason was two-fold:
However, for installations that have only one user, this approach has been creating confusion: the single user expects the podcast data to be removed and is surprised to see it's not.
Screenshots (if applicable)
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.