mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-20 09:04:42 +01:00
fix DateModified not refreshing
This commit is contained in:
@@ -46,6 +46,12 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override bool EnableForceSaveOnDateModifiedChange
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public Audio()
|
||||
{
|
||||
Artists = new List<string>();
|
||||
|
||||
@@ -455,7 +455,10 @@ namespace MediaBrowser.Controller.Entities
|
||||
public DateTime DateLastRefreshed { get; set; }
|
||||
|
||||
[IgnoreDataMember]
|
||||
public DateTime? DateModifiedDuringLastRefresh { get; set; }
|
||||
public virtual bool EnableForceSaveOnDateModifiedChange
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The logger
|
||||
|
||||
@@ -34,6 +34,12 @@ namespace MediaBrowser.Controller.Entities
|
||||
return SeriesName;
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override bool EnableForceSaveOnDateModifiedChange
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public Guid? FindSeriesId()
|
||||
{
|
||||
return SeriesId;
|
||||
|
||||
@@ -373,13 +373,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
if (currentChildren.TryGetValue(child.Id, out currentChild) && IsValidFromResolver(currentChild, child))
|
||||
{
|
||||
var currentChildLocationType = currentChild.LocationType;
|
||||
if (currentChildLocationType != LocationType.Remote &&
|
||||
currentChildLocationType != LocationType.Virtual)
|
||||
{
|
||||
currentChild.DateModified = child.DateModified;
|
||||
}
|
||||
|
||||
await UpdateIsOffline(currentChild, false).ConfigureAwait(false);
|
||||
validChildren.Add(currentChild);
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ using MediaBrowser.Model.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
@@ -32,6 +33,12 @@ namespace MediaBrowser.Controller.Entities
|
||||
locationType != LocationType.Virtual;
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override bool EnableForceSaveOnDateModifiedChange
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the remote trailers.
|
||||
/// </summary>
|
||||
@@ -42,6 +49,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// Gets the type of the media.
|
||||
/// </summary>
|
||||
/// <value>The type of the media.</value>
|
||||
[IgnoreDataMember]
|
||||
public override string MediaType
|
||||
{
|
||||
get { return Model.Entities.MediaType.Game; }
|
||||
|
||||
@@ -207,8 +207,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <param name="image">The image.</param>
|
||||
/// <param name="index">The index.</param>
|
||||
void SetImage(ItemImageInfo image, int index);
|
||||
|
||||
DateTime? DateModifiedDuringLastRefresh { get; set; }
|
||||
}
|
||||
|
||||
public static class HasImagesExtensions
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// Gets the date modified.
|
||||
/// </summary>
|
||||
/// <value>The date modified.</value>
|
||||
DateTime DateModified { get; }
|
||||
DateTime DateModified { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the date last saved.
|
||||
@@ -51,5 +51,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
bool SupportsPeople { get; }
|
||||
|
||||
bool RequiresRefresh();
|
||||
|
||||
bool EnableForceSaveOnDateModifiedChange { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,6 +51,12 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override bool EnableForceSaveOnDateModifiedChange
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public override bool CanDownload()
|
||||
{
|
||||
return true;
|
||||
|
||||
@@ -58,6 +58,12 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override bool EnableForceSaveOnDateModifiedChange
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public int? TotalBitrate { get; set; }
|
||||
public ExtraType? ExtraType { get; set; }
|
||||
|
||||
|
||||
@@ -102,6 +102,12 @@ namespace MediaBrowser.Controller.Providers
|
||||
{
|
||||
var directory = Path.GetDirectoryName(path);
|
||||
|
||||
if (string.IsNullOrWhiteSpace(directory))
|
||||
{
|
||||
_logger.Debug("Parent path is null for {0}", path);
|
||||
return null;
|
||||
}
|
||||
|
||||
var dict = GetFileSystemDictionary(directory, false);
|
||||
|
||||
FileSystemMetadata entry;
|
||||
|
||||
Reference in New Issue
Block a user