pstream is dead; long live pstream taciturnaxolotl.github.io/pstream-ng/
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

append collection bookmarks so they arent removed from other groups

Pas 9b02bf79 f81bd73d

+18 -1
+18 -1
src/components/overlays/detailsModal/components/overlays/CollectionOverlay.tsx
··· 111 111 }: CollectionOverlayProps) { 112 112 const { t } = useTranslation(); 113 113 const { showModal } = useOverlayStack(); 114 + const bookmarks = useBookmarkStore((s) => s.bookmarks); 115 + const modifyBookmarks = useBookmarkStore((s) => s.modifyBookmarks); 114 116 const addBookmarkWithGroups = useBookmarkStore( 115 117 (s) => s.addBookmarkWithGroups, 116 118 ); ··· 177 179 // Format the group name with the random icon 178 180 const groupName = `[${randomIcon}]${collectionName}`; 179 181 182 + const existingIds: string[] = []; 183 + 180 184 collection.parts.forEach((movie) => { 181 185 const year = movie.release_date 182 186 ? new Date(movie.release_date).getFullYear() ··· 184 188 185 189 // Skip movies without a release year 186 190 if (year === undefined) return; 191 + 192 + const movieId = movie.id.toString(); 193 + 194 + if (bookmarks[movieId]) { 195 + existingIds.push(movieId); 196 + return; 197 + } 187 198 188 199 const meta = { 189 - tmdbId: movie.id.toString(), 200 + tmdbId: movieId, 190 201 type: "movie" as const, 191 202 title: movie.title, 192 203 releaseYear: year, ··· 195 206 196 207 addBookmarkWithGroups(meta, [groupName]); 197 208 }); 209 + 210 + if (existingIds.length > 0) { 211 + modifyBookmarks(existingIds, { 212 + addGroups: [groupName], 213 + }); 214 + } 198 215 }; 199 216 200 217 const handleShowDetails = (media: MediaItem) => {