diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3300a85c..f58eec97 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,7 @@ stages: - bundle variables: - VERSION: 0.0.29 + VERSION: 0.0.30 build-go: image: golang:1.16.2 diff --git a/docs/changelog.md b/docs/changelog.md index c0c967a9..a1a6fb6b 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,3 +1,6 @@ +# 0.0.30 +- Fix artist/album/track images + # 0.0.29 - Add image handler - Store images locally diff --git a/internal/goscrobble/image.go b/internal/goscrobble/image.go index 369cb9eb..6e42f230 100644 --- a/internal/goscrobble/image.go +++ b/internal/goscrobble/image.go @@ -38,9 +38,13 @@ func importImage(uuid string, url string) error { return err } + // Goroutine the resize to keep it _faaaast_ + go resizeImage(uuid) return nil } -func resizeImage(uuid string) error { - return nil +func resizeImage(uuid string) { + // resize to 300x300 and maybe smaller? + + return } diff --git a/internal/goscrobble/ingress_spotify.go b/internal/goscrobble/ingress_spotify.go index 0f938d41..a94a7f54 100644 --- a/internal/goscrobble/ingress_spotify.go +++ b/internal/goscrobble/ingress_spotify.go @@ -238,7 +238,7 @@ func (user *User) updateImageDataFromSpotify() error { client := auth.NewClient(token) client.AutoRetry = true - rows, err := db.Query("SELECT BIN_TO_UUID(`uuid`, true), `name` FROM `artists` WHERE IFNULL(`img`,'') NOT IN ('pending', 'complete') LIMIT 50") + rows, err := db.Query("SELECT BIN_TO_UUID(`uuid`, true), `name` FROM `artists` WHERE IFNULL(`img`,'') NOT IN ('pending', 'complete') LIMIT 100") if err != nil { log.Printf("Failed to fetch config: %+v", err) return errors.New("Failed to fetch artists") @@ -282,7 +282,7 @@ func (user *User) updateImageDataFromSpotify() error { } tx.Commit() - rows, err = db.Query("SELECT BIN_TO_UUID(`uuid`, true), `name` FROM `albums` WHERE IFNULL(`img`,'') NOT IN ('pending', 'complete') LIMIT 50") + rows, err = db.Query("SELECT BIN_TO_UUID(`uuid`, true), `name` FROM `albums` WHERE IFNULL(`img`,'') NOT IN ('pending', 'complete') LIMIT 100") if err != nil { log.Printf("Failed to fetch config: %+v", err) return errors.New("Failed to fetch artists") diff --git a/internal/goscrobble/server.go b/internal/goscrobble/server.go index 4716e04b..947c9ae2 100644 --- a/internal/goscrobble/server.go +++ b/internal/goscrobble/server.go @@ -740,7 +740,7 @@ func getServerInfo(w http.ResponseWriter, r *http.Request) { } info := ServerInfo{ - Version: "0.0.29", + Version: "0.0.30", RegistrationEnabled: cachedRegistrationEnabled, } diff --git a/internal/goscrobble/timers.go b/internal/goscrobble/timers.go index 90b9c267..070e2bcb 100644 --- a/internal/goscrobble/timers.go +++ b/internal/goscrobble/timers.go @@ -8,9 +8,6 @@ import ( var endTicker chan bool func StartBackgroundWorkers() { - user, _ := getUserByUsername("idanoo") - go user.updateImageDataFromSpotify() - endTicker := make(chan bool) hourTicker := time.NewTicker(time.Duration(1) * time.Hour) diff --git a/web/src/Components/HomeBanner.css b/web/src/Components/HomeBanner.css index 277251ef..0c5f9010 100644 --- a/web/src/Components/HomeBanner.css +++ b/web/src/Components/HomeBanner.css @@ -11,5 +11,5 @@ } .homeBannerItemCount { - font-size: 22pt; + font-size: 1.9rem; } \ No newline at end of file diff --git a/web/src/Pages/Album.js b/web/src/Pages/Album.js index da968978..2fe66043 100644 --- a/web/src/Pages/Album.js +++ b/web/src/Pages/Album.js @@ -49,6 +49,7 @@ const Album = (route) => { {album.name}
+ {album.name}

{album.mbid && Open on MusicBrainz
} {album.spotify_id && Open on Spotify
}
diff --git a/web/src/Pages/Artist.js b/web/src/Pages/Artist.js index 952f61b5..114533ae 100644 --- a/web/src/Pages/Artist.js +++ b/web/src/Pages/Artist.js @@ -49,7 +49,7 @@ const Artist = (route) => { {artist.name}
- {artist.name}

+ {artist.name}

{artist.mbid && Open on MusicBrainz
} {artist.spotify_id && Open on Spotify
}
diff --git a/web/src/Pages/Home.css b/web/src/Pages/Home.css index e69de29b..7b539d4c 100644 --- a/web/src/Pages/Home.css +++ b/web/src/Pages/Home.css @@ -0,0 +1,11 @@ +.homeText { + margin: 0; + font-size: 2rem; +} + +.subHomeText { + margin-top: -5px; + font-style: italic; + color: #CCC; + font-size: 1.4rem; +} \ No newline at end of file diff --git a/web/src/Pages/Home.js b/web/src/Pages/Home.js index 67700d80..a8c0028a 100644 --- a/web/src/Pages/Home.js +++ b/web/src/Pages/Home.js @@ -9,6 +9,7 @@ const Home = () => {
logo

GoScrobble is an open source music scrobbling service.

+

Supports Spotify, Jellyfin, Navidrome / Subsonic / Airsonic.

); diff --git a/web/src/Pages/Track.js b/web/src/Pages/Track.js index 3b883d69..0e339b52 100644 --- a/web/src/Pages/Track.js +++ b/web/src/Pages/Track.js @@ -57,7 +57,7 @@ const Track = (route) => {
- {track.name}

+ {track.name}

{track.mbid && Open on MusicBrainz
} {track.spotify_id && Open on Spotify
} Track Length: {length && length}