mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-01-15 15:48:05 +00:00
feat: search for artists, albums and songs
Some checks failed
🏗️ Build Apps / 🤖 Build Android APK (Phone) (push) Has been cancelled
🏗️ Build Apps / 🤖 Build Android APK (TV) (push) Has been cancelled
🏗️ Build Apps / 🍎 Build iOS IPA (Phone) (push) Has been cancelled
🔒 Lockfile Consistency Check / 🔍 Check bun.lock and package.json consistency (push) Has been cancelled
🛡️ CodeQL Analysis / 🔎 Analyze with CodeQL (actions) (push) Has been cancelled
🛡️ CodeQL Analysis / 🔎 Analyze with CodeQL (javascript-typescript) (push) Has been cancelled
🏷️🔀Merge Conflict Labeler / 🏷️ Labeling Merge Conflicts (push) Has been cancelled
🚦 Security & Quality Gate / 📝 Validate PR Title (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Vulnerable Dependencies (push) Has been cancelled
🚦 Security & Quality Gate / 🚑 Expo Doctor Check (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Lint & Test (check) (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Lint & Test (format) (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Lint & Test (lint) (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Lint & Test (typecheck) (push) Has been cancelled
🌐 Translation Sync / sync-translations (push) Has been cancelled
🕒 Handle Stale Issues / 🗑️ Cleanup Stale Issues (push) Has been cancelled
Some checks failed
🏗️ Build Apps / 🤖 Build Android APK (Phone) (push) Has been cancelled
🏗️ Build Apps / 🤖 Build Android APK (TV) (push) Has been cancelled
🏗️ Build Apps / 🍎 Build iOS IPA (Phone) (push) Has been cancelled
🔒 Lockfile Consistency Check / 🔍 Check bun.lock and package.json consistency (push) Has been cancelled
🛡️ CodeQL Analysis / 🔎 Analyze with CodeQL (actions) (push) Has been cancelled
🛡️ CodeQL Analysis / 🔎 Analyze with CodeQL (javascript-typescript) (push) Has been cancelled
🏷️🔀Merge Conflict Labeler / 🏷️ Labeling Merge Conflicts (push) Has been cancelled
🚦 Security & Quality Gate / 📝 Validate PR Title (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Vulnerable Dependencies (push) Has been cancelled
🚦 Security & Quality Gate / 🚑 Expo Doctor Check (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Lint & Test (check) (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Lint & Test (format) (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Lint & Test (lint) (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Lint & Test (typecheck) (push) Has been cancelled
🌐 Translation Sync / sync-translations (push) Has been cancelled
🕒 Handle Stale Issues / 🗑️ Cleanup Stale Issues (push) Has been cancelled
This commit is contained in:
@@ -82,13 +82,49 @@ export const getItemNavigation = (item: BaseItemDto, _from: string) => {
|
||||
};
|
||||
}
|
||||
|
||||
if (item.Type === "CollectionFolder" || item.Type === "Playlist") {
|
||||
if (item.Type === "CollectionFolder") {
|
||||
return {
|
||||
pathname: "/[libraryId]" as const,
|
||||
params: { libraryId: item.Id! },
|
||||
};
|
||||
}
|
||||
|
||||
// Music types - use shared routes for proper back navigation
|
||||
if (item.Type === "MusicArtist") {
|
||||
return {
|
||||
pathname: "/music/artist/[artistId]" as const,
|
||||
params: { artistId: item.Id! },
|
||||
};
|
||||
}
|
||||
|
||||
if (item.Type === "MusicAlbum") {
|
||||
return {
|
||||
pathname: "/music/album/[albumId]" as const,
|
||||
params: { albumId: item.Id! },
|
||||
};
|
||||
}
|
||||
|
||||
if (item.Type === "Audio") {
|
||||
// Navigate to the album if available, otherwise to the item page
|
||||
if (item.AlbumId) {
|
||||
return {
|
||||
pathname: "/music/album/[albumId]" as const,
|
||||
params: { albumId: item.AlbumId },
|
||||
};
|
||||
}
|
||||
return {
|
||||
pathname: "/items/page" as const,
|
||||
params: { id: item.Id! },
|
||||
};
|
||||
}
|
||||
|
||||
if (item.Type === "Playlist") {
|
||||
return {
|
||||
pathname: "/music/playlist/[playlistId]" as const,
|
||||
params: { playlistId: item.Id! },
|
||||
};
|
||||
}
|
||||
|
||||
// Default case - items page
|
||||
return {
|
||||
pathname: "/items/page" as const,
|
||||
|
||||
Reference in New Issue
Block a user