update importst

This commit is contained in:
sentriz
2019-04-23 16:50:43 +01:00
parent f131cdf269
commit e2e68abc10
8 changed files with 18 additions and 17 deletions

View File

@@ -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 (

View File

@@ -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 (

View File

@@ -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
}

View File

@@ -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"

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -10,6 +10,7 @@ import (
"github.com/gorilla/sessions"
"github.com/jinzhu/gorm"
"github.com/sentriz/gonic/db"
)

View File

@@ -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,
}