// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as time$0 from "../../../time/models.js";

/**
 * Album represents an album for the cover grid display.
 * 
 * Year is the album's preferred display year - MusicBrainz's
 * first-release-date when known, falling back to the file-tag year.
 * ReleaseYear is the file-tag year of the specific copy in the library;
 * for a 2010 remaster of a 1973 album, Year=1973 and ReleaseYear=2010.
 */
export interface Album {
    "ID": number;
    "Name": string;
    "ArtistName": string;
    "ArtistMBID": string;
    "MBID": string;
    "CoverArtPath": string;
    "CoverArtSmall": string;
    "CoverArtMedium": string;
    "CoverArtLarge": string;
    "Year": number;
    "ReleaseYear": number;
}

/**
 * AlbumCompleteness says how much of an album is present, as the files
 * themselves claim.
 * 
 * Known is the part that matters: a tag that never declared a total is
 * not the same as a total that is unmet, and rendering the two alike
 * would put an "incomplete" mark on most of an untagged library.  When
 * Known is false, Expected means nothing and the caller must say
 * nothing.
 */
export interface AlbumCompleteness {
    "owned": number;
    "expected": number;
    "known": boolean;
    "complete": boolean;
}

/**
 * Artist represents an artist in the library.
 */
export interface Artist {
    "ID": number;
    "Name": string;
    "MBID": string;
    "ImageSmall": string;
    "ImageMedium": string;
    "ImageLarge": string;
}

/**
 * GenreWithCount is a genre and how many tracks carry it.
 */
export interface GenreWithCount {
    "Name": string;
    "TrackCount": number;
}

/**
 * Info is one library and how many files are in it.
 */
export interface Info {
    "id": number;
    "name": string;
    "path": string;
    "trackCount": number;
}

/**
 * RemovalImpact contains pre-removal counts for the confirmation dialog.
 */
export interface RemovalImpact {
    "trackCount": number;
    "playlistsAffected": number;
    "queueItemCount": number;
}

/**
 * RemovalResult reports what one RemoveFromLibrary call did.
 */
export interface RemovalResult {
    /**
     * TracksRemoved is how many audio_files rows were deleted.  It can
     * be lower than len(filePaths) if a path was already gone.
     */
    "tracksRemoved": number;

    /**
     * PathsExcluded is how many paths the scanner will now skip.
     */
    "pathsExcluded": number;
}

/**
 * RemovalSummary contains post-removal counts for the toast notification.
 */
export interface RemovalSummary {
    "tracksDeleted": number;
    "artistsRemoved": number;
    "albumsRemoved": number;
    "genresRemoved": number;
    "playlistsAffected": number;
    "queueItemsRemoved": number;
}

/**
 * ScanMetrics holds timing and count data collected during a library scan.
 * Worker-pool fields are protected by a mutex; DB-writer fields are
 * single-threaded and use plain addition.
 */
export interface ScanMetrics {
    /**
     * Top-level phases (wall-clock).
     */
    "total": time$0.Duration;
    "loadExisting": time$0.Duration;
    "walkDuration": time$0.Duration;
    "extractionWallClock": time$0.Duration;
    "dbWritesWallClock": time$0.Duration;
    "orphanCleanup": time$0.Duration;

    /**
     * Per-format extraction (cumulative across workers).
     */
    "formatExtraction": { [_ in string]?: number } | null;
    "formatCount": { [_ in string]?: number } | null;

    /**
     * Sub-operation cumulative times (across workers).
     */
    "tagExtraction": time$0.Duration;
    "durationExtraction": time$0.Duration;

    /**
     * DB sub-operations (cumulative, single-threaded DB writer).
     */
    "batchCommits": time$0.Duration;
    "coverArtSave": time$0.Duration;

    /**
     * Thumbnail generation (async worker pool).
     */
    "thumbnailWallClock": time$0.Duration;
    "thumbnailGeneration": time$0.Duration;
    "thumbnailSmall": time$0.Duration;
    "thumbnailMedium": time$0.Duration;
    "thumbnailLarge": time$0.Duration;

    /**
     * Full-rescan-specific phases.
     */
    "clearQueue": time$0.Duration;
    "clearDatabase": time$0.Duration;
    "clearCoverFiles": time$0.Duration;

    /**
     * File counts.
     */
    "added": number;
    "updated": number;
    "skipped": number;
    "removed": number;

    /**
     * Cancelled is true when the scan was stopped via CancelScan.
     */
    "cancelled": boolean;

    /**
     * Library identification.
     * library that was scanned
     */
    "libraryId": number;

    /**
     * display name of scanned library
     */
    "libraryName": string;

    /**
     * Non-fatal issues encountered during scanning.
     */
    "warnings": ScanWarning[] | null;
}

/**
 * ScanWarning represents a non-fatal issue encountered during scanning.
 */
export interface ScanWarning {
    "filePath": string;
    "phase": string;
    "err": string;
}

/**
 * Track is one audio file with everything a list needs to draw it.
 */
export interface Track {
    "TrackName": string;
    "ArtistName": string;
    "TrackLength": string;
    "FilePath": string;
    "TrackNumber": number;
    "DiscNumber": number;
    "Album": string;
    "Genre": string[] | null;
    "Year": number;
    "Composer": string;
    "FileType": string;
    "SampleRate": number;
    "BitDepth": number;
    "Channels": number;
    "Bitrate": number;
    "FileSize": number;
    "PlayCount": number;
    "LastPlayed": string;
    "RecordingMBID": string;
    "ArtistMBID": string;
    "ReleaseGroupMBID": string;
    "CoverArtPath": string;
    "CoverArtSmall": string;
    "CoverArtMedium": string;
    "CoverArtLarge": string;
}

/**
 * TrackMBIDs are the MusicBrainz ids a file's tags carry.
 */
export interface TrackMBIDs {
    "recordingMbid": string;
    "releaseGroupMbid": string;
    "artistMbid": string;
}
