mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-04 17:08:54 +08:00
fix: local storage dir
This commit is contained in:
@@ -85,10 +85,10 @@ func (l *LocalStorage) ReadDir(dir string) ([]fs.FileInfo, error) {
|
||||
}
|
||||
|
||||
func (l *LocalStorage) ReadFile(name string) ([]byte, error) {
|
||||
return os.ReadFile(name)
|
||||
return os.ReadFile(filepath.Join(l.dir, name))
|
||||
}
|
||||
|
||||
|
||||
func (l *LocalStorage) WriteFile(name string, data []byte) error {
|
||||
return os.WriteFile(name, data, os.ModePerm)
|
||||
return os.WriteFile(filepath.Join(l.dir, name), data, os.ModePerm)
|
||||
}
|
||||
@@ -31,8 +31,7 @@ func (s *Server) createPlexmatchIfNotExists(seriesId int) error {
|
||||
if err != nil {
|
||||
//create new
|
||||
log.Warnf(".plexmatch file not found, create new one: %s", series.NameEn)
|
||||
st.WriteFile(filepath.Join(series.TargetDir, ".plexmatch"), []byte(fmt.Sprintf("tmdbid=%d\n",series.TmdbID)))
|
||||
return nil
|
||||
return st.WriteFile(filepath.Join(series.TargetDir, ".plexmatch"), []byte(fmt.Sprintf("tmdbid=%d\n",series.TmdbID)))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -248,23 +248,28 @@ class _MainSkeletonState extends State<MainSkeleton> {
|
||||
},
|
||||
destinations: const <NavigationDestination>[
|
||||
NavigationDestination(
|
||||
icon: Icon(Icons.live_tv),
|
||||
icon: Icon(Icons.live_tv_outlined),
|
||||
selectedIcon: Icon(Icons.live_tv),
|
||||
label: '剧集',
|
||||
),
|
||||
NavigationDestination(
|
||||
icon: Icon(Icons.movie),
|
||||
icon: Icon(Icons.movie_outlined),
|
||||
selectedIcon: Icon(Icons.movie),
|
||||
label: '电影',
|
||||
),
|
||||
NavigationDestination(
|
||||
icon: Icon(Icons.download),
|
||||
icon: Icon(Icons.download_outlined),
|
||||
selectedIcon: Icon(Icons.download),
|
||||
label: '活动',
|
||||
),
|
||||
NavigationDestination(
|
||||
icon: Icon(Icons.settings),
|
||||
icon: Icon(Icons.settings_outlined),
|
||||
selectedIcon: Icon(Icons.settings),
|
||||
label: '设置',
|
||||
),
|
||||
NavigationDestination(
|
||||
icon: Icon(Icons.computer_rounded),
|
||||
icon: Icon(Icons.computer_outlined),
|
||||
selectedIcon: Icon(Icons.computer),
|
||||
label: '系统',
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user