mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 13:07:36 +03:00
59 lines
2.9 KiB
Go
59 lines
2.9 KiB
Go
// Code generated by Wire. DO NOT EDIT.
|
|
|
|
//go:generate wire
|
|
//+build !wireinject
|
|
|
|
package main
|
|
|
|
import (
|
|
"github.com/cloudsonic/sonic-server/api"
|
|
"github.com/cloudsonic/sonic-server/engine"
|
|
"github.com/cloudsonic/sonic-server/itunesbridge"
|
|
"github.com/cloudsonic/sonic-server/persistence"
|
|
"github.com/cloudsonic/sonic-server/scanner"
|
|
"github.com/cloudsonic/sonic-server/scanner_legacy"
|
|
"github.com/cloudsonic/sonic-server/server"
|
|
"github.com/google/wire"
|
|
)
|
|
|
|
// Injectors from wire_injectors.go:
|
|
|
|
func CreateApp(musicFolder string) *server.Server {
|
|
checksumRepository := persistence.NewCheckSumRepository()
|
|
itunesScanner := scanner_legacy.NewItunesScanner(checksumRepository)
|
|
mediaFileRepository := persistence.NewMediaFileRepository()
|
|
albumRepository := persistence.NewAlbumRepository()
|
|
artistRepository := persistence.NewArtistRepository()
|
|
playlistRepository := persistence.NewPlaylistRepository()
|
|
propertyRepository := persistence.NewPropertyRepository()
|
|
importer := scanner_legacy.NewImporter(musicFolder, itunesScanner, mediaFileRepository, albumRepository, artistRepository, playlistRepository, propertyRepository)
|
|
mediaFolderRepository := persistence.NewMediaFolderRepository()
|
|
scannerScanner := scanner.New(mediaFileRepository, albumRepository, artistRepository, playlistRepository, mediaFolderRepository, propertyRepository)
|
|
serverServer := server.New(importer, scannerScanner)
|
|
return serverServer
|
|
}
|
|
|
|
func CreateSubsonicAPIRouter() *api.Router {
|
|
propertyRepository := persistence.NewPropertyRepository()
|
|
mediaFolderRepository := persistence.NewMediaFolderRepository()
|
|
artistRepository := persistence.NewArtistRepository()
|
|
albumRepository := persistence.NewAlbumRepository()
|
|
mediaFileRepository := persistence.NewMediaFileRepository()
|
|
genreRepository := persistence.NewGenreRepository()
|
|
browser := engine.NewBrowser(propertyRepository, mediaFolderRepository, artistRepository, albumRepository, mediaFileRepository, genreRepository)
|
|
cover := engine.NewCover(mediaFileRepository, albumRepository)
|
|
nowPlayingRepository := engine.NewNowPlayingRepository()
|
|
listGenerator := engine.NewListGenerator(artistRepository, albumRepository, mediaFileRepository, nowPlayingRepository)
|
|
itunesControl := itunesbridge.NewItunesControl()
|
|
playlistRepository := persistence.NewPlaylistRepository()
|
|
playlists := engine.NewPlaylists(itunesControl, playlistRepository, mediaFileRepository)
|
|
ratings := engine.NewRatings(itunesControl, mediaFileRepository, albumRepository, artistRepository)
|
|
scrobbler := engine.NewScrobbler(itunesControl, mediaFileRepository, albumRepository, nowPlayingRepository)
|
|
search := engine.NewSearch(artistRepository, albumRepository, mediaFileRepository)
|
|
router := api.NewRouter(browser, cover, listGenerator, playlists, ratings, scrobbler, search)
|
|
return router
|
|
}
|
|
|
|
// wire_injectors.go:
|
|
|
|
var allProviders = wire.NewSet(itunesbridge.NewItunesControl, engine.Set, scanner_legacy.Set, scanner.New, api.NewRouter, persistence.Set)
|