mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-22 00:21:55 +00:00
0.0.30
- Fix artist/album/track images
This commit is contained in:
parent
8bc462878a
commit
65b4c78137
@ -3,7 +3,7 @@ stages:
|
||||
- bundle
|
||||
|
||||
variables:
|
||||
VERSION: 0.0.29
|
||||
VERSION: 0.0.30
|
||||
|
||||
build-go:
|
||||
image: golang:1.16.2
|
||||
|
@ -1,3 +1,6 @@
|
||||
# 0.0.30
|
||||
- Fix artist/album/track images
|
||||
|
||||
# 0.0.29
|
||||
- Add image handler
|
||||
- Store images locally
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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")
|
||||
|
@ -740,7 +740,7 @@ func getServerInfo(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
info := ServerInfo{
|
||||
Version: "0.0.29",
|
||||
Version: "0.0.30",
|
||||
RegistrationEnabled: cachedRegistrationEnabled,
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -11,5 +11,5 @@
|
||||
}
|
||||
|
||||
.homeBannerItemCount {
|
||||
font-size: 22pt;
|
||||
font-size: 1.9rem;
|
||||
}
|
@ -49,6 +49,7 @@ const Album = (route) => {
|
||||
{album.name}
|
||||
</h1>
|
||||
<div className="pageBody">
|
||||
<img src={process.env.REACT_APP_API_URL + "/img/" + album.uuid + "_full.jpg"} alt={album.name} style={{maxWidth: `300px`, maxHeight: `300px`}}/><br/><br/>
|
||||
{album.mbid && <a rel="noreferrer" target="_blank" href={"https://musicbrainz.org/album/" + album.mbid}>Open on MusicBrainz<br/></a>}
|
||||
{album.spotify_id && <a rel="noreferrer" target="_blank" href={"https://open.spotify.com/album/" + album.spotify_id}>Open on Spotify<br/></a>}
|
||||
</div>
|
||||
|
@ -49,7 +49,7 @@ const Artist = (route) => {
|
||||
{artist.name}
|
||||
</h1>
|
||||
<div className="pageBody" style={{textAlign: `center`}}>
|
||||
<img src={artist.img} alt={artist.name} style={{maxWidth: `300px`, maxHeight: `300px`}}/><br/><br/>
|
||||
<img src={process.env.REACT_APP_API_URL + "/img/" + artist.uuid + "_full.jpg"} alt={artist.name} style={{maxWidth: `300px`, maxHeight: `300px`}}/><br/><br/>
|
||||
{artist.mbid && <a rel="noreferrer" target="_blank" href={"https://musicbrainz.org/artist/" + artist.mbid}>Open on MusicBrainz<br/></a>}
|
||||
{artist.spotify_id && <a rel="noreferrer" target="_blank" href={"https://open.spotify.com/artist/" + artist.spotify_id}>Open on Spotify<br/></a>}
|
||||
</div>
|
||||
|
@ -0,0 +1,11 @@
|
||||
.homeText {
|
||||
margin: 0;
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.subHomeText {
|
||||
margin-top: -5px;
|
||||
font-style: italic;
|
||||
color: #CCC;
|
||||
font-size: 1.4rem;
|
||||
}
|
@ -9,6 +9,7 @@ const Home = () => {
|
||||
<div className="pageWrapper">
|
||||
<img src={logo} className="App-logo" alt="logo" />
|
||||
<p className="homeText">GoScrobble is an open source music scrobbling service.</p>
|
||||
<p className="subHomeText">Supports Spotify, Jellyfin, Navidrome / Subsonic / Airsonic.</p>
|
||||
<HomeBanner />
|
||||
</div>
|
||||
);
|
||||
|
@ -57,7 +57,7 @@ const Track = (route) => {
|
||||
</h1>
|
||||
|
||||
<div className="pageBody" style={{textAlign: `center`}}>
|
||||
<img src={track.img} alt={track.name} style={{maxWidth: `300px`, maxHeight: `300px`}}/><br/><br/>
|
||||
<img src={process.env.REACT_APP_API_URL + "/img/" + track.img + "_full.jpg"} alt={track.name} style={{maxWidth: `300px`, maxHeight: `300px`}}/><br/><br/>
|
||||
{track.mbid && <a rel="noreferrer" target="_blank" href={"https://musicbrainz.org/track/" + track.mbid}>Open on MusicBrainz<br/></a>}
|
||||
{track.spotify_id && <a rel="noreferrer" target="_blank" href={"https://open.spotify.com/track/" + track.spotify_id}>Open on Spotify<br/></a>}
|
||||
Track Length: {length && length}
|
||||
|
Loading…
Reference in New Issue
Block a user