update importst
This commit is contained in:
@@ -10,12 +10,12 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/sentriz/gonic/db"
|
||||
|
||||
"github.com/dhowden/tag"
|
||||
"github.com/jinzhu/gorm"
|
||||
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
||||
"github.com/karrick/godirwalk"
|
||||
|
||||
"github.com/sentriz/gonic/db"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -6,12 +6,12 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gobuffalo/packr/v2"
|
||||
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
||||
"github.com/wader/gormstore"
|
||||
|
||||
"github.com/sentriz/gonic/db"
|
||||
"github.com/sentriz/gonic/handler"
|
||||
|
||||
"github.com/gobuffalo/packr/v2"
|
||||
"github.com/wader/gormstore"
|
||||
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -7,7 +7,7 @@ type Album struct {
|
||||
IDBase
|
||||
CrudBase
|
||||
AlbumArtist AlbumArtist
|
||||
AlbumArtistID int `gorm:"index"`
|
||||
AlbumArtistID int `gorm:"index"`
|
||||
Title string `gorm:"not null;index"`
|
||||
Tracks []Track
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"github.com/gorilla/sessions"
|
||||
"github.com/jinzhu/gorm"
|
||||
|
||||
"github.com/sentriz/gonic/db"
|
||||
"github.com/sentriz/gonic/handler/utilities"
|
||||
"github.com/sentriz/gonic/lastfm"
|
||||
|
||||
@@ -10,11 +10,11 @@ import (
|
||||
"strconv"
|
||||
|
||||
"github.com/gorilla/sessions"
|
||||
"github.com/sentriz/gonic/db"
|
||||
"github.com/sentriz/gonic/subsonic"
|
||||
|
||||
"github.com/jinzhu/gorm"
|
||||
"github.com/wader/gormstore"
|
||||
|
||||
"github.com/sentriz/gonic/db"
|
||||
"github.com/sentriz/gonic/subsonic"
|
||||
)
|
||||
|
||||
type Controller struct {
|
||||
|
||||
@@ -8,18 +8,17 @@ import (
|
||||
"unicode"
|
||||
|
||||
"github.com/jinzhu/gorm"
|
||||
"github.com/mozillazg/go-unidecode"
|
||||
|
||||
"github.com/sentriz/gonic/db"
|
||||
"github.com/sentriz/gonic/lastfm"
|
||||
"github.com/sentriz/gonic/subsonic"
|
||||
|
||||
"github.com/mozillazg/go-unidecode"
|
||||
)
|
||||
|
||||
var orderExpr = map[string]interface{}{
|
||||
"random": gorm.Expr("random()"),
|
||||
"newest": "updated_at desc",
|
||||
"alphabeticalByName": "title",
|
||||
"alphabeticalByArtist": "album_artist.name",
|
||||
"random": gorm.Expr("random()"),
|
||||
"newest": "updated_at desc",
|
||||
"alphabeticalByName": "title",
|
||||
}
|
||||
|
||||
func indexOf(s string) rune {
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
|
||||
"github.com/gorilla/sessions"
|
||||
"github.com/jinzhu/gorm"
|
||||
|
||||
"github.com/sentriz/gonic/db"
|
||||
)
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
baseURL = "http://ws.audioscrobbler.com/2.0/"
|
||||
baseURL = "https://ws.audioscrobbler.com/2.0/"
|
||||
client = &http.Client{
|
||||
Timeout: 10 * time.Second,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user