mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-05 09:27:43 +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) {
|
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 {
|
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 {
|
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)
|
||||||
st.WriteFile(filepath.Join(series.TargetDir, ".plexmatch"), []byte(fmt.Sprintf("tmdbid=%d\n",series.TmdbID)))
|
return st.WriteFile(filepath.Join(series.TargetDir, ".plexmatch"), []byte(fmt.Sprintf("tmdbid=%d\n",series.TmdbID)))
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -248,23 +248,28 @@ class _MainSkeletonState extends State<MainSkeleton> {
|
|||||||
},
|
},
|
||||||
destinations: const <NavigationDestination>[
|
destinations: const <NavigationDestination>[
|
||||||
NavigationDestination(
|
NavigationDestination(
|
||||||
icon: Icon(Icons.live_tv),
|
icon: Icon(Icons.live_tv_outlined),
|
||||||
|
selectedIcon: Icon(Icons.live_tv),
|
||||||
label: '剧集',
|
label: '剧集',
|
||||||
),
|
),
|
||||||
NavigationDestination(
|
NavigationDestination(
|
||||||
icon: Icon(Icons.movie),
|
icon: Icon(Icons.movie_outlined),
|
||||||
|
selectedIcon: Icon(Icons.movie),
|
||||||
label: '电影',
|
label: '电影',
|
||||||
),
|
),
|
||||||
NavigationDestination(
|
NavigationDestination(
|
||||||
icon: Icon(Icons.download),
|
icon: Icon(Icons.download_outlined),
|
||||||
|
selectedIcon: Icon(Icons.download),
|
||||||
label: '活动',
|
label: '活动',
|
||||||
),
|
),
|
||||||
NavigationDestination(
|
NavigationDestination(
|
||||||
icon: Icon(Icons.settings),
|
icon: Icon(Icons.settings_outlined),
|
||||||
|
selectedIcon: Icon(Icons.settings),
|
||||||
label: '设置',
|
label: '设置',
|
||||||
),
|
),
|
||||||
NavigationDestination(
|
NavigationDestination(
|
||||||
icon: Icon(Icons.computer_rounded),
|
icon: Icon(Icons.computer_outlined),
|
||||||
|
selectedIcon: Icon(Icons.computer),
|
||||||
label: '系统',
|
label: '系统',
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user