commit
69f00aef74
|
@ -32,7 +32,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.4.9\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.4.10\lib\net45\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="ServiceStack.Text, Version=4.5.8.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="ServiceStack.Text, Version=4.5.8.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\ServiceStack.Text.4.5.8\lib\net45\ServiceStack.Text.dll</HintPath>
|
<HintPath>..\packages\ServiceStack.Text.4.5.8\lib\net45\ServiceStack.Text.dll</HintPath>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="NLog" version="4.4.9" targetFramework="net46" />
|
<package id="NLog" version="4.4.10" targetFramework="net46" />
|
||||||
<package id="ServiceStack.Text" version="4.5.8" targetFramework="net462" />
|
<package id="ServiceStack.Text" version="4.5.8" targetFramework="net462" />
|
||||||
<package id="SharpCompress" version="0.14.0" targetFramework="net462" />
|
<package id="SharpCompress" version="0.14.0" targetFramework="net462" />
|
||||||
<package id="SimpleInjector" version="4.0.7" targetFramework="net462" />
|
<package id="SimpleInjector" version="4.0.7" targetFramework="net462" />
|
||||||
|
|
|
@ -1378,12 +1378,6 @@ namespace Emby.Server.Implementations.Channels
|
||||||
item.SetImagePath(ImageType.Primary, info.ImageUrl);
|
item.SetImagePath(ImageType.Primary, info.ImageUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.SourceType != SourceType.Channel)
|
|
||||||
{
|
|
||||||
item.SourceType = SourceType.Channel;
|
|
||||||
forceUpdate = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isNew)
|
if (isNew)
|
||||||
{
|
{
|
||||||
await _libraryManager.CreateItem(item, cancellationToken).ConfigureAwait(false);
|
await _libraryManager.CreateItem(item, cancellationToken).ConfigureAwait(false);
|
||||||
|
|
|
@ -199,10 +199,11 @@ namespace Emby.Server.Implementations.Data
|
||||||
AddColumn(db, "TypedBaseItems", "ParentId", "GUID", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "ParentId", "GUID", existingColumnNames);
|
||||||
AddColumn(db, "TypedBaseItems", "Genres", "Text", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "Genres", "Text", existingColumnNames);
|
||||||
AddColumn(db, "TypedBaseItems", "SortName", "Text", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "SortName", "Text", existingColumnNames);
|
||||||
|
AddColumn(db, "TypedBaseItems", "ForcedSortName", "Text", existingColumnNames);
|
||||||
|
|
||||||
AddColumn(db, "TypedBaseItems", "RunTimeTicks", "BIGINT", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "RunTimeTicks", "BIGINT", existingColumnNames);
|
||||||
|
|
||||||
AddColumn(db, "TypedBaseItems", "HomePageUrl", "Text", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "HomePageUrl", "Text", existingColumnNames);
|
||||||
AddColumn(db, "TypedBaseItems", "VoteCount", "INT", existingColumnNames);
|
|
||||||
AddColumn(db, "TypedBaseItems", "DisplayMediaType", "Text", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "DisplayMediaType", "Text", existingColumnNames);
|
||||||
AddColumn(db, "TypedBaseItems", "DateCreated", "DATETIME", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "DateCreated", "DATETIME", existingColumnNames);
|
||||||
AddColumn(db, "TypedBaseItems", "DateModified", "DATETIME", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "DateModified", "DATETIME", existingColumnNames);
|
||||||
|
@ -233,7 +234,6 @@ namespace Emby.Server.Implementations.Data
|
||||||
AddColumn(db, "TypedBaseItems", "UnratedType", "Text", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "UnratedType", "Text", existingColumnNames);
|
||||||
AddColumn(db, "TypedBaseItems", "TopParentId", "Text", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "TopParentId", "Text", existingColumnNames);
|
||||||
AddColumn(db, "TypedBaseItems", "IsItemByName", "BIT", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "IsItemByName", "BIT", existingColumnNames);
|
||||||
AddColumn(db, "TypedBaseItems", "SourceType", "Text", existingColumnNames);
|
|
||||||
AddColumn(db, "TypedBaseItems", "TrailerTypes", "Text", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "TrailerTypes", "Text", existingColumnNames);
|
||||||
AddColumn(db, "TypedBaseItems", "CriticRating", "Float", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "CriticRating", "Float", existingColumnNames);
|
||||||
AddColumn(db, "TypedBaseItems", "InheritedTags", "Text", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "InheritedTags", "Text", existingColumnNames);
|
||||||
|
@ -424,9 +424,8 @@ namespace Emby.Server.Implementations.Data
|
||||||
"OfficialRating",
|
"OfficialRating",
|
||||||
"HomePageUrl",
|
"HomePageUrl",
|
||||||
"DisplayMediaType",
|
"DisplayMediaType",
|
||||||
"SortName",
|
"ForcedSortName",
|
||||||
"RunTimeTicks",
|
"RunTimeTicks",
|
||||||
"VoteCount",
|
|
||||||
"DateCreated",
|
"DateCreated",
|
||||||
"DateModified",
|
"DateModified",
|
||||||
"guid",
|
"guid",
|
||||||
|
@ -439,7 +438,6 @@ namespace Emby.Server.Implementations.Data
|
||||||
"LockedFields",
|
"LockedFields",
|
||||||
"Studios",
|
"Studios",
|
||||||
"Tags",
|
"Tags",
|
||||||
"SourceType",
|
|
||||||
"TrailerTypes",
|
"TrailerTypes",
|
||||||
"OriginalTitle",
|
"OriginalTitle",
|
||||||
"PrimaryVersionId",
|
"PrimaryVersionId",
|
||||||
|
@ -541,9 +539,9 @@ namespace Emby.Server.Implementations.Data
|
||||||
"Genres",
|
"Genres",
|
||||||
"InheritedParentalRatingValue",
|
"InheritedParentalRatingValue",
|
||||||
"SortName",
|
"SortName",
|
||||||
|
"ForcedSortName",
|
||||||
"RunTimeTicks",
|
"RunTimeTicks",
|
||||||
"HomePageUrl",
|
"HomePageUrl",
|
||||||
"VoteCount",
|
|
||||||
"DisplayMediaType",
|
"DisplayMediaType",
|
||||||
"DateCreated",
|
"DateCreated",
|
||||||
"DateModified",
|
"DateModified",
|
||||||
|
@ -563,7 +561,6 @@ namespace Emby.Server.Implementations.Data
|
||||||
"UnratedType",
|
"UnratedType",
|
||||||
"TopParentId",
|
"TopParentId",
|
||||||
"IsItemByName",
|
"IsItemByName",
|
||||||
"SourceType",
|
|
||||||
"TrailerTypes",
|
"TrailerTypes",
|
||||||
"CriticRating",
|
"CriticRating",
|
||||||
"InheritedTags",
|
"InheritedTags",
|
||||||
|
@ -815,10 +812,12 @@ namespace Emby.Server.Implementations.Data
|
||||||
saveItemStatement.TryBind("@InheritedParentalRatingValue", item.InheritedParentalRatingValue);
|
saveItemStatement.TryBind("@InheritedParentalRatingValue", item.InheritedParentalRatingValue);
|
||||||
|
|
||||||
saveItemStatement.TryBind("@SortName", item.SortName);
|
saveItemStatement.TryBind("@SortName", item.SortName);
|
||||||
|
|
||||||
|
saveItemStatement.TryBind("@ForcedSortName", item.ForcedSortName);
|
||||||
|
|
||||||
saveItemStatement.TryBind("@RunTimeTicks", item.RunTimeTicks);
|
saveItemStatement.TryBind("@RunTimeTicks", item.RunTimeTicks);
|
||||||
|
|
||||||
saveItemStatement.TryBind("@HomePageUrl", item.HomePageUrl);
|
saveItemStatement.TryBind("@HomePageUrl", item.HomePageUrl);
|
||||||
saveItemStatement.TryBind("@VoteCount", item.VoteCount);
|
|
||||||
saveItemStatement.TryBind("@DisplayMediaType", item.DisplayMediaType);
|
saveItemStatement.TryBind("@DisplayMediaType", item.DisplayMediaType);
|
||||||
saveItemStatement.TryBind("@DateCreated", item.DateCreated);
|
saveItemStatement.TryBind("@DateCreated", item.DateCreated);
|
||||||
saveItemStatement.TryBind("@DateModified", item.DateModified);
|
saveItemStatement.TryBind("@DateModified", item.DateModified);
|
||||||
|
@ -909,7 +908,6 @@ namespace Emby.Server.Implementations.Data
|
||||||
isByName = dualAccess == null || dualAccess.IsAccessedByName;
|
isByName = dualAccess == null || dualAccess.IsAccessedByName;
|
||||||
}
|
}
|
||||||
saveItemStatement.TryBind("@IsItemByName", isByName);
|
saveItemStatement.TryBind("@IsItemByName", isByName);
|
||||||
saveItemStatement.TryBind("@SourceType", item.SourceType.ToString());
|
|
||||||
|
|
||||||
var trailer = item as Trailer;
|
var trailer = item as Trailer;
|
||||||
if (trailer != null && trailer.TrailerTypes.Count > 0)
|
if (trailer != null && trailer.TrailerTypes.Count > 0)
|
||||||
|
@ -1624,7 +1622,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
if (!reader.IsDBNull(index))
|
if (!reader.IsDBNull(index))
|
||||||
{
|
{
|
||||||
item.SortName = reader.GetString(index);
|
item.ForcedSortName = reader.GetString(index);
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
@ -1635,15 +1633,6 @@ namespace Emby.Server.Implementations.Data
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (HasField(query, ItemFields.VoteCount))
|
|
||||||
{
|
|
||||||
if (!reader.IsDBNull(index))
|
|
||||||
{
|
|
||||||
item.VoteCount = reader.GetInt32(index);
|
|
||||||
}
|
|
||||||
index++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (HasField(query, ItemFields.DateCreated))
|
if (HasField(query, ItemFields.DateCreated))
|
||||||
{
|
{
|
||||||
if (!reader.IsDBNull(index))
|
if (!reader.IsDBNull(index))
|
||||||
|
@ -1733,12 +1722,6 @@ namespace Emby.Server.Implementations.Data
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!reader.IsDBNull(index))
|
|
||||||
{
|
|
||||||
item.SourceType = (SourceType)Enum.Parse(typeof(SourceType), reader.GetString(index), true);
|
|
||||||
}
|
|
||||||
index++;
|
|
||||||
|
|
||||||
if (hasTrailerTypes)
|
if (hasTrailerTypes)
|
||||||
{
|
{
|
||||||
var trailer = item as Trailer;
|
var trailer = item as Trailer;
|
||||||
|
@ -2283,7 +2266,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
}
|
}
|
||||||
if (field == ItemFields.SortName)
|
if (field == ItemFields.SortName)
|
||||||
{
|
{
|
||||||
return new[] { "SortName" };
|
return new[] { "ForcedSortName" };
|
||||||
}
|
}
|
||||||
if (field == ItemFields.Taglines)
|
if (field == ItemFields.Taglines)
|
||||||
{
|
{
|
||||||
|
@ -2306,7 +2289,6 @@ namespace Emby.Server.Implementations.Data
|
||||||
case ItemFields.HomePageUrl:
|
case ItemFields.HomePageUrl:
|
||||||
case ItemFields.Keywords:
|
case ItemFields.Keywords:
|
||||||
case ItemFields.DisplayMediaType:
|
case ItemFields.DisplayMediaType:
|
||||||
case ItemFields.VoteCount:
|
|
||||||
case ItemFields.CustomRating:
|
case ItemFields.CustomRating:
|
||||||
case ItemFields.ProductionLocations:
|
case ItemFields.ProductionLocations:
|
||||||
case ItemFields.Settings:
|
case ItemFields.Settings:
|
||||||
|
@ -3872,34 +3854,6 @@ namespace Emby.Server.Implementations.Data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (query.SourceTypes.Length == 1)
|
|
||||||
{
|
|
||||||
whereClauses.Add("SourceType=@SourceType");
|
|
||||||
if (statement != null)
|
|
||||||
{
|
|
||||||
statement.TryBind("@SourceType", query.SourceTypes[0].ToString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (query.SourceTypes.Length > 1)
|
|
||||||
{
|
|
||||||
var inClause = string.Join(",", query.SourceTypes.Select(i => "'" + i + "'").ToArray());
|
|
||||||
whereClauses.Add(string.Format("SourceType in ({0})", inClause));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (query.ExcludeSourceTypes.Length == 1)
|
|
||||||
{
|
|
||||||
whereClauses.Add("SourceType<>@ExcludeSourceTypes");
|
|
||||||
if (statement != null)
|
|
||||||
{
|
|
||||||
statement.TryBind("@ExcludeSourceTypes", query.ExcludeSourceTypes[0].ToString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (query.ExcludeSourceTypes.Length > 1)
|
|
||||||
{
|
|
||||||
var inClause = string.Join(",", query.ExcludeSourceTypes.Select(i => "'" + i + "'").ToArray());
|
|
||||||
whereClauses.Add(string.Format("SourceType not in ({0})", inClause));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (query.TrailerTypes.Length > 0)
|
if (query.TrailerTypes.Length > 0)
|
||||||
{
|
{
|
||||||
var clauses = new List<string>();
|
var clauses = new List<string>();
|
||||||
|
@ -5017,14 +4971,6 @@ namespace Emby.Server.Implementations.Data
|
||||||
statement.TryBind("@NameContains", "%" + query.NameContains + "%");
|
statement.TryBind("@NameContains", "%" + query.NameContains + "%");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (query.SourceTypes.Length == 1)
|
|
||||||
{
|
|
||||||
whereClauses.Add("(select sourcetype from typedbaseitems where guid=ItemId) = @SourceTypes");
|
|
||||||
if (statement != null)
|
|
||||||
{
|
|
||||||
statement.TryBind("@SourceTypes", query.SourceTypes[0].ToString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return whereClauses;
|
return whereClauses;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1058,11 +1058,6 @@ namespace Emby.Server.Implementations.Dto
|
||||||
dto.CommunityRating = item.CommunityRating;
|
dto.CommunityRating = item.CommunityRating;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fields.Contains(ItemFields.VoteCount))
|
|
||||||
{
|
|
||||||
dto.VoteCount = item.VoteCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
//if (item.IsFolder)
|
//if (item.IsFolder)
|
||||||
//{
|
//{
|
||||||
// var folder = (Folder)item;
|
// var folder = (Folder)item;
|
||||||
|
|
|
@ -31,6 +31,9 @@
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="..\SharedVersion.cs">
|
||||||
|
<Link>Properties\SharedVersion.cs</Link>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Activity\ActivityLogEntryPoint.cs" />
|
<Compile Include="Activity\ActivityLogEntryPoint.cs" />
|
||||||
<Compile Include="Activity\ActivityManager.cs" />
|
<Compile Include="Activity\ActivityManager.cs" />
|
||||||
<Compile Include="Activity\ActivityRepository.cs" />
|
<Compile Include="Activity\ActivityRepository.cs" />
|
||||||
|
|
|
@ -38,7 +38,10 @@ namespace Emby.Server.Implementations.Library
|
||||||
// Synology
|
// Synology
|
||||||
"@eaDir",
|
"@eaDir",
|
||||||
"eaDir",
|
"eaDir",
|
||||||
"#recycle"
|
"#recycle",
|
||||||
|
|
||||||
|
// Qnap
|
||||||
|
"@Recycle"
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1292,7 +1292,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<BaseItem> GetItemList(InternalItemsQuery query)
|
public IEnumerable<BaseItem> GetItemList(InternalItemsQuery query, bool allowExternalContent)
|
||||||
{
|
{
|
||||||
if (query.Recursive && query.ParentId.HasValue)
|
if (query.Recursive && query.ParentId.HasValue)
|
||||||
{
|
{
|
||||||
|
@ -1305,12 +1305,17 @@ namespace Emby.Server.Implementations.Library
|
||||||
|
|
||||||
if (query.User != null)
|
if (query.User != null)
|
||||||
{
|
{
|
||||||
AddUserToQuery(query, query.User);
|
AddUserToQuery(query, query.User, allowExternalContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ItemRepository.GetItemList(query);
|
return ItemRepository.GetItemList(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IEnumerable<BaseItem> GetItemList(InternalItemsQuery query)
|
||||||
|
{
|
||||||
|
return GetItemList(query, true);
|
||||||
|
}
|
||||||
|
|
||||||
public int GetCount(InternalItemsQuery query)
|
public int GetCount(InternalItemsQuery query)
|
||||||
{
|
{
|
||||||
if (query.Recursive && query.ParentId.HasValue)
|
if (query.Recursive && query.ParentId.HasValue)
|
||||||
|
@ -1548,7 +1553,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
query.Parent = null;
|
query.Parent = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddUserToQuery(InternalItemsQuery query, User user)
|
private void AddUserToQuery(InternalItemsQuery query, User user, bool allowExternalContent = true)
|
||||||
{
|
{
|
||||||
if (query.AncestorIds.Length == 0 &&
|
if (query.AncestorIds.Length == 0 &&
|
||||||
!query.ParentId.HasValue &&
|
!query.ParentId.HasValue &&
|
||||||
|
@ -1561,7 +1566,8 @@ namespace Emby.Server.Implementations.Library
|
||||||
var userViews = _userviewManager().GetUserViews(new UserViewQuery
|
var userViews = _userviewManager().GetUserViews(new UserViewQuery
|
||||||
{
|
{
|
||||||
UserId = user.Id.ToString("N"),
|
UserId = user.Id.ToString("N"),
|
||||||
IncludeHidden = true
|
IncludeHidden = true,
|
||||||
|
IncludeExternalContent = allowExternalContent
|
||||||
|
|
||||||
}, CancellationToken.None).Result.ToList();
|
}, CancellationToken.None).Result.ToList();
|
||||||
|
|
||||||
|
|
|
@ -280,7 +280,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
|
|
||||||
} : new string[] { };
|
} : new string[] { };
|
||||||
|
|
||||||
return _libraryManager.GetItemList(new InternalItemsQuery(user)
|
var query = new InternalItemsQuery(user)
|
||||||
{
|
{
|
||||||
IncludeItemTypes = includeItemTypes,
|
IncludeItemTypes = includeItemTypes,
|
||||||
SortOrder = SortOrder.Descending,
|
SortOrder = SortOrder.Descending,
|
||||||
|
@ -289,11 +289,16 @@ namespace Emby.Server.Implementations.Library
|
||||||
ExcludeItemTypes = excludeItemTypes,
|
ExcludeItemTypes = excludeItemTypes,
|
||||||
IsVirtualItem = false,
|
IsVirtualItem = false,
|
||||||
Limit = limit * 5,
|
Limit = limit * 5,
|
||||||
SourceTypes = parents.Count == 0 ? new[] { SourceType.Library } : new SourceType[] { },
|
|
||||||
IsPlayed = isPlayed,
|
IsPlayed = isPlayed,
|
||||||
DtoOptions = options
|
DtoOptions = options
|
||||||
|
};
|
||||||
|
|
||||||
}, parents);
|
if (parents.Count == 0)
|
||||||
|
{
|
||||||
|
return _libraryManager.GetItemList(query, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
return _libraryManager.GetItemList(query, parents);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2270,11 +2270,6 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||||
writer.WriteElementString("studio", studio);
|
writer.WriteElementString("studio", studio);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.VoteCount.HasValue)
|
|
||||||
{
|
|
||||||
writer.WriteElementString("votes", item.VoteCount.Value.ToString(CultureInfo.InvariantCulture));
|
|
||||||
}
|
|
||||||
|
|
||||||
writer.WriteEndElement();
|
writer.WriteEndElement();
|
||||||
writer.WriteEndDocument();
|
writer.WriteEndDocument();
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace Emby.Server.Implementations.LiveTv
|
||||||
private readonly IMediaEncoder _mediaEncoder;
|
private readonly IMediaEncoder _mediaEncoder;
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
|
|
||||||
const int AnalyzeDurationMs = 2000;
|
const int AnalyzeDurationMs = 1000;
|
||||||
|
|
||||||
public LiveStreamHelper(IMediaEncoder mediaEncoder, ILogger logger)
|
public LiveStreamHelper(IMediaEncoder mediaEncoder, ILogger logger)
|
||||||
{
|
{
|
||||||
|
|
|
@ -422,6 +422,8 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
||||||
SupportsTranscoding = true,
|
SupportsTranscoding = true,
|
||||||
IsInfiniteStream = true,
|
IsInfiniteStream = true,
|
||||||
IgnoreDts = true,
|
IgnoreDts = true,
|
||||||
|
//SupportsProbing = false,
|
||||||
|
//AnalyzeDurationMs = 2000000
|
||||||
//IgnoreIndex = true,
|
//IgnoreIndex = true,
|
||||||
//ReadAtNativeFramerate = true
|
//ReadAtNativeFramerate = true
|
||||||
};
|
};
|
||||||
|
|
|
@ -117,7 +117,9 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
await _multicastStream.CopyUntilCancelled(response.Content, () => Resolve(openTaskCompletionSource), cancellationToken).ConfigureAwait(false);
|
Resolve(openTaskCompletionSource);
|
||||||
|
|
||||||
|
await _multicastStream.CopyUntilCancelled(response.Content, null, cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,5 +26,3 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
||||||
|
|
|
@ -243,7 +243,6 @@ namespace MediaBrowser.Api
|
||||||
|
|
||||||
item.DisplayMediaType = request.DisplayMediaType;
|
item.DisplayMediaType = request.DisplayMediaType;
|
||||||
item.CommunityRating = request.CommunityRating;
|
item.CommunityRating = request.CommunityRating;
|
||||||
item.VoteCount = request.VoteCount;
|
|
||||||
item.HomePageUrl = request.HomePageUrl;
|
item.HomePageUrl = request.HomePageUrl;
|
||||||
item.IndexNumber = request.IndexNumber;
|
item.IndexNumber = request.IndexNumber;
|
||||||
item.ParentIndexNumber = request.ParentIndexNumber;
|
item.ParentIndexNumber = request.ParentIndexNumber;
|
||||||
|
|
|
@ -675,7 +675,6 @@ namespace MediaBrowser.Api.Library
|
||||||
Limit = 0,
|
Limit = 0,
|
||||||
Recursive = true,
|
Recursive = true,
|
||||||
IsVirtualItem = false,
|
IsVirtualItem = false,
|
||||||
SourceTypes = new[] { SourceType.Library },
|
|
||||||
IsFavorite = request.IsFavorite,
|
IsFavorite = request.IsFavorite,
|
||||||
DtoOptions = new DtoOptions(false)
|
DtoOptions = new DtoOptions(false)
|
||||||
{
|
{
|
||||||
|
|
|
@ -106,6 +106,13 @@ namespace MediaBrowser.Api.Playback
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<object> Post(OpenMediaSource request)
|
public async Task<object> Post(OpenMediaSource request)
|
||||||
|
{
|
||||||
|
var result = await OpenMediaSource(request).ConfigureAwait(false);
|
||||||
|
|
||||||
|
return ToOptimizedResult(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task<LiveStreamResponse> OpenMediaSource(OpenMediaSource request)
|
||||||
{
|
{
|
||||||
var authInfo = _authContext.GetAuthorizationInfo(Request);
|
var authInfo = _authContext.GetAuthorizationInfo(Request);
|
||||||
|
|
||||||
|
@ -137,7 +144,7 @@ namespace MediaBrowser.Api.Playback
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ToOptimizedResult(result);
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Post(CloseMediaSource request)
|
public void Post(CloseMediaSource request)
|
||||||
|
@ -172,6 +179,34 @@ namespace MediaBrowser.Api.Playback
|
||||||
SetDeviceSpecificData(request.Id, info, profile, authInfo, request.MaxStreamingBitrate ?? profile.MaxStreamingBitrate, request.StartTimeTicks ?? 0, mediaSourceId, request.AudioStreamIndex, request.SubtitleStreamIndex, request.MaxAudioChannels, request.UserId, request.EnableDirectPlay, request.ForceDirectPlayRemoteMediaSource, request.EnableDirectStream, request.EnableTranscoding, request.AllowVideoStreamCopy, request.AllowAudioStreamCopy);
|
SetDeviceSpecificData(request.Id, info, profile, authInfo, request.MaxStreamingBitrate ?? profile.MaxStreamingBitrate, request.StartTimeTicks ?? 0, mediaSourceId, request.AudioStreamIndex, request.SubtitleStreamIndex, request.MaxAudioChannels, request.UserId, request.EnableDirectPlay, request.ForceDirectPlayRemoteMediaSource, request.EnableDirectStream, request.EnableTranscoding, request.AllowVideoStreamCopy, request.AllowAudioStreamCopy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (request.AutoOpenLiveStream)
|
||||||
|
{
|
||||||
|
var mediaSource = string.IsNullOrWhiteSpace(request.MediaSourceId) ? info.MediaSources.FirstOrDefault() : info.MediaSources.FirstOrDefault(i => string.Equals(i.Id, request.MediaSourceId, StringComparison.Ordinal));
|
||||||
|
|
||||||
|
if (mediaSource != null && mediaSource.RequiresOpening && string.IsNullOrWhiteSpace(mediaSource.LiveStreamId))
|
||||||
|
{
|
||||||
|
var openStreamResult = await OpenMediaSource(new OpenMediaSource
|
||||||
|
{
|
||||||
|
AudioStreamIndex = request.AudioStreamIndex,
|
||||||
|
DeviceProfile = request.DeviceProfile,
|
||||||
|
EnableDirectPlay = request.EnableDirectPlay,
|
||||||
|
EnableDirectStream = request.EnableDirectStream,
|
||||||
|
ForceDirectPlayRemoteMediaSource = request.ForceDirectPlayRemoteMediaSource,
|
||||||
|
ItemId = request.Id,
|
||||||
|
MaxAudioChannels = request.MaxAudioChannels,
|
||||||
|
MaxStreamingBitrate = request.MaxStreamingBitrate,
|
||||||
|
PlaySessionId = info.PlaySessionId,
|
||||||
|
StartTimeTicks = request.StartTimeTicks,
|
||||||
|
SubtitleStreamIndex = request.SubtitleStreamIndex,
|
||||||
|
UserId = request.UserId,
|
||||||
|
OpenToken = mediaSource.OpenToken
|
||||||
|
|
||||||
|
}).ConfigureAwait(false);
|
||||||
|
|
||||||
|
info.MediaSources = new List<MediaSourceInfo> { openStreamResult.MediaSource };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,6 @@ namespace MediaBrowser.Api
|
||||||
config.EnableSimpleArtistDetection = true;
|
config.EnableSimpleArtistDetection = true;
|
||||||
config.EnableNormalizedItemByNameIds = true;
|
config.EnableNormalizedItemByNameIds = true;
|
||||||
config.DisableLiveTvChannelUserDataName = true;
|
config.DisableLiveTvChannelUserDataName = true;
|
||||||
config.EnableSimpleSortNameHandling = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Post(UpdateStartupConfiguration request)
|
public void Post(UpdateStartupConfiguration request)
|
||||||
|
|
|
@ -35,7 +35,6 @@ namespace MediaBrowser.Controller.Channels
|
||||||
public override SourceType SourceType
|
public override SourceType SourceType
|
||||||
{
|
{
|
||||||
get { return SourceType.Channel; }
|
get { return SourceType.Channel; }
|
||||||
set { }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override QueryResult<BaseItem> GetItemsInternal(InternalItemsQuery query)
|
protected override QueryResult<BaseItem> GetItemsInternal(InternalItemsQuery query)
|
||||||
|
|
|
@ -87,7 +87,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
|
|
||||||
private List<Guid> _childrenIds = null;
|
private List<Guid> _childrenIds = null;
|
||||||
private readonly object _childIdsLock = new object();
|
private readonly object _childIdsLock = new object();
|
||||||
protected override IEnumerable<BaseItem> LoadChildren()
|
protected override List<BaseItem> LoadChildren()
|
||||||
{
|
{
|
||||||
lock (_childIdsLock)
|
lock (_childIdsLock)
|
||||||
{
|
{
|
||||||
|
|
|
@ -131,7 +131,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||||
/// Creates the name of the sort.
|
/// Creates the name of the sort.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>System.String.</returns>
|
/// <returns>System.String.</returns>
|
||||||
protected override string CreateSortNameInternal()
|
protected override string CreateSortName()
|
||||||
{
|
{
|
||||||
return (ParentIndexNumber != null ? ParentIndexNumber.Value.ToString("0000 - ") : "")
|
return (ParentIndexNumber != null ? ParentIndexNumber.Value.ToString("0000 - ") : "")
|
||||||
+ (IndexNumber != null ? IndexNumber.Value.ToString("0000 - ") : "") + Name;
|
+ (IndexNumber != null ? IndexNumber.Value.ToString("0000 - ") : "") + Name;
|
||||||
|
|
|
@ -90,7 +90,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
protected override IEnumerable<BaseItem> ActualChildren
|
public override IEnumerable<BaseItem> Children
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
@ -99,7 +99,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||||
return new List<BaseItem>();
|
return new List<BaseItem>();
|
||||||
}
|
}
|
||||||
|
|
||||||
return base.ActualChildren;
|
return base.Children;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,6 @@ namespace MediaBrowser.Controller.Entities
|
||||||
ImageInfos = new List<ItemImageInfo>();
|
ImageInfos = new List<ItemImageInfo>();
|
||||||
InheritedTags = new List<string>();
|
InheritedTags = new List<string>();
|
||||||
ProductionLocations = new List<string>();
|
ProductionLocations = new List<string>();
|
||||||
SourceType = SourceType.Library;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static readonly char[] SlugReplaceChars = { '?', '/', '&' };
|
public static readonly char[] SlugReplaceChars = { '?', '/', '&' };
|
||||||
|
@ -187,15 +186,10 @@ namespace MediaBrowser.Controller.Entities
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
var isSortNameDefault = IsSortNameDefault(SortName);
|
|
||||||
|
|
||||||
_name = value;
|
_name = value;
|
||||||
|
|
||||||
if (isSortNameDefault)
|
|
||||||
{
|
|
||||||
// lazy load this again
|
// lazy load this again
|
||||||
SortName = null;
|
_sortName = null;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,7 +273,18 @@ namespace MediaBrowser.Controller.Entities
|
||||||
public virtual string Path { get; set; }
|
public virtual string Path { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
public virtual SourceType SourceType { get; set; }
|
public virtual SourceType SourceType
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrWhiteSpace(ChannelId))
|
||||||
|
{
|
||||||
|
return SourceType.Channel;
|
||||||
|
}
|
||||||
|
|
||||||
|
return SourceType.Library;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the folder containing the item.
|
/// Returns the folder containing the item.
|
||||||
|
@ -586,6 +591,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string _forcedSortName;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the name of the forced sort.
|
/// Gets or sets the name of the forced sort.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -593,42 +599,8 @@ namespace MediaBrowser.Controller.Entities
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
public string ForcedSortName
|
public string ForcedSortName
|
||||||
{
|
{
|
||||||
get
|
get { return _forcedSortName; }
|
||||||
{
|
set { _forcedSortName = value; _sortName = null; }
|
||||||
var sortName = SortName;
|
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(sortName))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (string.Equals(sortName, CreateSortName(), StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return sortName;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (string.IsNullOrWhiteSpace(value))
|
|
||||||
{
|
|
||||||
SortName = null;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var newValue = CreateSortNameFromCustomValue(value);
|
|
||||||
|
|
||||||
if (string.Equals(newValue, CreateSortName(), StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
SortName = null;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SortName = newValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private string _sortName;
|
private string _sortName;
|
||||||
|
@ -642,9 +614,17 @@ namespace MediaBrowser.Controller.Entities
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (_sortName == null)
|
if (_sortName == null)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrWhiteSpace(ForcedSortName))
|
||||||
|
{
|
||||||
|
// Need the ToLower because that's what CreateSortName does
|
||||||
|
_sortName = ModifySortChunks(ForcedSortName).ToLower();
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
_sortName = CreateSortName();
|
_sortName = CreateSortName();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return _sortName;
|
return _sortName;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
|
@ -653,31 +633,6 @@ namespace MediaBrowser.Controller.Entities
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private string CreateSortNameFromCustomValue(string value)
|
|
||||||
{
|
|
||||||
return string.IsNullOrWhiteSpace(value) ? null : NormalizeCustomSortName(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected virtual string NormalizeCustomSortName(string value)
|
|
||||||
{
|
|
||||||
if (ConfigurationManager.Configuration.EnableSimpleSortNameHandling)
|
|
||||||
{
|
|
||||||
return value.RemoveDiacritics().ToLower();
|
|
||||||
}
|
|
||||||
|
|
||||||
return ModifySortChunks(value).ToLower();
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsSortNameDefault(string value)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrWhiteSpace(value))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return string.Equals(CreateSortNameFromCustomValue(value), CreateSortName(), StringComparison.OrdinalIgnoreCase);
|
|
||||||
}
|
|
||||||
|
|
||||||
public string GetInternalMetadataPath()
|
public string GetInternalMetadataPath()
|
||||||
{
|
{
|
||||||
var basePath = ConfigurationManager.ApplicationPaths.InternalMetadataPath;
|
var basePath = ConfigurationManager.ApplicationPaths.InternalMetadataPath;
|
||||||
|
@ -699,22 +654,14 @@ namespace MediaBrowser.Controller.Entities
|
||||||
return System.IO.Path.Combine(basePath, idString.Substring(0, 2), idString);
|
return System.IO.Path.Combine(basePath, idString.Substring(0, 2), idString);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected string CreateSortName()
|
|
||||||
{
|
|
||||||
if (string.IsNullOrWhiteSpace(Name))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return CreateSortNameInternal();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates the name of the sort.
|
/// Creates the name of the sort.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>System.String.</returns>
|
/// <returns>System.String.</returns>
|
||||||
protected virtual string CreateSortNameInternal()
|
protected virtual string CreateSortName()
|
||||||
{
|
{
|
||||||
|
if (Name == null) return null; //some items may not have name filled in properly
|
||||||
|
|
||||||
if (!EnableAlphaNumericSorting)
|
if (!EnableAlphaNumericSorting)
|
||||||
{
|
{
|
||||||
return Name.TrimStart();
|
return Name.TrimStart();
|
||||||
|
@ -951,13 +898,6 @@ namespace MediaBrowser.Controller.Entities
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
public float? CommunityRating { get; set; }
|
public float? CommunityRating { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the community rating vote count.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The community rating vote count.</value>
|
|
||||||
[IgnoreDataMember]
|
|
||||||
public int? VoteCount { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the run time ticks.
|
/// Gets or sets the run time ticks.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1367,6 +1307,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
|
|
||||||
public void AfterMetadataRefresh()
|
public void AfterMetadataRefresh()
|
||||||
{
|
{
|
||||||
|
_sortName = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -2253,6 +2194,8 @@ namespace MediaBrowser.Controller.Entities
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual bool BeforeMetadataRefresh()
|
public virtual bool BeforeMetadataRefresh()
|
||||||
{
|
{
|
||||||
|
_sortName = null;
|
||||||
|
|
||||||
var hasChanges = false;
|
var hasChanges = false;
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(Name) && !string.IsNullOrEmpty(Path))
|
if (string.IsNullOrEmpty(Name) && !string.IsNullOrEmpty(Path))
|
||||||
|
|
|
@ -311,12 +311,12 @@ namespace MediaBrowser.Controller.Entities
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The actual children.</value>
|
/// <value>The actual children.</value>
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
protected override IEnumerable<BaseItem> ActualChildren
|
public override IEnumerable<BaseItem> Children
|
||||||
{
|
{
|
||||||
get { return GetActualChildren(); }
|
get { return GetActualChildren(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
private IEnumerable<BaseItem> GetActualChildren()
|
public IEnumerable<BaseItem> GetActualChildren()
|
||||||
{
|
{
|
||||||
return GetPhysicalFolders(true).SelectMany(c => c.Children);
|
return GetPhysicalFolders(true).SelectMany(c => c.Children);
|
||||||
}
|
}
|
||||||
|
|
|
@ -185,7 +185,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
item.Id = LibraryManager.GetNewItemId(item.Path, item.GetType());
|
item.Id = LibraryManager.GetNewItemId(item.Path, item.GetType());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ActualChildren.Any(i => i.Id == item.Id))
|
if (Children.Any(i => i.Id == item.Id))
|
||||||
{
|
{
|
||||||
throw new ArgumentException(string.Format("A child with the Id {0} already exists.", item.Id));
|
throw new ArgumentException(string.Format("A child with the Id {0} already exists.", item.Id));
|
||||||
}
|
}
|
||||||
|
@ -243,7 +243,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The actual children.</value>
|
/// <value>The actual children.</value>
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
protected virtual IEnumerable<BaseItem> ActualChildren
|
public virtual IEnumerable<BaseItem> Children
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
@ -251,16 +251,6 @@ namespace MediaBrowser.Controller.Entities
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// thread-safe access to the actual children of this folder - without regard to user
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The children.</value>
|
|
||||||
[IgnoreDataMember]
|
|
||||||
public IEnumerable<BaseItem> Children
|
|
||||||
{
|
|
||||||
get { return ActualChildren.ToList(); }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// thread-safe access to all recursive children of this folder - without regard to user
|
/// thread-safe access to all recursive children of this folder - without regard to user
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -301,7 +291,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
/// Loads our children. Validation will occur externally.
|
/// Loads our children. Validation will occur externally.
|
||||||
/// We want this sychronous.
|
/// We want this sychronous.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected virtual IEnumerable<BaseItem> LoadChildren()
|
protected virtual List<BaseItem> LoadChildren()
|
||||||
{
|
{
|
||||||
//Logger.Debug("Loading children from {0} {1} {2}", GetType().Name, Id, Path);
|
//Logger.Debug("Loading children from {0} {1} {2}", GetType().Name, Id, Path);
|
||||||
//just load our children from the repo - the library will be validated and maintained in other processes
|
//just load our children from the repo - the library will be validated and maintained in other processes
|
||||||
|
@ -330,7 +320,9 @@ namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
var dictionary = new Dictionary<Guid, BaseItem>();
|
var dictionary = new Dictionary<Guid, BaseItem>();
|
||||||
|
|
||||||
foreach (var child in ActualChildren)
|
var childrenList = Children.ToList();
|
||||||
|
|
||||||
|
foreach (var child in childrenList)
|
||||||
{
|
{
|
||||||
var id = child.Id;
|
var id = child.Id;
|
||||||
if (dictionary.ContainsKey(id))
|
if (dictionary.ContainsKey(id))
|
||||||
|
@ -466,7 +458,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
|
|
||||||
if (recursive)
|
if (recursive)
|
||||||
{
|
{
|
||||||
await ValidateSubFolders(ActualChildren.OfType<Folder>().ToList(), directoryService, progress, cancellationToken).ConfigureAwait(false);
|
await ValidateSubFolders(Children.ToList().OfType<Folder>().ToList(), directoryService, progress, cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
progress.Report(20);
|
progress.Report(20);
|
||||||
|
@ -494,7 +486,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
|
|
||||||
private async Task RefreshMetadataRecursive(MetadataRefreshOptions refreshOptions, bool recursive, IProgress<double> progress, CancellationToken cancellationToken)
|
private async Task RefreshMetadataRecursive(MetadataRefreshOptions refreshOptions, bool recursive, IProgress<double> progress, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var children = ActualChildren.ToList();
|
var children = Children.ToList();
|
||||||
|
|
||||||
var percentages = new Dictionary<Guid, double>(children.Count);
|
var percentages = new Dictionary<Guid, double>(children.Count);
|
||||||
var numComplete = 0;
|
var numComplete = 0;
|
||||||
|
@ -668,7 +660,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
/// Get our children from the repo - stubbed for now
|
/// Get our children from the repo - stubbed for now
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>IEnumerable{BaseItem}.</returns>
|
/// <returns>IEnumerable{BaseItem}.</returns>
|
||||||
protected IEnumerable<BaseItem> GetCachedChildren()
|
protected List<BaseItem> GetCachedChildren()
|
||||||
{
|
{
|
||||||
return ItemRepository.GetItemList(new InternalItemsQuery
|
return ItemRepository.GetItemList(new InternalItemsQuery
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
/// <value>The date last saved.</value>
|
/// <value>The date last saved.</value>
|
||||||
DateTime DateLastSaved { get; set; }
|
DateTime DateLastSaved { get; set; }
|
||||||
|
|
||||||
SourceType SourceType { get; set; }
|
SourceType SourceType { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the date last refreshed.
|
/// Gets or sets the date last refreshed.
|
||||||
|
|
|
@ -148,8 +148,6 @@ namespace MediaBrowser.Controller.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
public string[] PresetViews { get; set; }
|
public string[] PresetViews { get; set; }
|
||||||
public SourceType[] SourceTypes { get; set; }
|
|
||||||
public SourceType[] ExcludeSourceTypes { get; set; }
|
|
||||||
public TrailerType[] TrailerTypes { get; set; }
|
public TrailerType[] TrailerTypes { get; set; }
|
||||||
|
|
||||||
public DayOfWeek[] AirDays { get; set; }
|
public DayOfWeek[] AirDays { get; set; }
|
||||||
|
@ -215,8 +213,6 @@ namespace MediaBrowser.Controller.Entities
|
||||||
ExcludeTags = new string[] { };
|
ExcludeTags = new string[] { };
|
||||||
ExcludeInheritedTags = new string[] { };
|
ExcludeInheritedTags = new string[] { };
|
||||||
PresetViews = new string[] { };
|
PresetViews = new string[] { };
|
||||||
SourceTypes = new SourceType[] { };
|
|
||||||
ExcludeSourceTypes = new SourceType[] { };
|
|
||||||
TrailerTypes = new TrailerType[] { };
|
TrailerTypes = new TrailerType[] { };
|
||||||
AirDays = new DayOfWeek[] { };
|
AirDays = new DayOfWeek[] { };
|
||||||
SeriesStatuses = new SeriesStatus[] { };
|
SeriesStatuses = new SeriesStatus[] { };
|
||||||
|
|
|
@ -11,13 +11,11 @@ namespace MediaBrowser.Controller.Entities
|
||||||
public int? MaxListOrder { get; set; }
|
public int? MaxListOrder { get; set; }
|
||||||
public Guid AppearsInItemId { get; set; }
|
public Guid AppearsInItemId { get; set; }
|
||||||
public string NameContains { get; set; }
|
public string NameContains { get; set; }
|
||||||
public SourceType[] SourceTypes { get; set; }
|
|
||||||
|
|
||||||
public InternalPeopleQuery()
|
public InternalPeopleQuery()
|
||||||
{
|
{
|
||||||
PersonTypes = new List<string>();
|
PersonTypes = new List<string>();
|
||||||
ExcludePersonTypes = new List<string>();
|
ExcludePersonTypes = new List<string>();
|
||||||
SourceTypes = new SourceType[] { };
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||||
return new List<BaseItem>();
|
return new List<BaseItem>();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IEnumerable<BaseItem> LoadChildren()
|
protected override List<BaseItem> LoadChildren()
|
||||||
{
|
{
|
||||||
if (IsLegacyBoxSet)
|
if (IsLegacyBoxSet)
|
||||||
{
|
{
|
||||||
|
|
|
@ -237,7 +237,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||||
/// Creates the name of the sort.
|
/// Creates the name of the sort.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>System.String.</returns>
|
/// <returns>System.String.</returns>
|
||||||
protected override string CreateSortNameInternal()
|
protected override string CreateSortName()
|
||||||
{
|
{
|
||||||
return (ParentIndexNumber != null ? ParentIndexNumber.Value.ToString("000 - ") : "")
|
return (ParentIndexNumber != null ? ParentIndexNumber.Value.ToString("000 - ") : "")
|
||||||
+ (IndexNumber != null ? IndexNumber.Value.ToString("0000 - ") : "") + Name;
|
+ (IndexNumber != null ? IndexNumber.Value.ToString("0000 - ") : "") + Name;
|
||||||
|
|
|
@ -145,7 +145,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||||
/// Creates the name of the sort.
|
/// Creates the name of the sort.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>System.String.</returns>
|
/// <returns>System.String.</returns>
|
||||||
protected override string CreateSortNameInternal()
|
protected override string CreateSortName()
|
||||||
{
|
{
|
||||||
return IndexNumber != null ? IndexNumber.Value.ToString("0000") : Name;
|
return IndexNumber != null ? IndexNumber.Value.ToString("0000") : Name;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
private List<Guid> _childrenIds = null;
|
private List<Guid> _childrenIds = null;
|
||||||
private readonly object _childIdsLock = new object();
|
private readonly object _childIdsLock = new object();
|
||||||
protected override IEnumerable<BaseItem> LoadChildren()
|
protected override List<BaseItem> LoadChildren()
|
||||||
{
|
{
|
||||||
lock (_childIdsLock)
|
lock (_childIdsLock)
|
||||||
{
|
{
|
||||||
|
|
|
@ -527,6 +527,8 @@ namespace MediaBrowser.Controller.Library
|
||||||
/// <returns>QueryResult<BaseItem>.</returns>
|
/// <returns>QueryResult<BaseItem>.</returns>
|
||||||
IEnumerable<BaseItem> GetItemList(InternalItemsQuery query);
|
IEnumerable<BaseItem> GetItemList(InternalItemsQuery query);
|
||||||
|
|
||||||
|
IEnumerable<BaseItem> GetItemList(InternalItemsQuery query, bool allowExternalContent);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the items.
|
/// Gets the items.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -43,7 +43,6 @@ namespace MediaBrowser.Controller.LiveTv
|
||||||
public override SourceType SourceType
|
public override SourceType SourceType
|
||||||
{
|
{
|
||||||
get { return SourceType.LiveTV; }
|
get { return SourceType.LiveTV; }
|
||||||
set { }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
|
|
|
@ -55,7 +55,6 @@ namespace MediaBrowser.Controller.LiveTv
|
||||||
public override SourceType SourceType
|
public override SourceType SourceType
|
||||||
{
|
{
|
||||||
get { return SourceType.LiveTV; }
|
get { return SourceType.LiveTV; }
|
||||||
set { }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
|
@ -89,7 +88,7 @@ namespace MediaBrowser.Controller.LiveTv
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override string CreateSortNameInternal()
|
protected override string CreateSortName()
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(Number))
|
if (!string.IsNullOrEmpty(Number))
|
||||||
{
|
{
|
||||||
|
|
|
@ -65,7 +65,6 @@ namespace MediaBrowser.Controller.LiveTv
|
||||||
public override SourceType SourceType
|
public override SourceType SourceType
|
||||||
{
|
{
|
||||||
get { return SourceType.LiveTV; }
|
get { return SourceType.LiveTV; }
|
||||||
set { }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -42,7 +42,6 @@ namespace MediaBrowser.Controller.LiveTv
|
||||||
public override SourceType SourceType
|
public override SourceType SourceType
|
||||||
{
|
{
|
||||||
get { return SourceType.LiveTV; }
|
get { return SourceType.LiveTV; }
|
||||||
set { }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
|
|
|
@ -30,7 +30,6 @@ namespace MediaBrowser.Controller.LiveTv
|
||||||
public override SourceType SourceType
|
public override SourceType SourceType
|
||||||
{
|
{
|
||||||
get { return SourceType.LiveTV; }
|
get { return SourceType.LiveTV; }
|
||||||
set { }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1604,7 +1604,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only do this for video files due to sometimes unpredictable codec names coming from BDInfo
|
// Only do this for video files due to sometimes unpredictable codec names coming from BDInfo
|
||||||
if (state.RunTimeTicks.HasValue && state.VideoType == VideoType.VideoFile && string.IsNullOrWhiteSpace(encodingOptions.HardwareAccelerationType))
|
if (state.VideoType == VideoType.VideoFile && string.IsNullOrWhiteSpace(encodingOptions.HardwareAccelerationType))
|
||||||
{
|
{
|
||||||
foreach (var stream in state.MediaSource.MediaStreams)
|
foreach (var stream in state.MediaSource.MediaStreams)
|
||||||
{
|
{
|
||||||
|
|
|
@ -74,7 +74,7 @@ namespace MediaBrowser.Controller.Playlists
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IEnumerable<BaseItem> LoadChildren()
|
protected override List<BaseItem> LoadChildren()
|
||||||
{
|
{
|
||||||
// Save a trip to the database
|
// Save a trip to the database
|
||||||
return new List<BaseItem>();
|
return new List<BaseItem>();
|
||||||
|
|
|
@ -598,20 +598,6 @@ namespace MediaBrowser.LocalMetadata.Parsers
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case "VoteCount":
|
|
||||||
{
|
|
||||||
var val = reader.ReadElementContentAsString();
|
|
||||||
if (!string.IsNullOrWhiteSpace(val))
|
|
||||||
{
|
|
||||||
int num;
|
|
||||||
|
|
||||||
if (int.TryParse(val, NumberStyles.Integer, _usCulture, out num))
|
|
||||||
{
|
|
||||||
item.VoteCount = num;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "CollectionNumber":
|
case "CollectionNumber":
|
||||||
var tmdbCollection = reader.ReadElementContentAsString();
|
var tmdbCollection = reader.ReadElementContentAsString();
|
||||||
if (!string.IsNullOrWhiteSpace(tmdbCollection))
|
if (!string.IsNullOrWhiteSpace(tmdbCollection))
|
||||||
|
|
|
@ -109,7 +109,6 @@ namespace MediaBrowser.LocalMetadata.Savers
|
||||||
"TvDbId",
|
"TvDbId",
|
||||||
"Type",
|
"Type",
|
||||||
"TVRageId",
|
"TVRageId",
|
||||||
"VoteCount",
|
|
||||||
"Website",
|
"Website",
|
||||||
"Zap2ItId",
|
"Zap2ItId",
|
||||||
"CollectionItems",
|
"CollectionItems",
|
||||||
|
@ -407,10 +406,6 @@ namespace MediaBrowser.LocalMetadata.Savers
|
||||||
{
|
{
|
||||||
writer.WriteElementString("Rating", item.CommunityRating.Value.ToString(UsCulture));
|
writer.WriteElementString("Rating", item.CommunityRating.Value.ToString(UsCulture));
|
||||||
}
|
}
|
||||||
if (item.VoteCount.HasValue)
|
|
||||||
{
|
|
||||||
writer.WriteElementString("VoteCount", item.VoteCount.Value.ToString(UsCulture));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item.ProductionYear.HasValue && !(item is Person))
|
if (item.ProductionYear.HasValue && !(item is Person))
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,8 +17,6 @@ namespace MediaBrowser.Model.Configuration
|
||||||
/// <value><c>true</c> if [enable u pn p]; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if [enable u pn p]; otherwise, <c>false</c>.</value>
|
||||||
public bool EnableUPnP { get; set; }
|
public bool EnableUPnP { get; set; }
|
||||||
|
|
||||||
public bool EnableSimpleSortNameHandling { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the public mapped port.
|
/// Gets or sets the public mapped port.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -221,12 +221,6 @@ namespace MediaBrowser.Model.Dto
|
||||||
/// <value>The community rating.</value>
|
/// <value>The community rating.</value>
|
||||||
public float? CommunityRating { get; set; }
|
public float? CommunityRating { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the vote count.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The vote count.</value>
|
|
||||||
public int? VoteCount { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the cumulative run time ticks.
|
/// Gets or sets the cumulative run time ticks.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -30,6 +30,7 @@ namespace MediaBrowser.Model.MediaInfo
|
||||||
public bool ForceDirectPlayRemoteMediaSource { get; set; }
|
public bool ForceDirectPlayRemoteMediaSource { get; set; }
|
||||||
public bool AllowVideoStreamCopy { get; set; }
|
public bool AllowVideoStreamCopy { get; set; }
|
||||||
public bool AllowAudioStreamCopy { get; set; }
|
public bool AllowAudioStreamCopy { get; set; }
|
||||||
|
public bool AutoOpenLiveStream { get; set; }
|
||||||
|
|
||||||
public PlaybackInfoRequest()
|
public PlaybackInfoRequest()
|
||||||
{
|
{
|
||||||
|
|
|
@ -206,11 +206,6 @@
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Tags,
|
Tags,
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The vote count
|
|
||||||
/// </summary>
|
|
||||||
VoteCount,
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The trailer url of the item
|
/// The trailer url of the item
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -180,11 +180,6 @@ namespace MediaBrowser.Providers.Manager
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (replaceData || !target.VoteCount.HasValue)
|
|
||||||
{
|
|
||||||
target.VoteCount = source.VoteCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var id in source.ProviderIds)
|
foreach (var id in source.ProviderIds)
|
||||||
{
|
{
|
||||||
var key = id.Key;
|
var key = id.Key;
|
||||||
|
@ -200,6 +195,32 @@ namespace MediaBrowser.Providers.Manager
|
||||||
MergeCriticRating(source, target, lockedFields, replaceData);
|
MergeCriticRating(source, target, lockedFields, replaceData);
|
||||||
MergeTrailers(source, target, lockedFields, replaceData);
|
MergeTrailers(source, target, lockedFields, replaceData);
|
||||||
MergeVideoInfo(source, target, lockedFields, replaceData);
|
MergeVideoInfo(source, target, lockedFields, replaceData);
|
||||||
|
MergeDisplayOrder(source, target, lockedFields, replaceData);
|
||||||
|
|
||||||
|
//if (!lockedFields.Contains(MetadataFields.SortName))
|
||||||
|
{
|
||||||
|
if (replaceData || string.IsNullOrEmpty(target.ForcedSortName))
|
||||||
|
{
|
||||||
|
var forcedSortName = source.ForcedSortName;
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(forcedSortName))
|
||||||
|
{
|
||||||
|
target.ForcedSortName = forcedSortName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//if (!lockedFields.Contains(MetadataFields.DisplayMediaType))
|
||||||
|
{
|
||||||
|
if (replaceData || string.IsNullOrEmpty(target.DisplayMediaType))
|
||||||
|
{
|
||||||
|
// Safeguard against incoming data having an emtpy name
|
||||||
|
if (!string.IsNullOrWhiteSpace(source.DisplayMediaType))
|
||||||
|
{
|
||||||
|
target.DisplayMediaType = source.DisplayMediaType;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (mergeMetadataSettings)
|
if (mergeMetadataSettings)
|
||||||
{
|
{
|
||||||
|
@ -235,10 +256,8 @@ namespace MediaBrowser.Providers.Manager
|
||||||
public static void MergeMetadataSettings(BaseItem source,
|
public static void MergeMetadataSettings(BaseItem source,
|
||||||
BaseItem target)
|
BaseItem target)
|
||||||
{
|
{
|
||||||
target.ForcedSortName = source.ForcedSortName;
|
|
||||||
target.LockedFields = source.LockedFields;
|
target.LockedFields = source.LockedFields;
|
||||||
target.IsLocked = source.IsLocked;
|
target.IsLocked = source.IsLocked;
|
||||||
target.DisplayMediaType = source.DisplayMediaType;
|
|
||||||
|
|
||||||
// Grab the value if it's there, but if not then don't overwrite the default
|
// Grab the value if it's there, but if not then don't overwrite the default
|
||||||
if (source.DateCreated != default(DateTime))
|
if (source.DateCreated != default(DateTime))
|
||||||
|
@ -248,7 +267,10 @@ namespace MediaBrowser.Providers.Manager
|
||||||
|
|
||||||
target.PreferredMetadataCountryCode = source.PreferredMetadataCountryCode;
|
target.PreferredMetadataCountryCode = source.PreferredMetadataCountryCode;
|
||||||
target.PreferredMetadataLanguage = source.PreferredMetadataLanguage;
|
target.PreferredMetadataLanguage = source.PreferredMetadataLanguage;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void MergeDisplayOrder(BaseItem source, BaseItem target, List<MetadataFields> lockedFields, bool replaceData)
|
||||||
|
{
|
||||||
var sourceHasDisplayOrder = source as IHasDisplayOrder;
|
var sourceHasDisplayOrder = source as IHasDisplayOrder;
|
||||||
var targetHasDisplayOrder = target as IHasDisplayOrder;
|
var targetHasDisplayOrder = target as IHasDisplayOrder;
|
||||||
|
|
||||||
|
|
|
@ -173,7 +173,7 @@ namespace MediaBrowser.Providers.Movies
|
||||||
movie.CommunityRating = rating;
|
movie.CommunityRating = rating;
|
||||||
}
|
}
|
||||||
|
|
||||||
movie.VoteCount = movieData.vote_count;
|
//movie.VoteCount = movieData.vote_count;
|
||||||
|
|
||||||
//release date and certification are retrieved based on configured country and we fall back on US if not there and to minimun release date if still no match
|
//release date and certification are retrieved based on configured country and we fall back on US if not there and to minimun release date if still no match
|
||||||
if (movieData.releases != null && movieData.releases.countries != null)
|
if (movieData.releases != null && movieData.releases.countries != null)
|
||||||
|
|
|
@ -78,7 +78,7 @@ namespace MediaBrowser.Providers.Omdb
|
||||||
&& int.TryParse(result.imdbVotes, NumberStyles.Number, _usCulture, out voteCount)
|
&& int.TryParse(result.imdbVotes, NumberStyles.Number, _usCulture, out voteCount)
|
||||||
&& voteCount >= 0)
|
&& voteCount >= 0)
|
||||||
{
|
{
|
||||||
item.VoteCount = voteCount;
|
//item.VoteCount = voteCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
float imdbRating;
|
float imdbRating;
|
||||||
|
@ -185,7 +185,7 @@ namespace MediaBrowser.Providers.Omdb
|
||||||
&& int.TryParse(result.imdbVotes, NumberStyles.Number, _usCulture, out voteCount)
|
&& int.TryParse(result.imdbVotes, NumberStyles.Number, _usCulture, out voteCount)
|
||||||
&& voteCount >= 0)
|
&& voteCount >= 0)
|
||||||
{
|
{
|
||||||
item.VoteCount = voteCount;
|
//item.VoteCount = voteCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
float imdbRating;
|
float imdbRating;
|
||||||
|
|
|
@ -122,7 +122,7 @@ namespace MediaBrowser.Providers.TV
|
||||||
item.Overview = response.overview;
|
item.Overview = response.overview;
|
||||||
|
|
||||||
item.CommunityRating = (float)response.vote_average;
|
item.CommunityRating = (float)response.vote_average;
|
||||||
item.VoteCount = response.vote_count;
|
//item.VoteCount = response.vote_count;
|
||||||
|
|
||||||
if (response.videos != null && response.videos.results != null)
|
if (response.videos != null && response.videos.results != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -217,7 +217,7 @@ namespace MediaBrowser.Providers.TV
|
||||||
series.Name = seriesInfo.name;
|
series.Name = seriesInfo.name;
|
||||||
series.SetProviderId(MetadataProviders.Tmdb, seriesInfo.id.ToString(_usCulture));
|
series.SetProviderId(MetadataProviders.Tmdb, seriesInfo.id.ToString(_usCulture));
|
||||||
|
|
||||||
series.VoteCount = seriesInfo.vote_count;
|
//series.VoteCount = seriesInfo.vote_count;
|
||||||
|
|
||||||
string voteAvg = seriesInfo.vote_average.ToString(CultureInfo.InvariantCulture);
|
string voteAvg = seriesInfo.vote_average.ToString(CultureInfo.InvariantCulture);
|
||||||
float rating;
|
float rating;
|
||||||
|
|
|
@ -680,7 +680,7 @@ namespace MediaBrowser.Providers.TV
|
||||||
// int.TryParse is local aware, so it can be probamatic, force us culture
|
// int.TryParse is local aware, so it can be probamatic, force us culture
|
||||||
if (int.TryParse(val, NumberStyles.Integer, _usCulture, out rval))
|
if (int.TryParse(val, NumberStyles.Integer, _usCulture, out rval))
|
||||||
{
|
{
|
||||||
item.VoteCount = rval;
|
//item.VoteCount = rval;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1150,7 +1150,7 @@ namespace MediaBrowser.Providers.TV
|
||||||
// int.TryParse is local aware, so it can be probamatic, force us culture
|
// int.TryParse is local aware, so it can be probamatic, force us culture
|
||||||
if (int.TryParse(val, NumberStyles.Integer, _usCulture, out rval))
|
if (int.TryParse(val, NumberStyles.Integer, _usCulture, out rval))
|
||||||
{
|
{
|
||||||
item.VoteCount = rval;
|
//item.VoteCount = rval;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
<HintPath>..\packages\Mono.Posix.4.0.0.0\lib\net40\Mono.Posix.dll</HintPath>
|
<HintPath>..\packages\Mono.Posix.4.0.0.0\lib\net40\Mono.Posix.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.4.9\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.4.10\lib\net45\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="ServiceStack.Text, Version=4.5.8.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="ServiceStack.Text, Version=4.5.8.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\ServiceStack.Text.4.5.8\lib\net45\ServiceStack.Text.dll</HintPath>
|
<HintPath>..\packages\ServiceStack.Text.4.5.8\lib\net45\ServiceStack.Text.dll</HintPath>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Mono.Posix" version="4.0.0.0" targetFramework="net45" />
|
<package id="Mono.Posix" version="4.0.0.0" targetFramework="net45" />
|
||||||
<package id="NLog" version="4.4.9" targetFramework="net46" />
|
<package id="NLog" version="4.4.10" targetFramework="net46" />
|
||||||
<package id="ServiceStack.Text" version="4.5.8" targetFramework="net46" />
|
<package id="ServiceStack.Text" version="4.5.8" targetFramework="net46" />
|
||||||
<package id="SharpCompress" version="0.14.0" targetFramework="net46" />
|
<package id="SharpCompress" version="0.14.0" targetFramework="net46" />
|
||||||
<package id="SimpleInjector" version="4.0.7" targetFramework="net46" />
|
<package id="SimpleInjector" version="4.0.7" targetFramework="net46" />
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
<HintPath>..\packages\ImageMagickSharp.1.0.0.18\lib\net45\ImageMagickSharp.dll</HintPath>
|
<HintPath>..\packages\ImageMagickSharp.1.0.0.18\lib\net45\ImageMagickSharp.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.4.9\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.4.10\lib\net45\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="ServiceStack.Text, Version=4.5.8.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="ServiceStack.Text, Version=4.5.8.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\ServiceStack.Text.4.5.8\lib\net45\ServiceStack.Text.dll</HintPath>
|
<HintPath>..\packages\ServiceStack.Text.4.5.8\lib\net45\ServiceStack.Text.dll</HintPath>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="ImageMagickSharp" version="1.0.0.18" targetFramework="net45" />
|
<package id="ImageMagickSharp" version="1.0.0.18" targetFramework="net45" />
|
||||||
<package id="NLog" version="4.4.9" targetFramework="net462" />
|
<package id="NLog" version="4.4.10" targetFramework="net462" />
|
||||||
<package id="ServiceStack.Text" version="4.5.8" targetFramework="net462" />
|
<package id="ServiceStack.Text" version="4.5.8" targetFramework="net462" />
|
||||||
<package id="SharpCompress" version="0.14.0" targetFramework="net462" />
|
<package id="SharpCompress" version="0.14.0" targetFramework="net462" />
|
||||||
<package id="SimpleInjector" version="4.0.7" targetFramework="net462" />
|
<package id="SimpleInjector" version="4.0.7" targetFramework="net462" />
|
||||||
|
|
|
@ -704,21 +704,6 @@ namespace MediaBrowser.XbmcMetadata.Parsers
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case "votes":
|
|
||||||
{
|
|
||||||
var val = reader.ReadElementContentAsString();
|
|
||||||
if (!string.IsNullOrWhiteSpace(val))
|
|
||||||
{
|
|
||||||
int num;
|
|
||||||
|
|
||||||
if (int.TryParse(val, NumberStyles.Integer, _usCulture, out num))
|
|
||||||
{
|
|
||||||
item.VoteCount = num;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case "genre":
|
case "genre":
|
||||||
{
|
{
|
||||||
var val = reader.ReadElementContentAsString();
|
var val = reader.ReadElementContentAsString();
|
||||||
|
|
|
@ -63,7 +63,6 @@ namespace MediaBrowser.XbmcMetadata.Savers
|
||||||
"releasedate",
|
"releasedate",
|
||||||
"outline",
|
"outline",
|
||||||
"id",
|
"id",
|
||||||
"votes",
|
|
||||||
"credits",
|
"credits",
|
||||||
"originaltitle",
|
"originaltitle",
|
||||||
"watched",
|
"watched",
|
||||||
|
@ -659,11 +658,6 @@ namespace MediaBrowser.XbmcMetadata.Savers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.VoteCount.HasValue)
|
|
||||||
{
|
|
||||||
writer.WriteElementString("votes", item.VoteCount.Value.ToString(UsCulture));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Use original runtime here, actual file runtime later in MediaInfo
|
// Use original runtime here, actual file runtime later in MediaInfo
|
||||||
var runTimeTicks = item.RunTimeTicks;
|
var runTimeTicks = item.RunTimeTicks;
|
||||||
|
|
||||||
|
|
|
@ -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.701</version>
|
<version>3.0.702</version>
|
||||||
<title>Emby.Common</title>
|
<title>Emby.Common</title>
|
||||||
<authors>Emby Team</authors>
|
<authors>Emby Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
|
|
@ -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.701</version>
|
<version>3.0.702</version>
|
||||||
<title>Emby.Server.Core</title>
|
<title>Emby.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.701" />
|
<dependency id="MediaBrowser.Common" version="3.0.702" />
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
[assembly: AssemblyVersion("3.2.18.3")]
|
[assembly: AssemblyVersion("3.2.19.2")]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user