mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-06 18:26:33 +00:00
add tuner infos to tv service status
This commit is contained in:
@@ -86,7 +86,10 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
|
||||
|
||||
if (options.DeleteEmptyFolders)
|
||||
{
|
||||
DeleteEmptyFolders(path);
|
||||
foreach (var subfolder in GetDirectories(path).ToList())
|
||||
{
|
||||
DeleteEmptyFolders(subfolder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,6 +102,27 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
|
||||
progress.Report(100);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the directories.
|
||||
/// </summary>
|
||||
/// <param name="path">The path.</param>
|
||||
/// <returns>IEnumerable{System.String}.</returns>
|
||||
private IEnumerable<string> GetDirectories(string path)
|
||||
{
|
||||
try
|
||||
{
|
||||
return Directory
|
||||
.EnumerateDirectories(path, "*", SearchOption.TopDirectoryOnly)
|
||||
.ToList();
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
_logger.ErrorException("Error getting files from {0}", ex, path);
|
||||
|
||||
return new List<string>();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the files to organize.
|
||||
/// </summary>
|
||||
@@ -164,6 +188,7 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
|
||||
{
|
||||
try
|
||||
{
|
||||
_logger.Debug("Deleting empty directory {0}", path);
|
||||
Directory.Delete(path);
|
||||
}
|
||||
catch (UnauthorizedAccessException) { }
|
||||
|
||||
Reference in New Issue
Block a user