Remove sort.Interface from models (not used anymore)

This commit is contained in:
Deluan
2020-01-15 08:36:25 -05:00
parent 19765b0ad8
commit c404252b7f
3 changed files with 1 additions and 16 deletions
-9
View File
@@ -1,7 +1,5 @@
package model
import "github.com/cloudsonic/sonic-server/utils"
type ArtistInfo struct {
ArtistID string
Artist string
@@ -14,13 +12,6 @@ type ArtistIndex struct {
}
type ArtistInfos []ArtistInfo
func (a ArtistInfos) Len() int { return len(a) }
func (a ArtistInfos) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
func (a ArtistInfos) Less(i, j int) bool {
return utils.NoArticle(a[i].Artist) < utils.NoArticle(a[j].Artist)
}
type ArtistIndexes []ArtistIndex
type ArtistIndexRepository interface {
-6
View File
@@ -39,12 +39,6 @@ func (mf *MediaFile) ContentType() string {
type MediaFiles []MediaFile
func (a MediaFiles) Len() int { return len(a) }
func (a MediaFiles) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
func (a MediaFiles) Less(i, j int) bool {
return (a[i].DiscNumber*1000 + a[i].TrackNumber) < (a[j].DiscNumber*1000 + a[j].TrackNumber)
}
type MediaFileRepository interface {
CountAll() (int64, error)
Exists(id string) (bool, error)