mirror of
https://github.com/navidrome/navidrome.git
synced 2025-06-06 10:23:21 +03:00
Added Starred for Album and MediaFile
This commit is contained in:
parent
393b7f5b90
commit
f01a5f143d
@ -3,7 +3,7 @@ path = github.com/deluan/gosonic
|
|||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
github.com/astaxie/beego = commit:92d0b9a
|
github.com/astaxie/beego = commit:92d0b9a
|
||||||
github.com/dhowden/itl = commit:35d15a3
|
github.com/deluan/itl = commit:35d15a3
|
||||||
github.com/siddontang/ledisdb = commit:713b229
|
github.com/siddontang/ledisdb = commit:713b229
|
||||||
github.com/smartystreets/goconvey = commit:899ed5a
|
github.com/smartystreets/goconvey = commit:899ed5a
|
||||||
github.com/karlkfi/inject = commit:fe06da2
|
github.com/karlkfi/inject = commit:fe06da2
|
||||||
|
@ -9,7 +9,7 @@ install:
|
|||||||
- go get github.com/gpmgo/gopm
|
- go get github.com/gpmgo/gopm
|
||||||
- gopm list -v
|
- gopm list -v
|
||||||
- go get github.com/astaxie/beego
|
- go get github.com/astaxie/beego
|
||||||
- go get github.com/dhowden/itl
|
- go get github.com/deluan/itl
|
||||||
- go get github.com/siddontang/ledisdb/ledis
|
- go get github.com/siddontang/ledisdb/ledis
|
||||||
- go get github.com/karlkfi/inject
|
- go get github.com/karlkfi/inject
|
||||||
- go get github.com/smartystreets/goconvey
|
- go get github.com/smartystreets/goconvey
|
||||||
|
@ -9,6 +9,7 @@ type Album struct {
|
|||||||
AlbumArtist string
|
AlbumArtist string
|
||||||
Year int
|
Year int
|
||||||
Compilation bool
|
Compilation bool
|
||||||
|
Starred bool
|
||||||
Rating int
|
Rating int
|
||||||
Genre string
|
Genre string
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ type MediaFile struct {
|
|||||||
BitRate int
|
BitRate int
|
||||||
Genre string
|
Genre string
|
||||||
Compilation bool
|
Compilation bool
|
||||||
|
Starred bool
|
||||||
CreatedAt time.Time
|
CreatedAt time.Time
|
||||||
UpdatedAt time.Time
|
UpdatedAt time.Time
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package scanner
|
package scanner
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/dhowden/itl"
|
"github.com/deluan/itl"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@ -26,6 +26,8 @@ func (s *ItunesScanner) LoadFolder(path string) []Track {
|
|||||||
mediaFiles[i].AlbumArtist = unescape(t.AlbumArtist)
|
mediaFiles[i].AlbumArtist = unescape(t.AlbumArtist)
|
||||||
mediaFiles[i].Genre = unescape(t.Genre)
|
mediaFiles[i].Genre = unescape(t.Genre)
|
||||||
mediaFiles[i].Compilation = t.Compilation
|
mediaFiles[i].Compilation = t.Compilation
|
||||||
|
mediaFiles[i].Loved = t.Loved
|
||||||
|
mediaFiles[i].AlbumLoved = t.AlbumLoved
|
||||||
mediaFiles[i].Year = t.Year
|
mediaFiles[i].Year = t.Year
|
||||||
mediaFiles[i].TrackNumber = t.TrackNumber
|
mediaFiles[i].TrackNumber = t.TrackNumber
|
||||||
mediaFiles[i].DiscNumber = t.DiscNumber
|
mediaFiles[i].DiscNumber = t.DiscNumber
|
||||||
|
@ -71,6 +71,7 @@ func parseTrack(t *Track) (*domain.MediaFile, *domain.Album, *domain.Artist) {
|
|||||||
AlbumArtist: t.AlbumArtist,
|
AlbumArtist: t.AlbumArtist,
|
||||||
Title: t.Title,
|
Title: t.Title,
|
||||||
Compilation: t.Compilation,
|
Compilation: t.Compilation,
|
||||||
|
Starred: t.Loved,
|
||||||
Path: t.Path,
|
Path: t.Path,
|
||||||
CreatedAt: t.CreatedAt,
|
CreatedAt: t.CreatedAt,
|
||||||
UpdatedAt: t.UpdatedAt,
|
UpdatedAt: t.UpdatedAt,
|
||||||
@ -88,6 +89,7 @@ func parseTrack(t *Track) (*domain.MediaFile, *domain.Album, *domain.Artist) {
|
|||||||
Name: t.Album,
|
Name: t.Album,
|
||||||
Year: t.Year,
|
Year: t.Year,
|
||||||
Compilation: t.Compilation,
|
Compilation: t.Compilation,
|
||||||
|
Starred: t.Loved,
|
||||||
Genre: t.Genre,
|
Genre: t.Genre,
|
||||||
Artist: t.Artist,
|
Artist: t.Artist,
|
||||||
AlbumArtist: t.AlbumArtist,
|
AlbumArtist: t.AlbumArtist,
|
||||||
|
@ -20,6 +20,8 @@ type Track struct {
|
|||||||
Duration int
|
Duration int
|
||||||
BitRate int
|
BitRate int
|
||||||
Compilation bool
|
Compilation bool
|
||||||
|
Loved bool
|
||||||
|
AlbumLoved bool
|
||||||
CreatedAt time.Time
|
CreatedAt time.Time
|
||||||
UpdatedAt time.Time
|
UpdatedAt time.Time
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user