feat: implement Live/Remix filtering and add CI/CD pipeline
Some checks failed
Build and Push Docker Image / build (pull_request) Failing after 38s
Some checks failed
Build and Push Docker Image / build (pull_request) Failing after 38s
This commit includes: 1. Live/Remix Filtering Feature: - Added ignore_live and ignore_remix columns to artist_settings table (migration 010) - Updated ArtistSettings struct with IgnoreLive and IgnoreRemix fields - Modified SaveArtistSettings and UpdateArtistSettings to handle new fields - Extended FilterOptions struct with IgnoreLive and IgnoreRemix - Updated ApplyTypeToggles and ApplyTypeTogglesToReleaseGroups to filter Live/Remix types - Added toggleIgnoreLive and toggleIgnoreRemix handlers in web layer - Updated ArtistData view model and artist.html template with new toggle UI - Comprehensive test coverage for all new functionality 2. CI/CD Pipeline with Gitea Actions: - Added .gitea/workflows/docker-build.yml for automated Docker builds - Workflow triggers on pushes to main/master and tags, plus PRs - Runs Go tests before building - Builds and pushes multi-architecture Docker images to gitea.mrixs.me - Includes caching for faster subsequent builds - Proper tagging strategy (branch, semver, SHA) - CI-CD-GUIDE.md documentation 3. Cleanup: - Removed temporary build artifacts and coverage files
This commit is contained in:
@@ -15,6 +15,12 @@ type DB struct {
|
||||
conn *sql.DB
|
||||
}
|
||||
|
||||
// DBer is the minimal query interface satisfied by both *sql.DB and *sql.Tx,
|
||||
// so callers can run statements inside or outside a transaction.
|
||||
type DBer interface {
|
||||
Exec(query string, args ...interface{}) (sql.Result, error)
|
||||
}
|
||||
|
||||
// ErrArtistNotFound is returned by artist lookups when no row matches the given
|
||||
// ID. It is a sentinel so callers (e.g. the web UI) can distinguish "missing"
|
||||
// from other errors.
|
||||
@@ -164,6 +170,11 @@ func (db *DB) migrate() error {
|
||||
name: "009_add_last_synced_to_artist_settings",
|
||||
sql: `ALTER TABLE artist_settings ADD COLUMN last_synced DATETIME;`,
|
||||
},
|
||||
{
|
||||
name: "010_add_ignore_live_ignore_remix_to_artist_settings",
|
||||
sql: `ALTER TABLE artist_settings ADD COLUMN ignore_live BOOLEAN DEFAULT 0;
|
||||
ALTER TABLE artist_settings ADD COLUMN ignore_remix BOOLEAN DEFAULT 0;`,
|
||||
},
|
||||
}
|
||||
|
||||
for _, m := range migrations {
|
||||
@@ -215,6 +226,8 @@ type ArtistSettings struct {
|
||||
MBID string `json:"mbid"`
|
||||
IgnoreSingles bool `json:"ignore_singles"`
|
||||
IgnoreCompilations bool `json:"ignore_compilations"`
|
||||
IgnoreLive bool `json:"ignore_live"`
|
||||
IgnoreRemix bool `json:"ignore_remix"`
|
||||
Monitored bool `json:"monitored"`
|
||||
LastSynced time.Time `json:"last_synced"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user