[web] Fix an issue preventing removal of RSS podcasts #1616

RSS podcasts can now be removed. Moreover, the remove option is not shown anymore to non-RSS podcasts.
This commit is contained in:
Alain Nussbaumer
2023-06-02 23:13:44 +02:00
parent 784de0c4a1
commit 9bd68ca306
9 changed files with 32 additions and 55 deletions

View File

@@ -146,16 +146,7 @@ export default {
.library_album_tracks(this.selected_album.id, { limit: 1 })
.then(({ data }) => {
webapi.library_track_playlists(data.items[0].id).then(({ data }) => {
const rssPlaylists = data.items.filter((pl) => pl.type === 'rss')
if (rssPlaylists.length !== 1) {
this.$store.dispatch('add_notification', {
text: this.$t('list.albums.notification'),
type: 'danger'
})
return
}
this.rss_playlist_to_remove = rssPlaylists[0]
this.rss_playlist_to_remove = data.items.filter((pl) => pl.type === 'rss')[0]
this.show_remove_podcast_modal = true
this.show_details_modal = false
})

View File

@@ -14,7 +14,7 @@
<span class="icon"><mdicon name="cancel" size="16" /></span>
<span
class="is-size-7"
v-text="close_action ? close_action : t('dialog.cancel')"
v-text="close_action ? close_action : $t('dialog.cancel')"
/>
</a>
<a

View File

@@ -26,6 +26,7 @@
v-text="$t('dialog.album.mark-as-played')"
/>
<a
v-if="album.data_kind === 'url'"
class="button is-small"
@click="$emit('remove-podcast')"
v-text="$t('dialog.album.remove-podcast')"