mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-05 21:37:10 -04:00
stub out storage for new path substitution
This commit is contained in:
parent
bfb2f64ea4
commit
8b096ccc0e
@ -112,6 +112,8 @@ namespace MediaBrowser.Api.Library
|
|||||||
/// <value>The name.</value>
|
/// <value>The name.</value>
|
||||||
public string Path { get; set; }
|
public string Path { get; set; }
|
||||||
|
|
||||||
|
public MediaPathInfo PathInfo { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether [refresh library].
|
/// Gets or sets a value indicating whether [refresh library].
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -212,7 +214,12 @@ namespace MediaBrowser.Api.Library
|
|||||||
{
|
{
|
||||||
var libraryOptions = request.LibraryOptions ?? new LibraryOptions();
|
var libraryOptions = request.LibraryOptions ?? new LibraryOptions();
|
||||||
|
|
||||||
_libraryManager.AddVirtualFolder(request.Name, request.CollectionType, request.Paths, libraryOptions, request.RefreshLibrary);
|
if (request.Paths != null && request.Paths.Length > 0)
|
||||||
|
{
|
||||||
|
libraryOptions.PathInfos = request.Paths.Select(i => new MediaPathInfo { Path = i }).ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
_libraryManager.AddVirtualFolder(request.Name, request.CollectionType, libraryOptions, request.RefreshLibrary);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -308,7 +315,16 @@ namespace MediaBrowser.Api.Library
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_libraryManager.AddMediaPath(request.Name, request.Path);
|
var mediaPath = request.PathInfo;
|
||||||
|
|
||||||
|
if (mediaPath == null)
|
||||||
|
{
|
||||||
|
mediaPath = new MediaPathInfo
|
||||||
|
{
|
||||||
|
Path = request.Path
|
||||||
|
};
|
||||||
|
}
|
||||||
|
_libraryManager.AddMediaPath(request.Name, mediaPath);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
@ -262,7 +262,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||||||
Protocol = locationType == LocationType.Remote ? MediaProtocol.Http : MediaProtocol.File,
|
Protocol = locationType == LocationType.Remote ? MediaProtocol.Http : MediaProtocol.File,
|
||||||
MediaStreams = MediaSourceManager.GetMediaStreams(i.Id).ToList(),
|
MediaStreams = MediaSourceManager.GetMediaStreams(i.Id).ToList(),
|
||||||
Name = i.Name,
|
Name = i.Name,
|
||||||
Path = enablePathSubstituion ? GetMappedPath(i.Path, locationType) : i.Path,
|
Path = enablePathSubstituion ? GetMappedPath(i, i.Path, locationType) : i.Path,
|
||||||
RunTimeTicks = i.RunTimeTicks,
|
RunTimeTicks = i.RunTimeTicks,
|
||||||
Container = i.Container,
|
Container = i.Container,
|
||||||
Size = i.Size
|
Size = i.Size
|
||||||
|
@ -2121,11 +2121,11 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return hasChanges;
|
return hasChanges;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static string GetMappedPath(string path, LocationType locationType)
|
protected static string GetMappedPath(BaseItem item, string path, LocationType locationType)
|
||||||
{
|
{
|
||||||
if (locationType == LocationType.FileSystem || locationType == LocationType.Offline)
|
if (locationType == LocationType.FileSystem || locationType == LocationType.Offline)
|
||||||
{
|
{
|
||||||
return LibraryManager.GetPathAfterNetworkSubstitution(path);
|
return LibraryManager.GetPathAfterNetworkSubstitution(path, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
return path;
|
return path;
|
||||||
|
@ -48,24 +48,14 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
private static readonly Dictionary<string, LibraryOptions> LibraryOptions = new Dictionary<string, LibraryOptions>();
|
private static readonly Dictionary<string, LibraryOptions> LibraryOptions = new Dictionary<string, LibraryOptions>();
|
||||||
public LibraryOptions GetLibraryOptions()
|
public LibraryOptions GetLibraryOptions()
|
||||||
{
|
{
|
||||||
lock (LibraryOptions)
|
return GetLibraryOptions(Path);
|
||||||
{
|
|
||||||
LibraryOptions options;
|
|
||||||
if (!LibraryOptions.TryGetValue(Path, out options))
|
|
||||||
{
|
|
||||||
options = LoadLibraryOptions();
|
|
||||||
LibraryOptions[Path] = options;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return options;
|
private static LibraryOptions LoadLibraryOptions(string path)
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private LibraryOptions LoadLibraryOptions()
|
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var result = XmlSerializer.DeserializeFromFile(typeof(LibraryOptions), GetLibraryOptionsPath(Path)) as LibraryOptions;
|
var result = XmlSerializer.DeserializeFromFile(typeof(LibraryOptions), GetLibraryOptionsPath(path)) as LibraryOptions;
|
||||||
|
|
||||||
if (result == null)
|
if (result == null)
|
||||||
{
|
{
|
||||||
@ -100,6 +90,21 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
SaveLibraryOptions(Path, options);
|
SaveLibraryOptions(Path, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static LibraryOptions GetLibraryOptions(string path)
|
||||||
|
{
|
||||||
|
lock (LibraryOptions)
|
||||||
|
{
|
||||||
|
LibraryOptions options;
|
||||||
|
if (!LibraryOptions.TryGetValue(path, out options))
|
||||||
|
{
|
||||||
|
options = LoadLibraryOptions(path);
|
||||||
|
LibraryOptions[path] = options;
|
||||||
|
}
|
||||||
|
|
||||||
|
return options;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void SaveLibraryOptions(string path, LibraryOptions options)
|
public static void SaveLibraryOptions(string path, LibraryOptions options)
|
||||||
{
|
{
|
||||||
lock (LibraryOptions)
|
lock (LibraryOptions)
|
||||||
|
@ -600,7 +600,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
Protocol = locationType == LocationType.Remote ? MediaProtocol.Http : MediaProtocol.File,
|
Protocol = locationType == LocationType.Remote ? MediaProtocol.Http : MediaProtocol.File,
|
||||||
MediaStreams = mediaStreams,
|
MediaStreams = mediaStreams,
|
||||||
Name = GetMediaSourceName(i, mediaStreams),
|
Name = GetMediaSourceName(i, mediaStreams),
|
||||||
Path = enablePathSubstitution ? GetMappedPath(i.Path, locationType) : i.Path,
|
Path = enablePathSubstitution ? GetMappedPath(i, i.Path, locationType) : i.Path,
|
||||||
RunTimeTicks = i.RunTimeTicks,
|
RunTimeTicks = i.RunTimeTicks,
|
||||||
Video3DFormat = i.Video3DFormat,
|
Video3DFormat = i.Video3DFormat,
|
||||||
VideoType = i.VideoType,
|
VideoType = i.VideoType,
|
||||||
|
@ -506,7 +506,7 @@ namespace MediaBrowser.Controller.Library
|
|||||||
/// <returns>QueryResult<BaseItem>.</returns>
|
/// <returns>QueryResult<BaseItem>.</returns>
|
||||||
QueryResult<BaseItem> QueryItems(InternalItemsQuery query);
|
QueryResult<BaseItem> QueryItems(InternalItemsQuery query);
|
||||||
|
|
||||||
string GetPathAfterNetworkSubstitution(string path);
|
string GetPathAfterNetworkSubstitution(string path, BaseItem ownerItem = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Substitutes the path.
|
/// Substitutes the path.
|
||||||
@ -556,9 +556,9 @@ namespace MediaBrowser.Controller.Library
|
|||||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||||
bool IgnoreFile(FileSystemMetadata file, BaseItem parent);
|
bool IgnoreFile(FileSystemMetadata file, BaseItem parent);
|
||||||
|
|
||||||
void AddVirtualFolder(string name, string collectionType, string[] mediaPaths, LibraryOptions options, bool refreshLibrary);
|
void AddVirtualFolder(string name, string collectionType, LibraryOptions options, bool refreshLibrary);
|
||||||
void RemoveVirtualFolder(string name, bool refreshLibrary);
|
void RemoveVirtualFolder(string name, bool refreshLibrary);
|
||||||
void AddMediaPath(string virtualFolderName, string path);
|
void AddMediaPath(string virtualFolderName, MediaPathInfo path);
|
||||||
void RemoveMediaPath(string virtualFolderName, string path);
|
void RemoveMediaPath(string virtualFolderName, string path);
|
||||||
|
|
||||||
QueryResult<Tuple<BaseItem, ItemCounts>> GetGenres(InternalItemsQuery query);
|
QueryResult<Tuple<BaseItem, ItemCounts>> GetGenres(InternalItemsQuery query);
|
||||||
|
@ -9,11 +9,19 @@
|
|||||||
public bool EnableChapterImageExtraction { get; set; }
|
public bool EnableChapterImageExtraction { get; set; }
|
||||||
public bool ExtractChapterImagesDuringLibraryScan { get; set; }
|
public bool ExtractChapterImagesDuringLibraryScan { get; set; }
|
||||||
public bool DownloadImagesInAdvance { get; set; }
|
public bool DownloadImagesInAdvance { get; set; }
|
||||||
|
public MediaPathInfo[] PathInfos { get; set; }
|
||||||
|
|
||||||
public LibraryOptions()
|
public LibraryOptions()
|
||||||
{
|
{
|
||||||
EnablePhotos = true;
|
EnablePhotos = true;
|
||||||
EnableRealtimeMonitor = true;
|
EnableRealtimeMonitor = true;
|
||||||
|
PathInfos = new MediaPathInfo[] { };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class MediaPathInfo
|
||||||
|
{
|
||||||
|
public string Path { get; set; }
|
||||||
|
public string NetworkPath { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1509,7 +1509,7 @@ namespace MediaBrowser.Server.Implementations.Dto
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetMappedPath(IHasMetadata item)
|
private string GetMappedPath(BaseItem item)
|
||||||
{
|
{
|
||||||
var path = item.Path;
|
var path = item.Path;
|
||||||
|
|
||||||
@ -1517,7 +1517,7 @@ namespace MediaBrowser.Server.Implementations.Dto
|
|||||||
|
|
||||||
if (locationType == LocationType.FileSystem || locationType == LocationType.Offline)
|
if (locationType == LocationType.FileSystem || locationType == LocationType.Offline)
|
||||||
{
|
{
|
||||||
path = _libraryManager.GetPathAfterNetworkSubstitution(path);
|
path = _libraryManager.GetPathAfterNetworkSubstitution(path, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
return path;
|
return path;
|
||||||
|
@ -33,7 +33,8 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||||||
|
|
||||||
// Synology
|
// Synology
|
||||||
"@eaDir",
|
"@eaDir",
|
||||||
"eaDir"
|
"eaDir",
|
||||||
|
"#recycle"
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2527,8 +2527,29 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||||||
}).OrderBy(i => i.Path).ToList();
|
}).OrderBy(i => i.Path).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetPathAfterNetworkSubstitution(string path)
|
public string GetPathAfterNetworkSubstitution(string path, BaseItem ownerItem)
|
||||||
{
|
{
|
||||||
|
if (ownerItem != null)
|
||||||
|
{
|
||||||
|
var libraryOptions = GetLibraryOptions(ownerItem);
|
||||||
|
if (libraryOptions != null)
|
||||||
|
{
|
||||||
|
foreach (var pathInfo in libraryOptions.PathInfos)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(pathInfo.NetworkPath))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
var substitutionResult = SubstitutePathInternal(path, pathInfo.Path, pathInfo.NetworkPath);
|
||||||
|
if (substitutionResult.Item2)
|
||||||
|
{
|
||||||
|
return substitutionResult.Item1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var map in ConfigurationManager.Configuration.PathSubstitutions)
|
foreach (var map in ConfigurationManager.Configuration.PathSubstitutions)
|
||||||
{
|
{
|
||||||
path = SubstitutePath(path, map.From, map.To);
|
path = SubstitutePath(path, map.From, map.To);
|
||||||
@ -2538,6 +2559,11 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||||||
}
|
}
|
||||||
|
|
||||||
public string SubstitutePath(string path, string from, string to)
|
public string SubstitutePath(string path, string from, string to)
|
||||||
|
{
|
||||||
|
return SubstitutePathInternal(path, from, to).Item1;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Tuple<string, bool> SubstitutePathInternal(string path, string from, string to)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(path))
|
if (string.IsNullOrWhiteSpace(path))
|
||||||
{
|
{
|
||||||
@ -2552,7 +2578,11 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||||||
throw new ArgumentNullException("to");
|
throw new ArgumentNullException("to");
|
||||||
}
|
}
|
||||||
|
|
||||||
var newPath = path.Replace(from.Trim(), to.Trim(), StringComparison.OrdinalIgnoreCase);
|
from = from.Trim();
|
||||||
|
to = to.Trim();
|
||||||
|
|
||||||
|
var newPath = path.Replace(from, to, StringComparison.OrdinalIgnoreCase);
|
||||||
|
var changed = false;
|
||||||
|
|
||||||
if (!string.Equals(newPath, path))
|
if (!string.Equals(newPath, path))
|
||||||
{
|
{
|
||||||
@ -2564,9 +2594,11 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||||||
{
|
{
|
||||||
newPath = newPath.Replace('/', '\\');
|
newPath = newPath.Replace('/', '\\');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return newPath;
|
return new Tuple<string, bool>(newPath, changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetExtraTypeFromFilename(Video item)
|
private void SetExtraTypeFromFilename(Video item)
|
||||||
@ -2695,7 +2727,7 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||||||
throw new InvalidOperationException();
|
throw new InvalidOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddVirtualFolder(string name, string collectionType, string[] mediaPaths, LibraryOptions options, bool refreshLibrary)
|
public void AddVirtualFolder(string name, string collectionType, LibraryOptions options, bool refreshLibrary)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(name))
|
if (string.IsNullOrWhiteSpace(name))
|
||||||
{
|
{
|
||||||
@ -2713,12 +2745,13 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||||||
virtualFolderPath = Path.Combine(rootFolderPath, name);
|
virtualFolderPath = Path.Combine(rootFolderPath, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mediaPaths != null)
|
var mediaPathInfos = options.PathInfos;
|
||||||
|
if (mediaPathInfos != null)
|
||||||
{
|
{
|
||||||
var invalidpath = mediaPaths.FirstOrDefault(i => !_fileSystem.DirectoryExists(i));
|
var invalidpath = mediaPathInfos.FirstOrDefault(i => !_fileSystem.DirectoryExists(i.Path));
|
||||||
if (invalidpath != null)
|
if (invalidpath != null)
|
||||||
{
|
{
|
||||||
throw new ArgumentException("The specified path does not exist: " + invalidpath + ".");
|
throw new ArgumentException("The specified path does not exist: " + invalidpath.Path + ".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2740,11 +2773,11 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||||||
|
|
||||||
CollectionFolder.SaveLibraryOptions(virtualFolderPath, options);
|
CollectionFolder.SaveLibraryOptions(virtualFolderPath, options);
|
||||||
|
|
||||||
if (mediaPaths != null)
|
if (mediaPathInfos != null)
|
||||||
{
|
{
|
||||||
foreach (var path in mediaPaths)
|
foreach (var path in mediaPathInfos)
|
||||||
{
|
{
|
||||||
AddMediaPath(name, path);
|
AddMediaPathInternal(name, path, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2770,6 +2803,61 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private const string ShortcutFileExtension = ".mblink";
|
||||||
|
private const string ShortcutFileSearch = "*" + ShortcutFileExtension;
|
||||||
|
public void AddMediaPath(string virtualFolderName, MediaPathInfo pathInfo)
|
||||||
|
{
|
||||||
|
AddMediaPathInternal(virtualFolderName, pathInfo, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddMediaPathInternal(string virtualFolderName, MediaPathInfo pathInfo, bool saveLibraryOptions)
|
||||||
|
{
|
||||||
|
if (pathInfo == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException("path");
|
||||||
|
}
|
||||||
|
|
||||||
|
var path = pathInfo.Path;
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(path))
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException("path");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!_fileSystem.DirectoryExists(path))
|
||||||
|
{
|
||||||
|
throw new DirectoryNotFoundException("The path does not exist.");
|
||||||
|
}
|
||||||
|
|
||||||
|
var rootFolderPath = ConfigurationManager.ApplicationPaths.DefaultUserViewsPath;
|
||||||
|
var virtualFolderPath = Path.Combine(rootFolderPath, virtualFolderName);
|
||||||
|
|
||||||
|
var shortcutFilename = _fileSystem.GetFileNameWithoutExtension(path);
|
||||||
|
|
||||||
|
var lnk = Path.Combine(virtualFolderPath, shortcutFilename + ShortcutFileExtension);
|
||||||
|
|
||||||
|
while (_fileSystem.FileExists(lnk))
|
||||||
|
{
|
||||||
|
shortcutFilename += "1";
|
||||||
|
lnk = Path.Combine(virtualFolderPath, shortcutFilename + ShortcutFileExtension);
|
||||||
|
}
|
||||||
|
|
||||||
|
_fileSystem.CreateShortcut(lnk, path);
|
||||||
|
|
||||||
|
RemoveContentTypeOverrides(path);
|
||||||
|
|
||||||
|
if (saveLibraryOptions)
|
||||||
|
{
|
||||||
|
var libraryOptions = CollectionFolder.GetLibraryOptions(virtualFolderPath);
|
||||||
|
|
||||||
|
var list = libraryOptions.PathInfos.ToList();
|
||||||
|
list.Add(pathInfo);
|
||||||
|
libraryOptions.PathInfos = list.ToArray();
|
||||||
|
|
||||||
|
CollectionFolder.SaveLibraryOptions(virtualFolderPath, libraryOptions);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void RemoveVirtualFolder(string name, bool refreshLibrary)
|
public void RemoveVirtualFolder(string name, bool refreshLibrary)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(name))
|
if (string.IsNullOrWhiteSpace(name))
|
||||||
@ -2814,38 +2902,6 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private const string ShortcutFileExtension = ".mblink";
|
|
||||||
private const string ShortcutFileSearch = "*" + ShortcutFileExtension;
|
|
||||||
public void AddMediaPath(string virtualFolderName, string path)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrWhiteSpace(path))
|
|
||||||
{
|
|
||||||
throw new ArgumentNullException("path");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!_fileSystem.DirectoryExists(path))
|
|
||||||
{
|
|
||||||
throw new DirectoryNotFoundException("The path does not exist.");
|
|
||||||
}
|
|
||||||
|
|
||||||
var rootFolderPath = ConfigurationManager.ApplicationPaths.DefaultUserViewsPath;
|
|
||||||
var virtualFolderPath = Path.Combine(rootFolderPath, virtualFolderName);
|
|
||||||
|
|
||||||
var shortcutFilename = _fileSystem.GetFileNameWithoutExtension(path);
|
|
||||||
|
|
||||||
var lnk = Path.Combine(virtualFolderPath, shortcutFilename + ShortcutFileExtension);
|
|
||||||
|
|
||||||
while (_fileSystem.FileExists(lnk))
|
|
||||||
{
|
|
||||||
shortcutFilename += "1";
|
|
||||||
lnk = Path.Combine(virtualFolderPath, shortcutFilename + ShortcutFileExtension);
|
|
||||||
}
|
|
||||||
|
|
||||||
_fileSystem.CreateShortcut(lnk, path);
|
|
||||||
|
|
||||||
RemoveContentTypeOverrides(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void RemoveContentTypeOverrides(string path)
|
private void RemoveContentTypeOverrides(string path)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(path))
|
if (string.IsNullOrWhiteSpace(path))
|
||||||
|
@ -143,9 +143,15 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var mediaPathInfos = pathsToCreate.Select(i => new MediaPathInfo { Path = i }).ToArray();
|
||||||
|
|
||||||
|
var libraryOptions = new LibraryOptions
|
||||||
|
{
|
||||||
|
PathInfos = mediaPathInfos
|
||||||
|
};
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_libraryManager.AddVirtualFolder(recordingFolder.Name, recordingFolder.CollectionType, pathsToCreate.ToArray(), new LibraryOptions(), true);
|
_libraryManager.AddVirtualFolder(recordingFolder.Name, recordingFolder.CollectionType, libraryOptions, true);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user