mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07:00
update photos
This commit is contained in:
parent
7f25be3e0d
commit
d4050fbf2c
@ -317,7 +317,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
|
||||
{
|
||||
info.OfficialRating = details.contentRating[0].code.Replace("TV", "TV-").Replace("--", "-");
|
||||
|
||||
var invalid = new[] { "N/A", "Approved", "Not Rated" };
|
||||
var invalid = new[] { "N/A", "Approved", "Not Rated", "Passed" };
|
||||
if (invalid.Contains(info.OfficialRating, StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
info.OfficialRating = null;
|
||||
|
@ -2,6 +2,7 @@
|
||||
using MediaBrowser.Common.ScheduledTasks;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.LiveTv;
|
||||
using MediaBrowser.Controller.Persistence;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -52,7 +53,10 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||
var itemIds = _libraryManager.GetItemIds(new InternalItemsQuery
|
||||
{
|
||||
IsCurrentSchema = false,
|
||||
Limit = 50000
|
||||
Limit = 100000,
|
||||
|
||||
// These are constantly getting regenerated so don't bother with them here
|
||||
ExcludeItemTypes = new[] { typeof(LiveTvProgram).Name }
|
||||
});
|
||||
|
||||
var numComplete = 0;
|
||||
@ -62,6 +66,8 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||
|
||||
foreach (var itemId in itemIds)
|
||||
{
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
var item = _libraryManager.GetItemById(itemId);
|
||||
|
||||
if (item != null)
|
||||
|
@ -72,7 +72,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||
private IDbCommand _deletePeopleCommand;
|
||||
private IDbCommand _savePersonCommand;
|
||||
|
||||
private const int LatestSchemaVersion = 2;
|
||||
private const int LatestSchemaVersion = 4;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SqliteItemRepository"/> class.
|
||||
@ -163,6 +163,15 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||
_connection.AddColumn(_logger, "TypedBaseItems", "Genres", "Text");
|
||||
_connection.AddColumn(_logger, "TypedBaseItems", "ParentalRatingValue", "INT");
|
||||
_connection.AddColumn(_logger, "TypedBaseItems", "SchemaVersion", "INT");
|
||||
_connection.AddColumn(_logger, "TypedBaseItems", "SortName", "Text");
|
||||
_connection.AddColumn(_logger, "TypedBaseItems", "RunTimeTicks", "BIGINT");
|
||||
|
||||
_connection.AddColumn(_logger, "TypedBaseItems", "OfficialRatingDescription", "Text");
|
||||
_connection.AddColumn(_logger, "TypedBaseItems", "HomePageUrl", "Text");
|
||||
_connection.AddColumn(_logger, "TypedBaseItems", "VoteCount", "INT");
|
||||
_connection.AddColumn(_logger, "TypedBaseItems", "DisplayMediaType", "Text");
|
||||
_connection.AddColumn(_logger, "TypedBaseItems", "DateCreated", "DATETIME");
|
||||
_connection.AddColumn(_logger, "TypedBaseItems", "DateModified", "DATETIME");
|
||||
|
||||
PrepareStatements();
|
||||
|
||||
@ -206,14 +215,30 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||
"ParentId",
|
||||
"Genres",
|
||||
"ParentalRatingValue",
|
||||
"SchemaVersion"
|
||||
"SchemaVersion",
|
||||
"SortName",
|
||||
"RunTimeTicks",
|
||||
"OfficialRatingDescription",
|
||||
"HomePageUrl",
|
||||
"VoteCount",
|
||||
"DisplayMediaType",
|
||||
"DateCreated",
|
||||
"DateModified"
|
||||
};
|
||||
_saveItemCommand = _connection.CreateCommand();
|
||||
_saveItemCommand.CommandText = "replace into TypedBaseItems (" + string.Join(",", saveColumns.ToArray()) + ") values (@1, @2, @3, @4, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @16, @17, @18, @19, @20, @21, @22, @23, @24, @25)";
|
||||
_saveItemCommand.CommandText = "replace into TypedBaseItems (" + string.Join(",", saveColumns.ToArray()) + ") values (";
|
||||
|
||||
for (var i = 1; i <= saveColumns.Count; i++)
|
||||
{
|
||||
if (i > 1)
|
||||
{
|
||||
_saveItemCommand.CommandText += ",";
|
||||
}
|
||||
_saveItemCommand.CommandText += "@" + i.ToString(CultureInfo.InvariantCulture);
|
||||
|
||||
_saveItemCommand.Parameters.Add(_saveItemCommand, "@" + i.ToString(CultureInfo.InvariantCulture));
|
||||
}
|
||||
_saveItemCommand.CommandText += ")";
|
||||
|
||||
_deleteChildrenCommand = _connection.CreateCommand();
|
||||
_deleteChildrenCommand.CommandText = "delete from ChildrenIds where ParentId=@ParentId";
|
||||
@ -356,7 +381,16 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||
_saveItemCommand.GetParameter(index++).Value = item.GetParentalRatingValue();
|
||||
|
||||
_saveItemCommand.GetParameter(index++).Value = LatestSchemaVersion;
|
||||
|
||||
_saveItemCommand.GetParameter(index++).Value = item.SortName;
|
||||
_saveItemCommand.GetParameter(index++).Value = item.RunTimeTicks;
|
||||
|
||||
_saveItemCommand.GetParameter(index++).Value = item.OfficialRatingDescription;
|
||||
_saveItemCommand.GetParameter(index++).Value = item.HomePageUrl;
|
||||
_saveItemCommand.GetParameter(index++).Value = item.VoteCount;
|
||||
_saveItemCommand.GetParameter(index++).Value = item.DisplayMediaType;
|
||||
_saveItemCommand.GetParameter(index++).Value = item.DateCreated;
|
||||
_saveItemCommand.GetParameter(index++).Value = item.DateModified;
|
||||
|
||||
_saveItemCommand.Transaction = transaction;
|
||||
|
||||
_saveItemCommand.ExecuteNonQuery();
|
||||
@ -729,7 +763,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||
cmd.CommandText += "; select count (guid) from TypedBaseItems" + whereTextWithoutPaging;
|
||||
|
||||
_logger.Debug(cmd.CommandText);
|
||||
|
||||
|
||||
var list = new List<BaseItem>();
|
||||
var count = 0;
|
||||
|
||||
@ -772,11 +806,6 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||
|
||||
private string MapOrderByField(string name)
|
||||
{
|
||||
if (string.Equals(name, "sortname", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return "name";
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System.Reflection;
|
||||
|
||||
//[assembly: AssemblyVersion("3.0.*")]
|
||||
[assembly: AssemblyVersion("3.0.5713.3")]
|
||||
[assembly: AssemblyVersion("3.0.*")]
|
||||
//[assembly: AssemblyVersion("3.0.5713.3")]
|
||||
|
Loading…
Reference in New Issue
Block a user