Skip to content

Commit a413c56

Browse files
committed
allow the user to delete a subscription in the backend
1 parent 636ff1a commit a413c56

5 files changed

Lines changed: 44 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Changelog
2+
## 3.15.0 - 2026-02-17
3+
### Added
4+
- Allow removing subscriptions directly from the personal settings UI (propagates to other clients)
5+
26
## 3.14.0 - 2026-02-17
37
### Added
48
- Resolve title, description, and imagery for subscriptions pointing to api.ardaudiothek.de programsets

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# nextcloud-gpodder
22
Nextcloud app that replicates basic gpodder.net api to sync podcast consumer apps (podcatchers) like AntennaPod.
33

4+
The personal settings page lists all synchronized subscriptions and now offers a remove button per feed, which issues the appropriate `subscription_change` call so deletions sync to every connected client.
5+
46
### Clients supporting sync
57
| client | support status |
68
| :- | :- |

appinfo/info.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<name>GPodder Sync</name>
66
<summary>replicate basic GPodder.net API</summary>
77
<description><![CDATA[Expose GPodder API to sync podcast consumer apps like AntennaPod]]></description>
8-
<version>3.14.0</version>
8+
<version>3.15.0</version>
99
<licence>agpl</licence>
1010
<author mail="thrillfall@disroot.org">Thrillfall</author>
1111
<namespace>GPodderSync</namespace>

src/components/SubscriptionListItem.vue

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,33 @@
2323
</template>
2424
RSS feed
2525
</ActionLink>
26+
<ActionButton
27+
:disabled="isRemoving"
28+
icon="icon-delete"
29+
@click="removeSubscription">
30+
Remove
31+
</ActionButton>
2632
</template>
2733
</ListItem>
2834
</template>
2935

3036
<script>
3137
import ActionLink from '@nextcloud/vue/dist/Components/ActionLink'
38+
import ActionButton from '@nextcloud/vue/dist/Components/ActionButton'
3239
import Avatar from '@nextcloud/vue/dist/Components/Avatar'
3340
import ListItem from '@nextcloud/vue/dist/Components/ListItem'
3441
3542
import Rss from 'vue-material-design-icons/Rss.vue'
3643
3744
import { generateUrl } from '@nextcloud/router'
3845
import axios from '@nextcloud/axios'
46+
import { showError, showSuccess } from '@nextcloud/dialogs'
3947
4048
export default {
4149
name: 'SubscriptionListItem',
4250
components: {
4351
ActionLink,
52+
ActionButton,
4453
Avatar,
4554
ListItem,
4655
Rss,
@@ -55,6 +64,7 @@ export default {
5564
return {
5665
podcastData: null,
5766
isLoading: true,
67+
isRemoving: false,
5868
}
5969
},
6070
async mounted() {
@@ -70,6 +80,28 @@ export default {
7080
}
7181
},
7282
methods: {
83+
async removeSubscription() {
84+
if (this.isRemoving) {
85+
return
86+
}
87+
if (!window.confirm(t('gpoddersync', 'Remove this subscription from your account?'))) {
88+
return
89+
}
90+
this.isRemoving = true
91+
try {
92+
await axios.post(generateUrl('/apps/gpoddersync/subscription_change/create'), {
93+
add: [],
94+
remove: [this.sub.url],
95+
})
96+
showSuccess(t('gpoddersync', 'Subscription removed'))
97+
this.$emit('removed', this.sub.url)
98+
} catch (e) {
99+
console.error(e)
100+
showError(t('gpoddersync', 'Could not remove subscription'))
101+
} finally {
102+
this.isRemoving = false
103+
}
104+
},
73105
getTitle() {
74106
return this.podcastData?.title ?? this.sub.url ?? ''
75107
},

src/views/PersonalSettingsPage.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
<ul>
1717
<SubscriptionListItem v-for="sub in subscriptions"
1818
:key="sub.url"
19-
:sub="sub" />
19+
:sub="sub"
20+
@removed="handleSubscriptionRemoved" />
2021
</ul>
2122
</div>
2223
<div v-if="subscriptions.length === 0 && !isLoading">
@@ -89,6 +90,9 @@ export default {
8990
updateSorting(sorting) {
9091
this.subscriptions.sort(sorting.compare)
9192
},
93+
handleSubscriptionRemoved(url) {
94+
this.subscriptions = this.subscriptions.filter((sub) => sub.url !== url)
95+
},
9296
},
9397
}
9498
</script>

0 commit comments

Comments
 (0)