Skip to content

Commit

Permalink
chore: resolve small issues (lint)
Browse files Browse the repository at this point in the history
  • Loading branch information
TorchedSammy committed Mar 24, 2024
1 parent c055bc2 commit e2ffe00
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions server/ctrlsubsonic/handlers_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"time"
"unicode"

"github.com/env25/mpdlrc/lrc"
"github.com/google/uuid"
"github.com/jinzhu/gorm"
"github.com/env25/mpdlrc/lrc"

"go.senan.xyz/gonic/db"
"go.senan.xyz/gonic/scanner"
Expand Down Expand Up @@ -472,7 +472,7 @@ func (c *Controller) ServeJukebox(r *http.Request) *spec.Response { // nolint:go

func (c *Controller) ServeGetLyrics(r *http.Request) *spec.Response {
params := r.Context().Value(CtxParams).(params.Params)
//artist, _ := params.Get("artist")
// artist, _ := params.Get("artist")
// idk how to query for artist
title, _ := params.Get("title")

Expand All @@ -497,9 +497,9 @@ func (c *Controller) ServeGetLyrics(r *http.Request) *spec.Response {

sub := spec.NewResponse()
sub.Lyrics = &spec.Lyrics{
Value: contents,
Value: contents,
Artist: track.TagTrackArtist,
Title: track.TagTitle,
Title: track.TagTitle,
}
return sub
}
Expand Down Expand Up @@ -537,12 +537,12 @@ func (c *Controller) ServeGetLyricsBySongID(r *http.Request) *spec.Response {
}

structured := spec.StructuredLyrics{
Lang: "und",
Synced: true,
Line: lines,
Lang: "und",
Synced: true,
Line: lines,
DisplayArtist: track.TagTrackArtist,
DisplayTitle: track.TagTitle,
Offset: 0,
DisplayTitle: track.TagTitle,
Offset: 0,
}

sub := spec.NewResponse()
Expand All @@ -556,7 +556,7 @@ func lyricsFile(file *db.Track) ([]lrc.Duration, []lrc.Text, error) {
dir := filepath.Dir(file.AbsPath())
filename := strings.TrimSuffix(filepath.Base(file.AbsPath()), filepath.Ext(file.AbsPath()))

lrcContent, err := os.ReadFile(filepath.Join(dir, filename + ".lrc"))
lrcContent, err := os.ReadFile(filepath.Join(dir, filename+".lrc"))
if err != nil {
return []lrc.Duration{}, []lrc.Text{}, err
}
Expand Down

0 comments on commit e2ffe00

Please sign in to comment.