mirror of
https://github.com/simon-ding/polaris.git
synced 2026-04-22 03:37:30 +08:00
chore: fixes
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
|||||||
func main() {
|
func main() {
|
||||||
log.Infof("------------------- Starting Polaris ---------------------")
|
log.Infof("------------------- Starting Polaris ---------------------")
|
||||||
|
|
||||||
syscall.Umask(0011) //max permission 0766
|
syscall.Umask(0000) //max permission 0777
|
||||||
|
|
||||||
dbClient, err := db.Open()
|
dbClient, err := db.Open()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -32,7 +32,9 @@ func (s *Server) writePlexmatch(seriesId int, episodeNum int, targetDir, name st
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
//create new
|
//create new
|
||||||
log.Warnf(".plexmatch file not found, create new one: %s", series.NameEn)
|
log.Warnf(".plexmatch file not found, create new one: %s", series.NameEn)
|
||||||
return st.WriteFile(filepath.Join(series.TargetDir, ".plexmatch"), []byte(fmt.Sprintf("tmdbid: %d\n",series.TmdbID)))
|
if err := st.WriteFile(filepath.Join(series.TargetDir, ".plexmatch"), []byte(fmt.Sprintf("tmdbid: %d\n",series.TmdbID))); err != nil {
|
||||||
|
return errors.Wrap(err, "series plexmatch")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if episodeNum == 0 {
|
if episodeNum == 0 {
|
||||||
@@ -46,7 +48,7 @@ func (s *Server) writePlexmatch(seriesId int, episodeNum int, targetDir, name st
|
|||||||
} else {
|
} else {
|
||||||
buff.Write(data)
|
buff.Write(data)
|
||||||
}
|
}
|
||||||
buff.WriteString(fmt.Sprintf("ep: %d: %s\n", episodeNum, name))
|
buff.WriteString(fmt.Sprintf("\nep: %d: %s\n", episodeNum, name))
|
||||||
log.Infof("write season plexmatch file content: %s", buff.String())
|
log.Infof("write season plexmatch file content: %s", buff.String())
|
||||||
return st.WriteFile(seasonPlex, buff.Bytes())
|
return st.WriteFile(seasonPlex, buff.Bytes())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ class _GeneralState extends ConsumerState<GeneralSettings> {
|
|||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 300,
|
width: 300,
|
||||||
child: FormBuilderSwitch(
|
child: FormBuilderSwitch(decoration: const InputDecoration(icon: Icon(Icons.token)),
|
||||||
name: "enable_plexmatch", title: const Text("Plex 刮削支持")),
|
name: "enable_plexmatch", title: const Text("Plex 刮削支持")),
|
||||||
),
|
),
|
||||||
Center(
|
Center(
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ class _TvDetailsPageState extends ConsumerState<TvDetailsPage> {
|
|||||||
.read(mediaDetailsProvider(widget.seriesId)
|
.read(mediaDetailsProvider(widget.seriesId)
|
||||||
.notifier)
|
.notifier)
|
||||||
.searchAndDownload(widget.seriesId,
|
.searchAndDownload(widget.seriesId,
|
||||||
ep.seasonNumber!, ep.episodeNumber!);
|
ep.seasonNumber!, ep.episodeNumber!).then((v) => showSnakeBar("开始下载: $v"));
|
||||||
showLoadingWithFuture(f);
|
showLoadingWithFuture(f);
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.download)),
|
icon: const Icon(Icons.download)),
|
||||||
@@ -257,8 +257,8 @@ class _TvDetailsPageState extends ConsumerState<TvDetailsPage> {
|
|||||||
//title: Text("资源"),
|
//title: Text("资源"),
|
||||||
content: SelectionArea(
|
content: SelectionArea(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 800,
|
width: MediaQuery.of(context).size.width*0.7,
|
||||||
height: 400,
|
height: MediaQuery.of(context).size.height*0.6,
|
||||||
child: torrents.when(
|
child: torrents.when(
|
||||||
data: (v) {
|
data: (v) {
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
|
|||||||
Reference in New Issue
Block a user