Skip to content

Commit

Permalink
Set up website
Browse files Browse the repository at this point in the history
  • Loading branch information
probablykasper committed Oct 7, 2024
1 parent 06d8864 commit b2ab28e
Show file tree
Hide file tree
Showing 29 changed files with 1,870 additions and 3,268 deletions.
286 changes: 129 additions & 157 deletions ferrum-addon/addon.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,192 +4,164 @@
/* auto-generated by NAPI-RS */

export declare function get_artists(): Array<string>
export declare function load_data(
isDev: boolean,
localDataPath?: string | undefined | null,
libraryPath?: string | undefined | null,
): void
export declare function load_data(isDev: boolean, localDataPath?: string | undefined | null, libraryPath?: string | undefined | null): void
export interface PathsJs {
libraryDir: string
tracksDir: string
libraryJson: string
cacheDb: string
localDataDir: string
libraryDir: string
tracksDir: string
libraryJson: string
cacheDb: string
localDataDir: string
}
export declare function get_paths(): PathsJs
export declare function save(): void
export interface ImportStatus {
errors: Array<string>
tracksCount: number
playlistsCount: number
errors: Array<string>
tracksCount: number
playlistsCount: number
}
export declare function get_default_sort_desc(field: string): boolean
export interface Track {
size: number
duration: number
bitrate: number
sampleRate: number
file: string
dateModified: MsSinceUnixEpoch
dateAdded: MsSinceUnixEpoch
name: string
importedFrom?: string
/** Imported ID, like iTunes Persistent ID */
originalId?: string
artist: string
composer?: string
sortName?: string
sortArtist?: string
sortComposer?: string
genre?: string
rating?: PercentInteger
year?: number
bpm?: number
comments?: string
grouping?: string
liked?: boolean
disliked?: boolean
disabled?: boolean
compilation?: boolean
albumName?: string
albumArtist?: string
sortAlbumName?: string
sortAlbumArtist?: string
trackNum?: number
trackCount?: number
discNum?: number
discCount?: number
dateImported?: MsSinceUnixEpoch
playCount?: number
plays?: Array<MsSinceUnixEpoch>
playsImported?: Array<CountObject>
skipCount?: number
skips?: Array<MsSinceUnixEpoch>
skipsImported?: Array<CountObject>
/** -100 to 100 */
volume?: number
size: number
duration: number
bitrate: number
sampleRate: number
file: string
dateModified: MsSinceUnixEpoch
dateAdded: MsSinceUnixEpoch
name: string
importedFrom?: string
/** Imported ID, like iTunes Persistent ID */
originalId?: string
artist: string
composer?: string
sortName?: string
sortArtist?: string
sortComposer?: string
genre?: string
rating?: PercentInteger
year?: number
bpm?: number
comments?: string
grouping?: string
liked?: boolean
disliked?: boolean
disabled?: boolean
compilation?: boolean
albumName?: string
albumArtist?: string
sortAlbumName?: string
sortAlbumArtist?: string
trackNum?: number
trackCount?: number
discNum?: number
discCount?: number
dateImported?: MsSinceUnixEpoch
playCount?: number
plays?: Array<MsSinceUnixEpoch>
playsImported?: Array<CountObject>
skipCount?: number
skips?: Array<MsSinceUnixEpoch>
skipsImported?: Array<CountObject>
/** -100 to 100 */
volume?: number
}
export interface CountObject {
count: number
fromDate: MsSinceUnixEpoch
toDate: MsSinceUnixEpoch
count: number
fromDate: MsSinceUnixEpoch
toDate: MsSinceUnixEpoch
}
export interface Playlist {
id: TrackListID
name: string
description?: string
liked: boolean
disliked: boolean
importedFrom?: string
originalId?: string
dateImported?: MsSinceUnixEpoch
dateCreated?: MsSinceUnixEpoch
tracks: Array<ItemId>
id: TrackListID
name: string
description?: string
liked: boolean
disliked: boolean
importedFrom?: string
originalId?: string
dateImported?: MsSinceUnixEpoch
dateCreated?: MsSinceUnixEpoch
tracks: Array<ItemId>
}
export interface Folder {
id: TrackListID
name: string
description?: string
liked: boolean
disliked: boolean
/** For example "itunes" */
importedFrom?: string
/** For example iTunes Persistent ID */
originalId?: string
dateImported?: MsSinceUnixEpoch
dateCreated?: MsSinceUnixEpoch
children: Array<TrackListID>
id: TrackListID
name: string
description?: string
liked: boolean
disliked: boolean
/** For example "itunes" */
importedFrom?: string
/** For example iTunes Persistent ID */
originalId?: string
dateImported?: MsSinceUnixEpoch
dateCreated?: MsSinceUnixEpoch
children: Array<TrackListID>
}
export interface Special {
id: TrackListID
name: SpecialTrackListName
dateCreated: MsSinceUnixEpoch
children: Array<TrackListID>
id: TrackListID
name: SpecialTrackListName
dateCreated: MsSinceUnixEpoch
children: Array<TrackListID>
}
export const enum SpecialTrackListName {
Root = 0,
Root = 0
}
export interface TracksPageOptions {
playlistId: string
sortKey: string
sortDesc: boolean
filterQuery: string
groupAlbumTracks: boolean
playlistId: string
sortKey: string
sortDesc: boolean
filterQuery: string
groupAlbumTracks: boolean
}
export interface TracksPage {
playlistKind: string
playlistName: string
playlistDescription?: string
playlistLength: number
itemIds: Array<ItemId>
playlistKind: string
playlistName: string
playlistDescription?: string
playlistLength: number
itemIds: Array<ItemId>
}
export declare function get_tracks_page(options: TracksPageOptions): TracksPage
export interface TrackListDetails {
id: string
name: string
kind: string
/** Folders only */
children?: Array<string>
id: string
name: string
kind: string
/** Folders only */
children?: Array<string>
}
export declare function get_track_lists_details(): Record<string, TrackListDetails>
export declare function get_track_list(id: string): TrackList
/** Returns the deleted track lists, including folder children */
export declare function delete_track_list(id: string): void
export declare function add_tracks_to_playlist(playlistId: string, trackIds: Array<string>): void
export declare function playlist_filter_duplicates(
playlistId: TrackID,
ids: Array<string>,
): Array<TrackID>
export declare function playlist_filter_duplicates(playlistId: TrackID, ids: Array<string>): Array<TrackID>
export declare function remove_from_playlist(playlistId: TrackID, itemIds: Array<ItemId>): void
export declare function delete_tracks_with_item_ids(itemIds: Array<ItemId>): void
export declare function new_playlist(
name: string,
description: string,
isFolder: boolean,
parentId: string,
): void
export declare function new_playlist(name: string, description: string, isFolder: boolean, parentId: string): void
export declare function update_playlist(id: string, name: string, description: string): void
export declare function move_playlist(
id: string,
fromId: string,
toId: string,
toIndex: number,
): void
export declare function move_tracks(
playlistId: string,
itemIds: Array<ItemId>,
toIndex: number,
): void
export declare function move_playlist(id: string, fromId: string, toId: string, toIndex: number): void
export declare function move_tracks(playlistId: string, itemIds: Array<ItemId>, toIndex: number): void
/** Returns `None` if the file does not have an image */
export declare function read_small_cover_async(
path: string,
index: number,
cacheDbPath: string,
): Promise<Buffer | null>
export declare function read_cover_async(
trackId: string,
index: number,
): Promise<ArrayBuffer | null>
export declare function read_small_cover_async(path: string, index: number, cacheDbPath: string): Promise<Buffer | null>
export declare function read_cover_async(trackId: string, index: number): Promise<ArrayBuffer | null>
export interface TrackMd {
name: string
artist: string
albumName: string
albumArtist: string
composer: string
grouping: string
genre: string
year: string
trackNum: string
trackCount: string
discNum: string
discCount: string
bpm: string
comments: string
name: string
artist: string
albumName: string
albumArtist: string
composer: string
grouping: string
genre: string
year: string
trackNum: string
trackCount: string
discNum: string
discCount: string
bpm: string
comments: string
}
export declare function get_track(id: string): Track
export interface KeyedTrack {
id: TrackID
track: Track
id: TrackID
track: Track
}
export declare function get_track_by_item_id(itemId: ItemId): KeyedTrack
export declare function get_track_ids(itemIds: Array<ItemId>): Array<TrackID>
Expand All @@ -200,25 +172,25 @@ export declare function add_play_time(id: TrackID, start: MsSinceUnixEpoch, durM
export declare function import_file(path: string, now: MsSinceUnixEpoch): void
export declare function load_tags(trackId: string): void
export interface JsImage {
index: number
totalImages: number
mimeType: string
data: Buffer
index: number
totalImages: number
mimeType: string
data: Buffer
}
export declare function get_image(index: number): JsImage | null
export declare function set_image(index: number, pathStr: string): void
export declare function set_image_data(index: number, bytes: ArrayBuffer): void
export declare function remove_image(index: number): void
export declare function update_track_info(trackId: string, info: TrackMd): void
export interface ViewOptions {
shownPlaylistFolders: Array<string>
/** Empty is treated as default */
columns: Array<string>
shownPlaylistFolders: Array<string>
/** Empty is treated as default */
columns: Array<string>
}
export declare function load_view_options(): ViewOptions
export declare function save_view_options(viewOptions: ViewOptions): void
export declare class ItunesImport {
static new(): ItunesImport
start(path: string, tracksDir: string): Promise<ImportStatus>
finish(): void
static new(): ItunesImport
start(path: string, tracksDir: string): Promise<ImportStatus>
finish(): void
}
30 changes: 0 additions & 30 deletions website/.eslintrc.cjs

This file was deleted.

Loading

0 comments on commit b2ab28e

Please sign in to comment.