improved library scan speeds, added library manager component
-libraries tab now opens a library manager -choose library directory, manually soft scan and rescan -batched db queues -mp3 header-based duration extraction
This commit is contained in:
@@ -23,3 +23,6 @@ WHERE id = ?;
|
||||
-- name: DeleteArtistCredit :exec
|
||||
DELETE FROM artist_credit
|
||||
WHERE id = ?;
|
||||
|
||||
-- name: DeleteAllArtistCredits :exec
|
||||
DELETE FROM artist_credit;
|
||||
|
||||
@@ -15,3 +15,6 @@ WHERE id =?;
|
||||
DELETE FROM artist_credit_artist
|
||||
WHERE id =?;
|
||||
|
||||
-- name: DeleteAllArtistCreditArtists :exec
|
||||
DELETE FROM artist_credit_artist;
|
||||
|
||||
|
||||
@@ -24,6 +24,9 @@ WHERE id = ?;
|
||||
DELETE FROM artists
|
||||
WHERE id = ?;
|
||||
|
||||
-- name: DeleteAllArtists :exec
|
||||
DELETE FROM artists;
|
||||
|
||||
-- name: GetAllArtists :many
|
||||
SELECT * FROM artists
|
||||
ORDER BY name;
|
||||
|
||||
@@ -71,6 +71,9 @@ LEFT JOIN cover_art ca ON rg.cover_art_id = ca.id
|
||||
WHERE af.file_path = ?
|
||||
LIMIT 1;
|
||||
|
||||
-- name: DeleteAllAudioFiles :exec
|
||||
DELETE FROM audio_files;
|
||||
|
||||
-- name: GetAudioFilesByReleaseGroup :many
|
||||
SELECT
|
||||
af.file_path,
|
||||
|
||||
@@ -26,3 +26,6 @@ WHERE id = ?;
|
||||
-- name: DeleteCoverArt :exec
|
||||
DELETE FROM cover_art
|
||||
WHERE id = ?;
|
||||
|
||||
-- name: DeleteAllCoverArt :exec
|
||||
DELETE FROM cover_art;
|
||||
|
||||
@@ -82,6 +82,9 @@ LEFT JOIN release_groups rg ON rgr.release_group_id = rg.id
|
||||
LEFT JOIN cover_art ca ON rg.cover_art_id = ca.id
|
||||
ORDER BY pt.playlist_id, pt.position;
|
||||
|
||||
-- name: DeleteAllPlaylistTracks :exec
|
||||
DELETE FROM playlist_tracks;
|
||||
|
||||
-- name: GetNextPlaylistTrackPosition :one
|
||||
SELECT COALESCE(MAX(position), -1) + 1 AS next_position
|
||||
FROM playlist_tracks WHERE playlist_id = ?;
|
||||
|
||||
@@ -28,6 +28,9 @@ WHERE id = ?;
|
||||
DELETE FROM recordings
|
||||
WHERE id = ?;
|
||||
|
||||
-- name: DeleteAllRecordings :exec
|
||||
DELETE FROM recordings;
|
||||
|
||||
-- name: GetAllRecordings :many
|
||||
SELECT * FROM recordings
|
||||
ORDER BY name;
|
||||
|
||||
@@ -23,3 +23,6 @@ WHERE id = ?;
|
||||
-- name: DeleteReleaseGroupRecordingByFK :exec
|
||||
DELETE FROM release_group_recordings
|
||||
WHERE release_group_id = ? AND recording_id = ?;
|
||||
|
||||
-- name: DeleteAllReleaseGroupRecordings :exec
|
||||
DELETE FROM release_group_recordings;
|
||||
|
||||
@@ -38,6 +38,9 @@ WHERE id = ?;
|
||||
DELETE FROM release_groups
|
||||
WHERE id = ?;
|
||||
|
||||
-- name: DeleteAllReleaseGroups :exec
|
||||
DELETE FROM release_groups;
|
||||
|
||||
-- name: GetAllReleaseGroups :many
|
||||
SELECT * FROM release_groups
|
||||
ORDER BY name;
|
||||
|
||||
@@ -21,6 +21,15 @@ func (q *Queries) CreateArtistCredit(ctx context.Context, text string) (ArtistCr
|
||||
return i, err
|
||||
}
|
||||
|
||||
const deleteAllArtistCredits = `-- name: DeleteAllArtistCredits :exec
|
||||
DELETE FROM artist_credit
|
||||
`
|
||||
|
||||
func (q *Queries) DeleteAllArtistCredits(ctx context.Context) error {
|
||||
_, err := q.db.ExecContext(ctx, deleteAllArtistCredits)
|
||||
return err
|
||||
}
|
||||
|
||||
const deleteArtistCredit = `-- name: DeleteArtistCredit :exec
|
||||
DELETE FROM artist_credit
|
||||
WHERE id = ?
|
||||
|
||||
@@ -26,6 +26,15 @@ func (q *Queries) CreateArtistCreditArtist(ctx context.Context, arg CreateArtist
|
||||
return i, err
|
||||
}
|
||||
|
||||
const deleteAllArtistCreditArtists = `-- name: DeleteAllArtistCreditArtists :exec
|
||||
DELETE FROM artist_credit_artist
|
||||
`
|
||||
|
||||
func (q *Queries) DeleteAllArtistCreditArtists(ctx context.Context) error {
|
||||
_, err := q.db.ExecContext(ctx, deleteAllArtistCreditArtists)
|
||||
return err
|
||||
}
|
||||
|
||||
const deleteArtistCreditArtist = `-- name: DeleteArtistCreditArtist :exec
|
||||
DELETE FROM artist_credit_artist
|
||||
WHERE id =?
|
||||
|
||||
@@ -21,6 +21,15 @@ func (q *Queries) CreateArtist(ctx context.Context, name string) (Artist, error)
|
||||
return i, err
|
||||
}
|
||||
|
||||
const deleteAllArtists = `-- name: DeleteAllArtists :exec
|
||||
DELETE FROM artists
|
||||
`
|
||||
|
||||
func (q *Queries) DeleteAllArtists(ctx context.Context) error {
|
||||
_, err := q.db.ExecContext(ctx, deleteAllArtists)
|
||||
return err
|
||||
}
|
||||
|
||||
const deleteArtist = `-- name: DeleteArtist :exec
|
||||
DELETE FROM artists
|
||||
WHERE id = ?
|
||||
|
||||
@@ -51,6 +51,15 @@ func (q *Queries) CreateAudioFile(ctx context.Context, arg CreateAudioFileParams
|
||||
return i, err
|
||||
}
|
||||
|
||||
const deleteAllAudioFiles = `-- name: DeleteAllAudioFiles :exec
|
||||
DELETE FROM audio_files
|
||||
`
|
||||
|
||||
func (q *Queries) DeleteAllAudioFiles(ctx context.Context) error {
|
||||
_, err := q.db.ExecContext(ctx, deleteAllAudioFiles)
|
||||
return err
|
||||
}
|
||||
|
||||
const deleteAudioFile = `-- name: DeleteAudioFile :exec
|
||||
DELETE FROM audio_files
|
||||
WHERE id = ?
|
||||
|
||||
@@ -32,6 +32,15 @@ func (q *Queries) CreateCoverArt(ctx context.Context, arg CreateCoverArtParams)
|
||||
return i, err
|
||||
}
|
||||
|
||||
const deleteAllCoverArt = `-- name: DeleteAllCoverArt :exec
|
||||
DELETE FROM cover_art
|
||||
`
|
||||
|
||||
func (q *Queries) DeleteAllCoverArt(ctx context.Context) error {
|
||||
_, err := q.db.ExecContext(ctx, deleteAllCoverArt)
|
||||
return err
|
||||
}
|
||||
|
||||
const deleteCoverArt = `-- name: DeleteCoverArt :exec
|
||||
DELETE FROM cover_art
|
||||
WHERE id = ?
|
||||
|
||||
@@ -58,6 +58,15 @@ func (q *Queries) CreatePlaylist(ctx context.Context, name string) (Playlist, er
|
||||
return i, err
|
||||
}
|
||||
|
||||
const deleteAllPlaylistTracks = `-- name: DeleteAllPlaylistTracks :exec
|
||||
DELETE FROM playlist_tracks
|
||||
`
|
||||
|
||||
func (q *Queries) DeleteAllPlaylistTracks(ctx context.Context) error {
|
||||
_, err := q.db.ExecContext(ctx, deleteAllPlaylistTracks)
|
||||
return err
|
||||
}
|
||||
|
||||
const deletePlaylist = `-- name: DeletePlaylist :exec
|
||||
DELETE FROM playlists WHERE id = ?
|
||||
`
|
||||
|
||||
@@ -86,6 +86,15 @@ func (q *Queries) CreateRecordingFull(ctx context.Context, arg CreateRecordingFu
|
||||
return i, err
|
||||
}
|
||||
|
||||
const deleteAllRecordings = `-- name: DeleteAllRecordings :exec
|
||||
DELETE FROM recordings
|
||||
`
|
||||
|
||||
func (q *Queries) DeleteAllRecordings(ctx context.Context) error {
|
||||
_, err := q.db.ExecContext(ctx, deleteAllRecordings)
|
||||
return err
|
||||
}
|
||||
|
||||
const deleteRecording = `-- name: DeleteRecording :exec
|
||||
DELETE FROM recordings
|
||||
WHERE id = ?
|
||||
|
||||
@@ -41,6 +41,15 @@ func (q *Queries) CreateReleaseGroupRecording(ctx context.Context, arg CreateRel
|
||||
return i, err
|
||||
}
|
||||
|
||||
const deleteAllReleaseGroupRecordings = `-- name: DeleteAllReleaseGroupRecordings :exec
|
||||
DELETE FROM release_group_recordings
|
||||
`
|
||||
|
||||
func (q *Queries) DeleteAllReleaseGroupRecordings(ctx context.Context) error {
|
||||
_, err := q.db.ExecContext(ctx, deleteAllReleaseGroupRecordings)
|
||||
return err
|
||||
}
|
||||
|
||||
const deleteReleaseGroupRecording = `-- name: DeleteReleaseGroupRecording :exec
|
||||
DELETE FROM release_group_recordings
|
||||
WHERE id = ?
|
||||
|
||||
@@ -68,6 +68,15 @@ func (q *Queries) CreateReleaseGroupFull(ctx context.Context, arg CreateReleaseG
|
||||
return i, err
|
||||
}
|
||||
|
||||
const deleteAllReleaseGroups = `-- name: DeleteAllReleaseGroups :exec
|
||||
DELETE FROM release_groups
|
||||
`
|
||||
|
||||
func (q *Queries) DeleteAllReleaseGroups(ctx context.Context) error {
|
||||
_, err := q.db.ExecContext(ctx, deleteAllReleaseGroups)
|
||||
return err
|
||||
}
|
||||
|
||||
const deleteReleaseGroup = `-- name: DeleteReleaseGroup :exec
|
||||
DELETE FROM release_groups
|
||||
WHERE id = ?
|
||||
|
||||
Reference in New Issue
Block a user