fix opensubsonic date, and locale detection
This commit is contained in:
@@ -585,7 +585,7 @@ func fillAlbum(subAlbum *subsonic.AlbumID3, album *mediaprovider.Album) {
|
||||
album.Date = mediaprovider.ItemDate{
|
||||
Year: ord.Year,
|
||||
Month: ord.Month,
|
||||
Day: ord.Date,
|
||||
Day: ord.Day,
|
||||
}
|
||||
} else {
|
||||
album.Date.Year = &subAlbum.Year
|
||||
@@ -594,7 +594,7 @@ func fillAlbum(subAlbum *subsonic.AlbumID3, album *mediaprovider.Album) {
|
||||
album.ReissueDate = mediaprovider.ItemDate{
|
||||
Year: rd.Year,
|
||||
Month: rd.Month,
|
||||
Day: rd.Date,
|
||||
Day: rd.Day,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ require (
|
||||
github.com/pelletier/go-toml/v2 v2.0.8
|
||||
github.com/quarckster/go-mpris-server v1.0.3
|
||||
github.com/supersonic-app/go-mpv v0.1.0
|
||||
github.com/supersonic-app/go-subsonic v0.0.0-20241017150725-a5686988ef9c
|
||||
github.com/supersonic-app/go-subsonic v0.0.0-20241224013245-9b2841f3711d
|
||||
github.com/zalando/go-keyring v0.2.1
|
||||
golang.org/x/net v0.25.0
|
||||
golang.org/x/text v0.16.0
|
||||
|
||||
@@ -311,8 +311,8 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl
|
||||
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
|
||||
github.com/supersonic-app/go-mpv v0.1.0 h1:U+cCnLQxmpqx5mY6nMlC0J4uIdCCXUbAjpjS04XkFu8=
|
||||
github.com/supersonic-app/go-mpv v0.1.0/go.mod h1:1bQz6kBQumJopXEbkiqoLxIXLy7F7yWFBvknvpAtIC0=
|
||||
github.com/supersonic-app/go-subsonic v0.0.0-20241017150725-a5686988ef9c h1:UsXe5/TXViPgw21zO2Fgh0F/hSl0TXox0yjRc+vT6XQ=
|
||||
github.com/supersonic-app/go-subsonic v0.0.0-20241017150725-a5686988ef9c/go.mod h1:D+OWPXeD9owcdcoXATv5YPBGWxxVvn5k98rt5B4wMc4=
|
||||
github.com/supersonic-app/go-subsonic v0.0.0-20241224013245-9b2841f3711d h1:70+Nn7yh+cfeKqqXVTdpneFqXuvrBLyP7U6GVUsjTU4=
|
||||
github.com/supersonic-app/go-subsonic v0.0.0-20241224013245-9b2841f3711d/go.mod h1:D+OWPXeD9owcdcoXATv5YPBGWxxVvn5k98rt5B4wMc4=
|
||||
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
|
||||
+2
-2
@@ -35,8 +35,8 @@ const (
|
||||
|
||||
func dateFormatForLocale(locale string) DateFormat {
|
||||
var region string
|
||||
if i := strings.Index(locale, "-"); i > 0 {
|
||||
region = locale[i+1:]
|
||||
if i := strings.Index(locale, "-"); i > 0 && len(locale) >= 5 {
|
||||
region = locale[i+1 : i+3]
|
||||
}
|
||||
switch strings.ToUpper(region) {
|
||||
case "US":
|
||||
|
||||
Reference in New Issue
Block a user