mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 04:57:37 +03:00
Clean up
This commit is contained in:
parent
7610b42f4b
commit
5bc1551b09
5 changed files with 5 additions and 22 deletions
|
@ -1,17 +0,0 @@
|
|||
package persistence
|
||||
|
||||
import (
|
||||
"github.com/google/wire"
|
||||
)
|
||||
|
||||
var Set = wire.NewSet(
|
||||
//NewArtistRepository,
|
||||
//NewMediaFileRepository,
|
||||
//NewAlbumRepository,
|
||||
//NewCheckSumRepository,
|
||||
//NewPropertyRepository,
|
||||
//NewPlaylistRepository,
|
||||
//NewMediaFolderRepository,
|
||||
//NewGenreRepository,
|
||||
New,
|
||||
)
|
|
@ -28,7 +28,7 @@ type Router struct {
|
|||
mux http.Handler
|
||||
}
|
||||
|
||||
func NewRouter(browser engine.Browser, cover engine.Cover, listGenerator engine.ListGenerator,
|
||||
func New(browser engine.Browser, cover engine.Cover, listGenerator engine.ListGenerator,
|
||||
playlists engine.Playlists, ratings engine.Ratings, scrobbler engine.Scrobbler, search engine.Search) *Router {
|
||||
|
||||
r := &Router{Browser: browser, Cover: cover, ListGenerator: listGenerator, Playlists: playlists,
|
||||
|
|
|
@ -33,10 +33,10 @@ func CreateSubsonicAPIRouter() *subsonic.Router {
|
|||
ratings := engine.NewRatings(dataStore)
|
||||
scrobbler := engine.NewScrobbler(dataStore, nowPlayingRepository)
|
||||
search := engine.NewSearch(dataStore)
|
||||
router := subsonic.NewRouter(browser, cover, listGenerator, playlists, ratings, scrobbler, search)
|
||||
router := subsonic.New(browser, cover, listGenerator, playlists, ratings, scrobbler, search)
|
||||
return router
|
||||
}
|
||||
|
||||
// wire_injectors.go:
|
||||
|
||||
var allProviders = wire.NewSet(engine.Set, scanner.New, subsonic.NewRouter, persistence.Set)
|
||||
var allProviders = wire.NewSet(engine.Set, scanner.New, subsonic.New, persistence.New)
|
||||
|
|
|
@ -14,8 +14,8 @@ import (
|
|||
var allProviders = wire.NewSet(
|
||||
engine.Set,
|
||||
scanner.New,
|
||||
subsonic.NewRouter,
|
||||
persistence.Set,
|
||||
subsonic.New,
|
||||
persistence.New,
|
||||
)
|
||||
|
||||
func CreateApp(musicFolder string) *server.Server {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue