reduce rescanning due to IsOffline

This commit is contained in:
Luke Pulverenti
2016-08-24 02:13:15 -04:00
parent 2e65c32ede
commit e4851e1b25
16 changed files with 51 additions and 85 deletions
+18 -4
View File
@@ -281,6 +281,20 @@ namespace MediaBrowser.Controller.Entities
}
}
public Task UpdateIsOffline(bool newValue)
{
var item = this;
if (item.IsOffline != newValue)
{
item.IsOffline = newValue;
// this is creating too many repeated db updates
//return item.UpdateToRepository(ItemUpdateType.None, CancellationToken.None);
}
return Task.FromResult(true);
}
/// <summary>
/// Gets or sets the type of the location.
/// </summary>
@@ -290,10 +304,10 @@ namespace MediaBrowser.Controller.Entities
{
get
{
if (IsOffline)
{
return LocationType.Offline;
}
//if (IsOffline)
//{
// return LocationType.Offline;
//}
if (string.IsNullOrWhiteSpace(Path))
{