commit
b2588b2667
|
@ -23,19 +23,6 @@ namespace MediaBrowser.Controller.Entities
|
||||||
PhysicalLocationsList = new List<string>();
|
PhysicalLocationsList = new List<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets a value indicating whether this instance is virtual folder.
|
|
||||||
/// </summary>
|
|
||||||
/// <value><c>true</c> if this instance is virtual folder; otherwise, <c>false</c>.</value>
|
|
||||||
[IgnoreDataMember]
|
|
||||||
public override bool IsVirtualFolder
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
protected override bool SupportsShortcutChildren
|
protected override bool SupportsShortcutChildren
|
||||||
{
|
{
|
||||||
|
|
|
@ -126,19 +126,6 @@ namespace MediaBrowser.Controller.Entities
|
||||||
/// <value><c>true</c> if this instance is root; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if this instance is root; otherwise, <c>false</c>.</value>
|
||||||
public bool IsRoot { get; set; }
|
public bool IsRoot { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets a value indicating whether this instance is virtual folder.
|
|
||||||
/// </summary>
|
|
||||||
/// <value><c>true</c> if this instance is virtual folder; otherwise, <c>false</c>.</value>
|
|
||||||
[IgnoreDataMember]
|
|
||||||
public virtual bool IsVirtualFolder
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual List<LinkedChild> LinkedChildren { get; set; }
|
public virtual List<LinkedChild> LinkedChildren { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
|
|
|
@ -20,12 +20,15 @@ namespace MediaBrowser.Model.LiveTv
|
||||||
public int PrePaddingSeconds { get; set; }
|
public int PrePaddingSeconds { get; set; }
|
||||||
public int PostPaddingSeconds { get; set; }
|
public int PostPaddingSeconds { get; set; }
|
||||||
|
|
||||||
|
public string[] MediaLocationsCreated { get; set; }
|
||||||
|
|
||||||
public LiveTvOptions()
|
public LiveTvOptions()
|
||||||
{
|
{
|
||||||
EnableMovieProviders = true;
|
EnableMovieProviders = true;
|
||||||
EnableRecordingSubfolders = true;
|
EnableRecordingSubfolders = true;
|
||||||
TunerHosts = new List<TunerHostInfo>();
|
TunerHosts = new List<TunerHostInfo>();
|
||||||
ListingProviders = new List<ListingsProviderInfo>();
|
ListingProviders = new List<ListingsProviderInfo>();
|
||||||
|
MediaLocationsCreated = new string[] { };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ namespace MediaBrowser.Providers.TV
|
||||||
|
|
||||||
if (!hasSeason)
|
if (!hasSeason)
|
||||||
{
|
{
|
||||||
await AddSeason(series, seasonNumber, cancellationToken).ConfigureAwait(false);
|
await AddSeason(series, seasonNumber, false, cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
hasChanges = true;
|
hasChanges = true;
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ namespace MediaBrowser.Providers.TV
|
||||||
|
|
||||||
if (!hasSeason)
|
if (!hasSeason)
|
||||||
{
|
{
|
||||||
await AddSeason(series, null, cancellationToken).ConfigureAwait(false);
|
await AddSeason(series, null, false, cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
hasChanges = true;
|
hasChanges = true;
|
||||||
}
|
}
|
||||||
|
@ -95,12 +95,9 @@ namespace MediaBrowser.Providers.TV
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds the season.
|
/// Adds the season.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="series">The series.</param>
|
|
||||||
/// <param name="seasonNumber">The season number.</param>
|
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
|
||||||
/// <returns>Task{Season}.</returns>
|
|
||||||
public async Task<Season> AddSeason(Series series,
|
public async Task<Season> AddSeason(Series series,
|
||||||
int? seasonNumber,
|
int? seasonNumber,
|
||||||
|
bool isMissingSeason,
|
||||||
CancellationToken cancellationToken)
|
CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var seasonName = seasonNumber == 0 ?
|
var seasonName = seasonNumber == 0 ?
|
||||||
|
@ -113,7 +110,8 @@ namespace MediaBrowser.Providers.TV
|
||||||
{
|
{
|
||||||
Name = seasonName,
|
Name = seasonName,
|
||||||
IndexNumber = seasonNumber,
|
IndexNumber = seasonNumber,
|
||||||
Id = _libraryManager.GetNewItemId((series.Id + (seasonNumber ?? -1).ToString(_usCulture) + seasonName), typeof(Season))
|
Id = _libraryManager.GetNewItemId((series.Id + (seasonNumber ?? -1).ToString(_usCulture) + seasonName), typeof(Season)),
|
||||||
|
IsMissingSeason = isMissingSeason
|
||||||
};
|
};
|
||||||
|
|
||||||
season.SetParent(series);
|
season.SetParent(series);
|
||||||
|
|
|
@ -418,7 +418,7 @@ namespace MediaBrowser.Providers.TV
|
||||||
if (season == null)
|
if (season == null)
|
||||||
{
|
{
|
||||||
var provider = new DummySeasonProvider(_config, _logger, _localization, _libraryManager, _fileSystem);
|
var provider = new DummySeasonProvider(_config, _logger, _localization, _libraryManager, _fileSystem);
|
||||||
season = await provider.AddSeason(series, seasonNumber, cancellationToken).ConfigureAwait(false);
|
season = await provider.AddSeason(series, seasonNumber, true, cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
var name = string.Format("Episode {0}", episodeNumber.ToString(_usCulture));
|
var name = string.Format("Episode {0}", episodeNumber.ToString(_usCulture));
|
||||||
|
|
|
@ -69,7 +69,7 @@ namespace MediaBrowser.Providers.TV
|
||||||
|
|
||||||
private ItemUpdateType SaveIsMissing(Season item, List<Episode> episodes)
|
private ItemUpdateType SaveIsMissing(Season item, List<Episode> episodes)
|
||||||
{
|
{
|
||||||
var isMissing = item.LocationType == LocationType.Virtual && episodes.All(i => i.IsMissingEpisode);
|
var isMissing = item.LocationType == LocationType.Virtual && (episodes.Count == 0 || episodes.All(i => i.IsMissingEpisode));
|
||||||
|
|
||||||
if (item.IsMissingSeason != isMissing)
|
if (item.IsMissingSeason != isMissing)
|
||||||
{
|
{
|
||||||
|
|
|
@ -115,17 +115,13 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
||||||
{
|
{
|
||||||
var recordingFolders = GetRecordingFolders();
|
var recordingFolders = GetRecordingFolders();
|
||||||
|
|
||||||
var defaultRecordingPath = DefaultRecordingPath;
|
|
||||||
if (!recordingFolders.Any(i => i.Locations.Contains(defaultRecordingPath, StringComparer.OrdinalIgnoreCase)))
|
|
||||||
{
|
|
||||||
RemovePathFromLibrary(defaultRecordingPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
var virtualFolders = _libraryManager.GetVirtualFolders()
|
var virtualFolders = _libraryManager.GetVirtualFolders()
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
var allExistingPaths = virtualFolders.SelectMany(i => i.Locations).ToList();
|
var allExistingPaths = virtualFolders.SelectMany(i => i.Locations).ToList();
|
||||||
|
|
||||||
|
var pathsAdded = new List<string>();
|
||||||
|
|
||||||
foreach (var recordingFolder in recordingFolders)
|
foreach (var recordingFolder in recordingFolders)
|
||||||
{
|
{
|
||||||
var pathsToCreate = recordingFolder.Locations
|
var pathsToCreate = recordingFolder.Locations
|
||||||
|
@ -145,11 +141,33 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
||||||
{
|
{
|
||||||
_logger.ErrorException("Error creating virtual folder", ex);
|
_logger.ErrorException("Error creating virtual folder", ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pathsAdded.AddRange(pathsToCreate);
|
||||||
|
}
|
||||||
|
|
||||||
|
var config = GetConfiguration();
|
||||||
|
|
||||||
|
var pathsToRemove = config.MediaLocationsCreated
|
||||||
|
.Except(recordingFolders.SelectMany(i => i.Locations))
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
if (pathsAdded.Count > 0 || pathsToRemove.Count > 0)
|
||||||
|
{
|
||||||
|
pathsAdded.InsertRange(0, config.MediaLocationsCreated);
|
||||||
|
config.MediaLocationsCreated = pathsAdded.Except(pathsToRemove).Distinct(StringComparer.OrdinalIgnoreCase).ToArray();
|
||||||
|
_config.SaveConfiguration("livetv", config);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var path in pathsToRemove)
|
||||||
|
{
|
||||||
|
RemovePathFromLibrary(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RemovePathFromLibrary(string path)
|
private void RemovePathFromLibrary(string path)
|
||||||
{
|
{
|
||||||
|
_logger.Debug("Removing path from library: {0}", path);
|
||||||
|
|
||||||
var requiresRefresh = false;
|
var requiresRefresh = false;
|
||||||
var virtualFolders = _libraryManager.GetVirtualFolders()
|
var virtualFolders = _libraryManager.GetVirtualFolders()
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
|
@ -1420,8 +1420,9 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
||||||
MediaTypes = new[] { MediaType.Video },
|
MediaTypes = new[] { MediaType.Video },
|
||||||
Recursive = true,
|
Recursive = true,
|
||||||
AncestorIds = folders.Select(i => i.Id.ToString("N")).ToArray(),
|
AncestorIds = folders.Select(i => i.Id.ToString("N")).ToArray(),
|
||||||
|
IsFolder = false,
|
||||||
ExcludeLocationTypes = new[] { LocationType.Virtual },
|
ExcludeLocationTypes = new[] { LocationType.Virtual },
|
||||||
Limit = Math.Min(10, query.Limit ?? int.MaxValue),
|
Limit = Math.Min(200, query.Limit ?? int.MaxValue),
|
||||||
SortBy = new[] { ItemSortBy.DateCreated },
|
SortBy = new[] { ItemSortBy.DateCreated },
|
||||||
SortOrder = SortOrder.Descending
|
SortOrder = SortOrder.Descending
|
||||||
});
|
});
|
||||||
|
|
|
@ -107,9 +107,6 @@
|
||||||
<Content Include="dashboard-ui\components\chromecasthelpers.js">
|
<Content Include="dashboard-ui\components\chromecasthelpers.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="dashboard-ui\bower_components\fastclick\lib\fastclick.js">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="dashboard-ui\components\favoriteitems.js">
|
<Content Include="dashboard-ui\components\favoriteitems.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
@ -1686,6 +1683,9 @@
|
||||||
<None Include="dashboard-ui\strings\id.json">
|
<None Include="dashboard-ui\strings\id.json">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
|
<None Include="dashboard-ui\strings\sk.json">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
<None Include="dashboard-ui\strings\zh-HK.json">
|
<None Include="dashboard-ui\strings\zh-HK.json">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Common.Internal</id>
|
<id>MediaBrowser.Common.Internal</id>
|
||||||
<version>3.0.647</version>
|
<version>3.0.648</version>
|
||||||
<title>MediaBrowser.Common.Internal</title>
|
<title>MediaBrowser.Common.Internal</title>
|
||||||
<authors>Luke</authors>
|
<authors>Luke</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
<description>Contains common components shared by Emby Theater and Emby Server. Not intended for plugin developer consumption.</description>
|
<description>Contains common components shared by Emby Theater and Emby Server. Not intended for plugin developer consumption.</description>
|
||||||
<copyright>Copyright © Emby 2013</copyright>
|
<copyright>Copyright © Emby 2013</copyright>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="MediaBrowser.Common" version="3.0.647" />
|
<dependency id="MediaBrowser.Common" version="3.0.648" />
|
||||||
<dependency id="NLog" version="4.3.4" />
|
<dependency id="NLog" version="4.3.4" />
|
||||||
<dependency id="SimpleInjector" version="3.1.4" />
|
<dependency id="SimpleInjector" version="3.1.4" />
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Common</id>
|
<id>MediaBrowser.Common</id>
|
||||||
<version>3.0.647</version>
|
<version>3.0.648</version>
|
||||||
<title>MediaBrowser.Common</title>
|
<title>MediaBrowser.Common</title>
|
||||||
<authors>Emby Team</authors>
|
<authors>Emby Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
|
||||||
<metadata>
|
|
||||||
<id>MediaBrowser.Model.Signed</id>
|
|
||||||
<version>3.0.647</version>
|
|
||||||
<title>MediaBrowser.Model - Signed Edition</title>
|
|
||||||
<authors>Emby Team</authors>
|
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
|
||||||
<projectUrl>https://github.com/MediaBrowser/MediaBrowser</projectUrl>
|
|
||||||
<iconUrl>http://www.mb3admin.com/images/mb3icons1-1.png</iconUrl>
|
|
||||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
|
||||||
<description>Contains common model objects and interfaces used by all Emby solutions.</description>
|
|
||||||
<copyright>Copyright © Emby 2013</copyright>
|
|
||||||
<dependencies>
|
|
||||||
</dependencies>
|
|
||||||
</metadata>
|
|
||||||
<files>
|
|
||||||
<file src="dllssigned\net45\MediaBrowser.Model.dll" target="lib\net45\MediaBrowser.Model.dll" />
|
|
||||||
</files>
|
|
||||||
</package>
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Server.Core</id>
|
<id>MediaBrowser.Server.Core</id>
|
||||||
<version>3.0.647</version>
|
<version>3.0.648</version>
|
||||||
<title>Media Browser.Server.Core</title>
|
<title>Media Browser.Server.Core</title>
|
||||||
<authors>Emby Team</authors>
|
<authors>Emby Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
<description>Contains core components required to build plugins for Emby Server.</description>
|
<description>Contains core components required to build plugins for Emby Server.</description>
|
||||||
<copyright>Copyright © Emby 2013</copyright>
|
<copyright>Copyright © Emby 2013</copyright>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="MediaBrowser.Common" version="3.0.647" />
|
<dependency id="MediaBrowser.Common" version="3.0.648" />
|
||||||
<dependency id="Interfaces.IO" version="1.0.0.5" />
|
<dependency id="Interfaces.IO" version="1.0.0.5" />
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user