use vanity url
This commit is contained in:
@@ -9,9 +9,9 @@ import (
|
|||||||
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
||||||
"github.com/peterbourgon/ff"
|
"github.com/peterbourgon/ff"
|
||||||
|
|
||||||
"github.com/sentriz/gonic/db"
|
"senan.xyz/g/gonic/db"
|
||||||
"github.com/sentriz/gonic/server"
|
"senan.xyz/g/gonic/server"
|
||||||
"github.com/sentriz/gonic/server/handler"
|
"senan.xyz/g/gonic/server/handler"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
||||||
"github.com/peterbourgon/ff"
|
"github.com/peterbourgon/ff"
|
||||||
|
|
||||||
"github.com/sentriz/gonic/db"
|
"senan.xyz/g/gonic/db"
|
||||||
"github.com/sentriz/gonic/scanner"
|
"senan.xyz/g/gonic/scanner"
|
||||||
)
|
)
|
||||||
|
|
||||||
const programName = "gonicscan"
|
const programName = "gonicscan"
|
||||||
|
|||||||
2
db/db.go
2
db/db.go
@@ -9,7 +9,7 @@ import (
|
|||||||
"github.com/jinzhu/gorm"
|
"github.com/jinzhu/gorm"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
||||||
"github.com/sentriz/gonic/model"
|
"senan.xyz/g/gonic/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/sentriz/gonic/mime"
|
"senan.xyz/g/gonic/mime"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Artist struct {
|
type Artist struct {
|
||||||
|
|||||||
@@ -15,11 +15,11 @@ import (
|
|||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/rainycape/unidecode"
|
"github.com/rainycape/unidecode"
|
||||||
|
|
||||||
"github.com/sentriz/gonic/db"
|
"senan.xyz/g/gonic/db"
|
||||||
"github.com/sentriz/gonic/mime"
|
"senan.xyz/g/gonic/mime"
|
||||||
"github.com/sentriz/gonic/model"
|
"senan.xyz/g/gonic/model"
|
||||||
"github.com/sentriz/gonic/scanner/stack"
|
"senan.xyz/g/gonic/scanner/stack"
|
||||||
"github.com/sentriz/gonic/scanner/tags"
|
"senan.xyz/g/gonic/scanner/tags"
|
||||||
)
|
)
|
||||||
|
|
||||||
// isScanning acts as an atomic boolean semaphore. we don't
|
// isScanning acts as an atomic boolean semaphore. we don't
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
||||||
|
|
||||||
"github.com/sentriz/gonic/db"
|
"senan.xyz/g/gonic/db"
|
||||||
)
|
)
|
||||||
|
|
||||||
var testScanner *Scanner
|
var testScanner *Scanner
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/sentriz/gonic/model"
|
"senan.xyz/g/gonic/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type item struct {
|
type item struct {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package stack
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/sentriz/gonic/model"
|
"senan.xyz/g/gonic/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func egAlbum(id int) *model.Album {
|
func egAlbum(id int) *model.Album {
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"path"
|
"path"
|
||||||
|
|
||||||
"github.com/sentriz/gonic/model"
|
"senan.xyz/g/gonic/model"
|
||||||
"github.com/sentriz/gonic/server/subsonic"
|
"senan.xyz/g/gonic/server/subsonic"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newAlbumByFolder(f *model.Album) *subsonic.Album {
|
func newAlbumByFolder(f *model.Album) *subsonic.Album {
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"path"
|
"path"
|
||||||
|
|
||||||
"github.com/sentriz/gonic/model"
|
"senan.xyz/g/gonic/model"
|
||||||
"github.com/sentriz/gonic/server/subsonic"
|
"senan.xyz/g/gonic/server/subsonic"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newAlbumByTags(a *model.Album, artist *model.Artist) *subsonic.Album {
|
func newAlbumByTags(a *model.Album, artist *model.Artist) *subsonic.Album {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
|
|
||||||
"github.com/wader/gormstore"
|
"github.com/wader/gormstore"
|
||||||
|
|
||||||
"github.com/sentriz/gonic/db"
|
"senan.xyz/g/gonic/db"
|
||||||
)
|
)
|
||||||
|
|
||||||
type contextKey int
|
type contextKey int
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import (
|
|||||||
"github.com/gorilla/sessions"
|
"github.com/gorilla/sessions"
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/jinzhu/gorm"
|
||||||
|
|
||||||
"github.com/sentriz/gonic/model"
|
"senan.xyz/g/gonic/model"
|
||||||
"github.com/sentriz/gonic/scanner"
|
"senan.xyz/g/gonic/scanner"
|
||||||
"github.com/sentriz/gonic/server/lastfm"
|
"senan.xyz/g/gonic/server/lastfm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (c *Controller) ServeLogin(w http.ResponseWriter, r *http.Request) {
|
func (c *Controller) ServeLogin(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/jinzhu/gorm"
|
||||||
|
|
||||||
"github.com/sentriz/gonic/model"
|
"senan.xyz/g/gonic/model"
|
||||||
"github.com/sentriz/gonic/server/subsonic"
|
"senan.xyz/g/gonic/server/subsonic"
|
||||||
)
|
)
|
||||||
|
|
||||||
// the subsonic spec metions "artist" a lot when talking about the
|
// the subsonic spec metions "artist" a lot when talking about the
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/jinzhu/gorm"
|
||||||
|
|
||||||
"github.com/sentriz/gonic/model"
|
"senan.xyz/g/gonic/model"
|
||||||
"github.com/sentriz/gonic/server/subsonic"
|
"senan.xyz/g/gonic/server/subsonic"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (c *Controller) GetArtists(w http.ResponseWriter, r *http.Request) {
|
func (c *Controller) GetArtists(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ import (
|
|||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/jinzhu/gorm"
|
||||||
|
|
||||||
"github.com/sentriz/gonic/model"
|
"senan.xyz/g/gonic/model"
|
||||||
"github.com/sentriz/gonic/scanner"
|
"senan.xyz/g/gonic/scanner"
|
||||||
"github.com/sentriz/gonic/server/lastfm"
|
"senan.xyz/g/gonic/server/lastfm"
|
||||||
"github.com/sentriz/gonic/server/subsonic"
|
"senan.xyz/g/gonic/server/subsonic"
|
||||||
)
|
)
|
||||||
|
|
||||||
func lowerUDecOrHash(in string) string {
|
func lowerUDecOrHash(in string) string {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import (
|
|||||||
|
|
||||||
jd "github.com/josephburnett/jd/lib"
|
jd "github.com/josephburnett/jd/lib"
|
||||||
|
|
||||||
"github.com/sentriz/gonic/db"
|
"senan.xyz/g/gonic/db"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/sessions"
|
"github.com/gorilla/sessions"
|
||||||
|
|
||||||
"github.com/sentriz/gonic/model"
|
"senan.xyz/g/gonic/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
//nolint:interfacer
|
//nolint:interfacer
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/sessions"
|
"github.com/gorilla/sessions"
|
||||||
|
|
||||||
"github.com/sentriz/gonic/model"
|
"senan.xyz/g/gonic/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type templateData struct {
|
type templateData struct {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/sentriz/gonic/server/subsonic"
|
"senan.xyz/g/gonic/server/subsonic"
|
||||||
)
|
)
|
||||||
|
|
||||||
type metaResponse struct {
|
type metaResponse struct {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import (
|
|||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
||||||
"github.com/sentriz/gonic/model"
|
"senan.xyz/g/gonic/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/sentriz/gonic/db"
|
"senan.xyz/g/gonic/db"
|
||||||
"github.com/sentriz/gonic/server/handler"
|
"senan.xyz/g/gonic/server/handler"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Server struct {
|
type Server struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user