Skip to content

🎧 Your Personal Streaming Service

Added Starred for Album and MediaFile

Deluanf01a5f143da8
diff --git a/.gopmfile b/.gopmfile
index 86cb5b50a..f4db45418 100644
--- a/.gopmfile
+++ b/.gopmfile
@@ -3,7 +3,7 @@ path = github.com/deluan/gosonic
[deps]
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/smartystreets/goconvey = commit:899ed5a
github.com/karlkfi/inject = commit:fe06da2
diff --git a/.travis.yml b/.travis.yml
index a1d1035da..ac24be1e6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,7 +9,7 @@ install:
- go get github.com/gpmgo/gopm
- gopm list -v
- 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/karlkfi/inject
- go get github.com/smartystreets/goconvey
diff --git a/domain/album.go b/domain/album.go
index e0f98fda3..556a61279 100644
--- a/domain/album.go
+++ b/domain/album.go
@@ -9,6 +9,7 @@ type Album struct {
AlbumArtist string
Year int
Compilation bool
+ Starred bool
Rating int
Genre string
}
diff --git a/domain/mediafile.go b/domain/mediafile.go
index b2969abff..a7416c8c4 100644
--- a/domain/mediafile.go
+++ b/domain/mediafile.go
@@ -21,6 +21,7 @@ type MediaFile struct {
BitRate int
Genre string
Compilation bool
+ Starred bool
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/scanner/itunes_scanner.go b/scanner/itunes_scanner.go
index 94ce105ac..e9a6162d6 100644
--- a/scanner/itunes_scanner.go
+++ b/scanner/itunes_scanner.go
@@ -1,7 +1,7 @@
package scanner
import (
- "github.com/dhowden/itl"
+ "github.com/deluan/itl"
"net/url"
"os"
"path/filepath"
@@ -26,6 +26,8 @@ func (s *ItunesScanner) LoadFolder(path string) []Track {
mediaFiles[i].AlbumArtist = unescape(t.AlbumArtist)
mediaFiles[i].Genre = unescape(t.Genre)
mediaFiles[i].Compilation = t.Compilation
+ mediaFiles[i].Loved = t.Loved
+ mediaFiles[i].AlbumLoved = t.AlbumLoved
mediaFiles[i].Year = t.Year
mediaFiles[i].TrackNumber = t.TrackNumber
mediaFiles[i].DiscNumber = t.DiscNumber
diff --git a/scanner/scanner.go b/scanner/scanner.go
index 14ee2ee52..0f3bd1b1d 100644
--- a/scanner/scanner.go
+++ b/scanner/scanner.go
@@ -71,6 +71,7 @@ func parseTrack(t *Track) (*domain.MediaFile, *domain.Album, *domain.Artist) {
AlbumArtist: t.AlbumArtist,
Title: t.Title,
Compilation: t.Compilation,
+ Starred: t.Loved,
Path: t.Path,
CreatedAt: t.CreatedAt,
UpdatedAt: t.UpdatedAt,
@@ -88,6 +89,7 @@ func parseTrack(t *Track) (*domain.MediaFile, *domain.Album, *domain.Artist) {
Name: t.Album,
Year: t.Year,
Compilation: t.Compilation,
+ Starred: t.Loved,
Genre: t.Genre,
Artist: t.Artist,
AlbumArtist: t.AlbumArtist,
diff --git a/scanner/track.go b/scanner/track.go
index 152388dc2..7628a0b6d 100644
--- a/scanner/track.go
+++ b/scanner/track.go
@@ -20,6 +20,8 @@ type Track struct {
Duration int
BitRate int
Compilation bool
+ Loved bool
+ AlbumLoved bool
CreatedAt time.Time
UpdatedAt time.Time
}