Skip to content

Commit 7c7f88e

Browse files
committed
follow same pattern for excludeGenre and restoreGenre
1 parent d26ce26 commit 7c7f88e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/genre/GenreTable.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,10 @@ const navigateToLibraryByGenre = (genre: Genre, mediaType: string) => {
147147
const excludeGenre = async (itemId: string) => {
148148
pendingId.value = itemId;
149149
try {
150+
const genre = allGenres.value.find((g) => g.item_id === itemId);
150151
await api.removeGenreFromLibrary(itemId);
151152
allGenres.value = allGenres.value.filter((g) => g.item_id !== itemId);
152-
globalExclusions.value = await api.getGlobalGenreExclusions();
153+
if (genre) globalExclusions.value = [...globalExclusions.value, genre];
153154
scheduleGenreScan();
154155
} finally {
155156
pendingId.value = null;

0 commit comments

Comments
 (0)