Compare commits
2 Commits
ac51d09bc0
...
f3a1b8be3f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f3a1b8be3f | ||
|
|
a685a324b6 |
@@ -1,3 +1,4 @@
|
|||||||
|
using System.Diagnostics;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Text.Json.Nodes;
|
using System.Text.Json.Nodes;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
@@ -63,6 +64,21 @@ public class ChineseNfoRegistry : Registry, IChineseNfoRegistry
|
|||||||
var failedCount = 0;
|
var failedCount = 0;
|
||||||
var skippedCount = 0;
|
var skippedCount = 0;
|
||||||
|
|
||||||
|
// 使用 chmod -R 666 设置全部文件的读写权限
|
||||||
|
var permission = new Process
|
||||||
|
{
|
||||||
|
StartInfo = new ProcessStartInfo
|
||||||
|
{
|
||||||
|
FileName = "chmod",
|
||||||
|
Arguments = "-R 666 " + tvFolder,
|
||||||
|
RedirectStandardOutput = true,
|
||||||
|
UseShellExecute = false,
|
||||||
|
CreateNoWindow = true
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
permission.Start();
|
||||||
|
|
||||||
// 扫描 tvshow.nfo 文件
|
// 扫描 tvshow.nfo 文件
|
||||||
var tvShowFiles = Directory.GetFiles(tvFolder, "tvshow.nfo", SearchOption.AllDirectories);
|
var tvShowFiles = Directory.GetFiles(tvFolder, "tvshow.nfo", SearchOption.AllDirectories);
|
||||||
|
|
||||||
@@ -230,14 +246,6 @@ public class ChineseNfoRegistry : Registry, IChineseNfoRegistry
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// 尝试放开Linux文件的读写权限
|
|
||||||
var fileInfo = new FileInfo(episodeFile)
|
|
||||||
{
|
|
||||||
Attributes = FileAttributes.Normal,
|
|
||||||
IsReadOnly = false
|
|
||||||
};
|
|
||||||
fileInfo.Refresh();
|
|
||||||
|
|
||||||
episodeXml.Save(episodeFile);
|
episodeXml.Save(episodeFile);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|||||||
Reference in New Issue
Block a user