mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-09 03:27:39 +08:00
chore: fixes
This commit is contained in:
@@ -158,6 +158,17 @@ func (s *Server) AddMovie2Watchlist(c *gin.Context) (interface{}, error) {
|
|||||||
}
|
}
|
||||||
log.Infof("find detail for movie id %d: %v", in.TmdbID, detail)
|
log.Infof("find detail for movie id %d: %v", in.TmdbID, detail)
|
||||||
|
|
||||||
|
epid, err := s.db.SaveEposideDetail(&ent.Episode{
|
||||||
|
SeasonNumber: 1,
|
||||||
|
EpisodeNumber: 1,
|
||||||
|
Title: "dummy episode for movies",
|
||||||
|
Overview: "dummy episode for movies",
|
||||||
|
AirDate: detail.ReleaseDate,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, errors.Wrap(err, "add dummy episode")
|
||||||
|
}
|
||||||
|
|
||||||
r, err := s.db.AddMediaWatchlist(&ent.Media{
|
r, err := s.db.AddMediaWatchlist(&ent.Media{
|
||||||
TmdbID: int(detail.ID),
|
TmdbID: int(detail.ID),
|
||||||
MediaType: media.MediaTypeMovie,
|
MediaType: media.MediaTypeMovie,
|
||||||
@@ -169,7 +180,7 @@ func (s *Server) AddMovie2Watchlist(c *gin.Context) (interface{}, error) {
|
|||||||
Resolution: string(in.Resolution),
|
Resolution: string(in.Resolution),
|
||||||
StorageID: in.StorageID,
|
StorageID: in.StorageID,
|
||||||
TargetDir: "./",
|
TargetDir: "./",
|
||||||
}, nil)
|
}, []int{epid})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "add to list")
|
return nil, errors.Wrap(err, "add to list")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,13 +45,18 @@ class MyApp extends StatelessWidget {
|
|||||||
return Container(
|
return Container(
|
||||||
constraints:
|
constraints:
|
||||||
const BoxConstraints(maxWidth: 300, maxHeight: 40),
|
const BoxConstraints(maxWidth: 300, maxHeight: 40),
|
||||||
child: SearchBar(
|
child: Opacity(
|
||||||
hintText: "搜索电影和电视剧...",
|
opacity: 0.8,
|
||||||
leading: const Icon(Icons.search),
|
child: SearchBar(
|
||||||
controller: controller,
|
hintText: "搜索...",
|
||||||
onSubmitted: (value) => context.go(Uri(
|
leading: const Icon(Icons.search),
|
||||||
path: SearchPage.route,
|
controller: controller,
|
||||||
queryParameters: {'query': value}).toString()),
|
shadowColor: WidgetStateColor.transparent,
|
||||||
|
backgroundColor: const WidgetStatePropertyAll(Color.fromARGB(255, 29, 78, 119)),
|
||||||
|
onSubmitted: (value) => context.go(Uri(
|
||||||
|
path: SearchPage.route,
|
||||||
|
queryParameters: {'query': value}).toString()),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}, suggestionsBuilder:
|
}, suggestionsBuilder:
|
||||||
|
|||||||
Reference in New Issue
Block a user