Add process to set read/write permissions for files in ChineseNfoRegistry
This commit is contained in:
@@ -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);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user