move senan.xyz/g/ to go.senan.xyz
This commit is contained in:
@@ -27,7 +27,7 @@ password can then be changed from the web interface
|
|||||||
```
|
```
|
||||||
$ apt install build-essential git sqlite libtag1-dev ffmpeg # for debian like
|
$ apt install build-essential git sqlite libtag1-dev ffmpeg # for debian like
|
||||||
$ pacman -S base-devel git sqlite taglib ffmpeg # for arch like
|
$ pacman -S base-devel git sqlite taglib ffmpeg # for arch like
|
||||||
$ go get senan.xyz/g/gonic/cmd/gonic
|
$ go get go.senan.xyz/gonic/cmd/gonic
|
||||||
$ export PATH=$PATH:$HOME/go/bin
|
$ export PATH=$PATH:$HOME/go/bin
|
||||||
$ gonic -h # or see "configuration options below"
|
$ gonic -h # or see "configuration options below"
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ import (
|
|||||||
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
||||||
"github.com/peterbourgon/ff"
|
"github.com/peterbourgon/ff"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/db"
|
"go.senan.xyz/gonic/db"
|
||||||
"senan.xyz/g/gonic/server"
|
"go.senan.xyz/gonic/server"
|
||||||
"senan.xyz/g/gonic/version"
|
"go.senan.xyz/gonic/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import (
|
|||||||
"github.com/peterbourgon/ff"
|
"github.com/peterbourgon/ff"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/version"
|
"go.senan.xyz/gonic/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
// once i had this written with ~100% text/template but it was very
|
// once i had this written with ~100% text/template but it was very
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ import (
|
|||||||
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
||||||
"github.com/peterbourgon/ff"
|
"github.com/peterbourgon/ff"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/db"
|
"go.senan.xyz/gonic/db"
|
||||||
"senan.xyz/g/gonic/scanner"
|
"go.senan.xyz/gonic/scanner"
|
||||||
"senan.xyz/g/gonic/version"
|
"go.senan.xyz/gonic/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/mime"
|
"go.senan.xyz/gonic/mime"
|
||||||
)
|
)
|
||||||
|
|
||||||
func splitInt(in, sep string) []int {
|
func splitInt(in, sep string) []int {
|
||||||
|
|||||||
2
go.mod
2
go.mod
@@ -1,4 +1,4 @@
|
|||||||
module senan.xyz/g/gonic
|
module go.senan.xyz/gonic
|
||||||
|
|
||||||
require (
|
require (
|
||||||
cloud.google.com/go v0.40.0 // indirect
|
cloud.google.com/go v0.40.0 // indirect
|
||||||
|
|||||||
@@ -15,10 +15,10 @@ import (
|
|||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/rainycape/unidecode"
|
"github.com/rainycape/unidecode"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/db"
|
"go.senan.xyz/gonic/db"
|
||||||
"senan.xyz/g/gonic/mime"
|
"go.senan.xyz/gonic/mime"
|
||||||
"senan.xyz/g/gonic/scanner/stack"
|
"go.senan.xyz/gonic/scanner/stack"
|
||||||
"senan.xyz/g/gonic/scanner/tags"
|
"go.senan.xyz/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"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/db"
|
"go.senan.xyz/gonic/db"
|
||||||
)
|
)
|
||||||
|
|
||||||
var testScanner *Scanner
|
var testScanner *Scanner
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/db"
|
"go.senan.xyz/gonic/db"
|
||||||
)
|
)
|
||||||
|
|
||||||
type item struct {
|
type item struct {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package stack
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/db"
|
"go.senan.xyz/gonic/db"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestFolderStack(t *testing.T) {
|
func TestFolderStack(t *testing.T) {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
<span class="text-light">{{ .Version }}</span>
|
<span class="text-light">{{ .Version }}</span>
|
||||||
senan kelly, 2020
|
senan kelly, 2020
|
||||||
<span class="text-light">|</span>
|
<span class="text-light">|</span>
|
||||||
<a href="https://senan.xyz/g/gonic">github</a>
|
<a href="https://github.com/sentriz/gonic">github</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ import (
|
|||||||
"github.com/oxtoacart/bpool"
|
"github.com/oxtoacart/bpool"
|
||||||
"github.com/wader/gormstore"
|
"github.com/wader/gormstore"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/db"
|
"go.senan.xyz/gonic/db"
|
||||||
"senan.xyz/g/gonic/server/assets"
|
"go.senan.xyz/gonic/server/assets"
|
||||||
"senan.xyz/g/gonic/server/ctrlbase"
|
"go.senan.xyz/gonic/server/ctrlbase"
|
||||||
"senan.xyz/g/gonic/version"
|
"go.senan.xyz/gonic/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CtxKey int
|
type CtxKey int
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/db"
|
"go.senan.xyz/gonic/db"
|
||||||
"senan.xyz/g/gonic/scanner"
|
"go.senan.xyz/gonic/scanner"
|
||||||
"senan.xyz/g/gonic/server/encode"
|
"go.senan.xyz/gonic/server/encode"
|
||||||
"senan.xyz/g/gonic/server/lastfm"
|
"go.senan.xyz/gonic/server/lastfm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func firstExisting(or string, strings ...string) string {
|
func firstExisting(or string, strings ...string) string {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
"github.com/jinzhu/gorm"
|
"github.com/jinzhu/gorm"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/db"
|
"go.senan.xyz/gonic/db"
|
||||||
)
|
)
|
||||||
|
|
||||||
func playlistParseLine(c *Controller, path string) (int, error) {
|
func playlistParseLine(c *Controller, path string) (int, error) {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/sessions"
|
"github.com/gorilla/sessions"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/db"
|
"go.senan.xyz/gonic/db"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (c *Controller) WithSession(next http.Handler) http.Handler {
|
func (c *Controller) WithSession(next http.Handler) http.Handler {
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"path"
|
"path"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/db"
|
"go.senan.xyz/gonic/db"
|
||||||
"senan.xyz/g/gonic/scanner"
|
"go.senan.xyz/gonic/scanner"
|
||||||
)
|
)
|
||||||
|
|
||||||
type statusWriter struct {
|
type statusWriter struct {
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ import (
|
|||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/server/ctrlbase"
|
"go.senan.xyz/gonic/server/ctrlbase"
|
||||||
"senan.xyz/g/gonic/server/ctrlsubsonic/params"
|
"go.senan.xyz/gonic/server/ctrlsubsonic/params"
|
||||||
"senan.xyz/g/gonic/server/ctrlsubsonic/spec"
|
"go.senan.xyz/gonic/server/ctrlsubsonic/spec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CtxKey int
|
type CtxKey int
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ import (
|
|||||||
|
|
||||||
jd "github.com/josephburnett/jd/lib"
|
jd "github.com/josephburnett/jd/lib"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/db"
|
"go.senan.xyz/gonic/db"
|
||||||
"senan.xyz/g/gonic/server/ctrlbase"
|
"go.senan.xyz/gonic/server/ctrlbase"
|
||||||
"senan.xyz/g/gonic/server/ctrlsubsonic/params"
|
"go.senan.xyz/gonic/server/ctrlsubsonic/params"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ import (
|
|||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/jinzhu/gorm"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/db"
|
"go.senan.xyz/gonic/db"
|
||||||
"senan.xyz/g/gonic/server/ctrlsubsonic/params"
|
"go.senan.xyz/gonic/server/ctrlsubsonic/params"
|
||||||
"senan.xyz/g/gonic/server/ctrlsubsonic/spec"
|
"go.senan.xyz/gonic/server/ctrlsubsonic/spec"
|
||||||
)
|
)
|
||||||
|
|
||||||
// the subsonic spec metions "artist" a lot when talking about the
|
// the subsonic spec metions "artist" a lot when talking about the
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import (
|
|||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/jinzhu/gorm"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/db"
|
"go.senan.xyz/gonic/db"
|
||||||
"senan.xyz/g/gonic/server/ctrlsubsonic/params"
|
"go.senan.xyz/gonic/server/ctrlsubsonic/params"
|
||||||
"senan.xyz/g/gonic/server/ctrlsubsonic/spec"
|
"go.senan.xyz/gonic/server/ctrlsubsonic/spec"
|
||||||
"senan.xyz/g/gonic/server/lastfm"
|
"go.senan.xyz/gonic/server/lastfm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (c *Controller) ServeGetArtists(r *http.Request) *spec.Response {
|
func (c *Controller) ServeGetArtists(r *http.Request) *spec.Response {
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ import (
|
|||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/jinzhu/gorm"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/db"
|
"go.senan.xyz/gonic/db"
|
||||||
"senan.xyz/g/gonic/scanner"
|
"go.senan.xyz/gonic/scanner"
|
||||||
"senan.xyz/g/gonic/server/ctrlsubsonic/params"
|
"go.senan.xyz/gonic/server/ctrlsubsonic/params"
|
||||||
"senan.xyz/g/gonic/server/ctrlsubsonic/spec"
|
"go.senan.xyz/gonic/server/ctrlsubsonic/spec"
|
||||||
"senan.xyz/g/gonic/server/lastfm"
|
"go.senan.xyz/gonic/server/lastfm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func lowerUDecOrHash(in string) string {
|
func lowerUDecOrHash(in string) string {
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ import (
|
|||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/jinzhu/gorm"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/db"
|
"go.senan.xyz/gonic/db"
|
||||||
"senan.xyz/g/gonic/server/ctrlsubsonic/params"
|
"go.senan.xyz/gonic/server/ctrlsubsonic/params"
|
||||||
"senan.xyz/g/gonic/server/ctrlsubsonic/spec"
|
"go.senan.xyz/gonic/server/ctrlsubsonic/spec"
|
||||||
"senan.xyz/g/gonic/server/encode"
|
"go.senan.xyz/gonic/server/encode"
|
||||||
)
|
)
|
||||||
|
|
||||||
// "raw" handlers are ones that don't always return a spec response.
|
// "raw" handlers are ones that don't always return a spec response.
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/server/ctrlsubsonic/params"
|
"go.senan.xyz/gonic/server/ctrlsubsonic/params"
|
||||||
"senan.xyz/g/gonic/server/ctrlsubsonic/spec"
|
"go.senan.xyz/gonic/server/ctrlsubsonic/spec"
|
||||||
)
|
)
|
||||||
|
|
||||||
func checkCredsToken(password, token, salt string) bool {
|
func checkCredsToken(password, token, salt string) bool {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package spec
|
package spec
|
||||||
|
|
||||||
import "senan.xyz/g/gonic/db"
|
import "go.senan.xyz/gonic/db"
|
||||||
|
|
||||||
func NewPlaylist(p *db.Playlist) *Playlist {
|
func NewPlaylist(p *db.Playlist) *Playlist {
|
||||||
return &Playlist{
|
return &Playlist{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package spec
|
|||||||
import (
|
import (
|
||||||
"path"
|
"path"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/db"
|
"go.senan.xyz/gonic/db"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewAlbumByFolder(f *db.Album) *Album {
|
func NewAlbumByFolder(f *db.Album) *Album {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package spec
|
|||||||
import (
|
import (
|
||||||
"path"
|
"path"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/db"
|
"go.senan.xyz/gonic/db"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewAlbumByTags(a *db.Album, artist *db.Artist) *Album {
|
func NewAlbumByTags(a *db.Album, artist *db.Artist) *Album {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/version"
|
"go.senan.xyz/gonic/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import (
|
|||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/db"
|
"go.senan.xyz/gonic/db"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -10,12 +10,12 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"senan.xyz/g/gonic/db"
|
"go.senan.xyz/gonic/db"
|
||||||
"senan.xyz/g/gonic/scanner"
|
"go.senan.xyz/gonic/scanner"
|
||||||
"senan.xyz/g/gonic/server/assets"
|
"go.senan.xyz/gonic/server/assets"
|
||||||
"senan.xyz/g/gonic/server/ctrladmin"
|
"go.senan.xyz/gonic/server/ctrladmin"
|
||||||
"senan.xyz/g/gonic/server/ctrlbase"
|
"go.senan.xyz/gonic/server/ctrlbase"
|
||||||
"senan.xyz/g/gonic/server/ctrlsubsonic"
|
"go.senan.xyz/gonic/server/ctrlsubsonic"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user