mirror of
https://github.com/simon-ding/polaris.git
synced 2026-02-06 23:21:00 +08:00
chore: fixes
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
func main() {
|
||||
log.Infof("------------------- Starting Polaris ---------------------")
|
||||
|
||||
syscall.Umask(0011) //max permission 0766
|
||||
syscall.Umask(0000) //max permission 0777
|
||||
|
||||
dbClient, err := db.Open()
|
||||
if err != nil {
|
||||
|
||||
@@ -32,7 +32,9 @@ func (s *Server) writePlexmatch(seriesId int, episodeNum int, targetDir, name st
|
||||
if err != nil {
|
||||
//create new
|
||||
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 {
|
||||
@@ -46,7 +48,7 @@ func (s *Server) writePlexmatch(seriesId int, episodeNum int, targetDir, name st
|
||||
} else {
|
||||
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())
|
||||
return st.WriteFile(seasonPlex, buff.Bytes())
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ class _GeneralState extends ConsumerState<GeneralSettings> {
|
||||
),
|
||||
SizedBox(
|
||||
width: 300,
|
||||
child: FormBuilderSwitch(
|
||||
child: FormBuilderSwitch(decoration: const InputDecoration(icon: Icon(Icons.token)),
|
||||
name: "enable_plexmatch", title: const Text("Plex 刮削支持")),
|
||||
),
|
||||
Center(
|
||||
|
||||
@@ -75,7 +75,7 @@ class _TvDetailsPageState extends ConsumerState<TvDetailsPage> {
|
||||
.read(mediaDetailsProvider(widget.seriesId)
|
||||
.notifier)
|
||||
.searchAndDownload(widget.seriesId,
|
||||
ep.seasonNumber!, ep.episodeNumber!);
|
||||
ep.seasonNumber!, ep.episodeNumber!).then((v) => showSnakeBar("开始下载: $v"));
|
||||
showLoadingWithFuture(f);
|
||||
},
|
||||
icon: const Icon(Icons.download)),
|
||||
@@ -257,8 +257,8 @@ class _TvDetailsPageState extends ConsumerState<TvDetailsPage> {
|
||||
//title: Text("资源"),
|
||||
content: SelectionArea(
|
||||
child: SizedBox(
|
||||
width: 800,
|
||||
height: 400,
|
||||
width: MediaQuery.of(context).size.width*0.7,
|
||||
height: MediaQuery.of(context).size.height*0.6,
|
||||
child: torrents.when(
|
||||
data: (v) {
|
||||
return SingleChildScrollView(
|
||||
|
||||
Reference in New Issue
Block a user