ライブラリを番組一覧・番組ページ・再生の3段にする(ステップ12)
This commit is contained in:
@@ -22,6 +22,7 @@ type page struct {
|
||||
Queue *queueView
|
||||
Subscriptions *subscriptionsView
|
||||
Library *libraryView
|
||||
Series *seriesView
|
||||
Video *videoView
|
||||
}
|
||||
|
||||
@@ -39,6 +40,8 @@ type JobStore interface {
|
||||
SetSubscriptionEnabled(context.Context, string, bool) error
|
||||
DeleteSubscription(context.Context, string) (bool, error)
|
||||
ListSucceededJobs(context.Context, int) ([]store.Job, error)
|
||||
ListLibrarySeries(context.Context) ([]store.LibrarySeries, error)
|
||||
ListSucceededJobsBySeries(context.Context, string) ([]store.Job, error)
|
||||
GetSucceededJob(context.Context, int64) (store.Job, error)
|
||||
DeleteSucceededJob(context.Context, int64) error
|
||||
}
|
||||
@@ -94,6 +97,7 @@ func NewHandler(fetcher NewerFetcher, jobs JobStore, videoDir string, now func()
|
||||
mux.HandleFunc("POST /subscriptions/{id}/resume", s.resumeSubscription)
|
||||
mux.HandleFunc("POST /subscriptions/{id}/delete", s.deleteSubscription)
|
||||
mux.HandleFunc("GET /library", s.libraryPage)
|
||||
mux.HandleFunc("GET /library/series/{series_id}", s.librarySeriesPage)
|
||||
mux.HandleFunc("GET /library/{id}", s.videoPage)
|
||||
mux.HandleFunc("GET /videos/{id}", s.serveVideo)
|
||||
mux.HandleFunc("POST /library/{id}/delete", s.deleteVideo)
|
||||
|
||||
Reference in New Issue
Block a user