Began working on ytmusic search parsers
This commit is contained in:
29
src/app.d.ts
vendored
29
src/app.d.ts
vendored
@@ -44,7 +44,7 @@ declare global {
|
||||
public id: string
|
||||
getRecommendations: () => Promise<(Song | Album | Playlist)[]>
|
||||
getConnectionInfo: () => Promise<ConnectionInfo>
|
||||
search: (searchTerm: string) => Promise<(Song | Album | Artist | Playlist)[]>
|
||||
search: (searchTerm: string, filter?: 'song' | 'album' | 'artist' | 'playlist') => Promise<(Song | Album | Artist | Playlist)[]>
|
||||
}
|
||||
// These Schemas should only contain general info data that is necessary for data fetching purposes.
|
||||
// They are NOT meant to be stores for large amounts of data, i.e. Don't include the data for every single song the Playlist type.
|
||||
@@ -53,7 +53,7 @@ declare global {
|
||||
type Song = {
|
||||
connection: {
|
||||
id: string
|
||||
type: serviceType
|
||||
type: 'jellyfin' | 'youtube-music'
|
||||
}
|
||||
id: string
|
||||
name: string
|
||||
@@ -76,7 +76,7 @@ declare global {
|
||||
type Album = {
|
||||
connection: {
|
||||
id: string
|
||||
type: serviceType
|
||||
type: 'jellyfin' | 'youtube-music'
|
||||
}
|
||||
id: string
|
||||
name: string
|
||||
@@ -91,7 +91,23 @@ declare global {
|
||||
releaseDate?: string
|
||||
}
|
||||
|
||||
// Need to figure out how to do Artists, maybe just query MusicBrainz?
|
||||
type Artist = {
|
||||
connection: {
|
||||
id: string
|
||||
type: 'jellyfin' | 'youtube-music'
|
||||
}
|
||||
id: string
|
||||
name: string
|
||||
type: 'artist'
|
||||
thumbnail?: string
|
||||
}
|
||||
|
||||
type Playlist = {
|
||||
connection: {
|
||||
id: string
|
||||
type: 'jellyfin' | 'youtube-music'
|
||||
}
|
||||
id: string
|
||||
name: string
|
||||
type: 'playlist'
|
||||
@@ -99,13 +115,6 @@ declare global {
|
||||
description?: string
|
||||
}
|
||||
|
||||
type Artist = {
|
||||
id: string
|
||||
name: string
|
||||
type: 'artist'
|
||||
thumbnail?: string
|
||||
}
|
||||
|
||||
namespace Jellyfin {
|
||||
// The jellyfin API will not always return the data it says it will, for example /Users/AuthenticateByName says it will
|
||||
// retrun the ServerName, it wont. This must be fetched from /System/Info.
|
||||
|
||||
Reference in New Issue
Block a user