commit
77b7d1486a
|
@ -426,6 +426,8 @@ namespace Emby.Server.Implementations.Channels
|
||||||
item.Name = channelInfo.Name;
|
item.Name = channelInfo.Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
item.OnMetadataChanged();
|
||||||
|
|
||||||
if (isNew)
|
if (isNew)
|
||||||
{
|
{
|
||||||
_libraryManager.CreateItem(item, cancellationToken);
|
_libraryManager.CreateItem(item, cancellationToken);
|
||||||
|
@ -1384,6 +1386,8 @@ namespace Emby.Server.Implementations.Channels
|
||||||
item.SetImagePath(ImageType.Primary, info.ImageUrl);
|
item.SetImagePath(ImageType.Primary, info.ImageUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
item.OnMetadataChanged();
|
||||||
|
|
||||||
if (isNew)
|
if (isNew)
|
||||||
{
|
{
|
||||||
_libraryManager.CreateItem(item, cancellationToken);
|
_libraryManager.CreateItem(item, cancellationToken);
|
||||||
|
|
|
@ -752,6 +752,11 @@ namespace Emby.Server.Implementations.LiveTv
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isNew || isUpdated)
|
||||||
|
{
|
||||||
|
item.OnMetadataChanged();
|
||||||
|
}
|
||||||
|
|
||||||
return new Tuple<LiveTvProgram, bool, bool>(item, isNew, isUpdated);
|
return new Tuple<LiveTvProgram, bool, bool>(item, isNew, isUpdated);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -142,6 +142,8 @@ namespace Emby.Server.Implementations.LiveTv
|
||||||
var info = await _liveTvManager.GetChannelStream(keys[1], mediaSourceId, cancellationToken).ConfigureAwait(false);
|
var info = await _liveTvManager.GetChannelStream(keys[1], mediaSourceId, cancellationToken).ConfigureAwait(false);
|
||||||
stream = info.Item1;
|
stream = info.Item1;
|
||||||
directStreamProvider = info.Item2;
|
directStreamProvider = info.Item2;
|
||||||
|
|
||||||
|
allowLiveStreamProbe = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -214,6 +214,8 @@ namespace MediaBrowser.Api
|
||||||
|
|
||||||
UpdateItem(request, item);
|
UpdateItem(request, item);
|
||||||
|
|
||||||
|
item.OnMetadataChanged();
|
||||||
|
|
||||||
await item.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
|
await item.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
|
||||||
|
|
||||||
if (isLockedChanged && item.IsFolder)
|
if (isLockedChanged && item.IsFolder)
|
||||||
|
|
|
@ -89,7 +89,6 @@ namespace MediaBrowser.Api
|
||||||
|
|
||||||
private void SetWizardFinishValues(ServerConfiguration config)
|
private void SetWizardFinishValues(ServerConfiguration config)
|
||||||
{
|
{
|
||||||
config.EnableStandaloneMusicKeys = true;
|
|
||||||
config.EnableCaseSensitiveItemIds = true;
|
config.EnableCaseSensitiveItemIds = true;
|
||||||
config.SkipDeserializationForBasicTypes = true;
|
config.SkipDeserializationForBasicTypes = true;
|
||||||
config.EnableLocalizedGuids = true;
|
config.EnableLocalizedGuids = true;
|
||||||
|
|
|
@ -154,8 +154,6 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||||
{
|
{
|
||||||
var list = base.GetUserDataKeys();
|
var list = base.GetUserDataKeys();
|
||||||
|
|
||||||
if (ConfigurationManager.Configuration.EnableStandaloneMusicKeys)
|
|
||||||
{
|
|
||||||
var songKey = IndexNumber.HasValue ? IndexNumber.Value.ToString("0000") : string.Empty;
|
var songKey = IndexNumber.HasValue ? IndexNumber.Value.ToString("0000") : string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
@ -177,22 +175,6 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||||
}
|
}
|
||||||
|
|
||||||
list.Insert(0, songKey);
|
list.Insert(0, songKey);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var parent = AlbumEntity;
|
|
||||||
|
|
||||||
if (parent != null && IndexNumber.HasValue)
|
|
||||||
{
|
|
||||||
list.InsertRange(0, parent.GetUserDataKeys().Select(i =>
|
|
||||||
{
|
|
||||||
var songKey = (ParentIndexNumber != null ? ParentIndexNumber.Value.ToString("0000 - ") : "")
|
|
||||||
+ IndexNumber.Value.ToString("0000 - ");
|
|
||||||
|
|
||||||
return i + songKey;
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
|
@ -145,14 +145,11 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||||
{
|
{
|
||||||
var list = base.GetUserDataKeys();
|
var list = base.GetUserDataKeys();
|
||||||
|
|
||||||
if (ConfigurationManager.Configuration.EnableStandaloneMusicKeys)
|
|
||||||
{
|
|
||||||
var albumArtist = AlbumArtist;
|
var albumArtist = AlbumArtist;
|
||||||
if (!string.IsNullOrWhiteSpace(albumArtist))
|
if (!string.IsNullOrWhiteSpace(albumArtist))
|
||||||
{
|
{
|
||||||
list.Insert(0, albumArtist + "-" + Name);
|
list.Insert(0, albumArtist + "-" + Name);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
var id = this.GetProviderId(MetadataProviders.MusicBrainzAlbum);
|
var id = this.GetProviderId(MetadataProviders.MusicBrainzAlbum);
|
||||||
|
|
||||||
|
|
|
@ -918,9 +918,10 @@ namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrWhiteSpace(OfficialRating))
|
var officialRating = OfficialRating;
|
||||||
|
if (!string.IsNullOrWhiteSpace(officialRating))
|
||||||
{
|
{
|
||||||
return OfficialRating;
|
return officialRating;
|
||||||
}
|
}
|
||||||
|
|
||||||
var parent = DisplayParent;
|
var parent = DisplayParent;
|
||||||
|
@ -938,9 +939,10 @@ namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrWhiteSpace(CustomRating))
|
var customRating = CustomRating;
|
||||||
|
if (!string.IsNullOrWhiteSpace(customRating))
|
||||||
{
|
{
|
||||||
return CustomRating;
|
return customRating;
|
||||||
}
|
}
|
||||||
|
|
||||||
var parent = DisplayParent;
|
var parent = DisplayParent;
|
||||||
|
@ -2480,5 +2482,21 @@ namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual ItemUpdateType OnMetadataChanged()
|
||||||
|
{
|
||||||
|
var updateType = ItemUpdateType.None;
|
||||||
|
|
||||||
|
var item = this;
|
||||||
|
|
||||||
|
var inheritedParentalRatingValue = item.GetInheritedParentalRatingValue() ?? 0;
|
||||||
|
if (inheritedParentalRatingValue != item.InheritedParentalRatingValue)
|
||||||
|
{
|
||||||
|
item.InheritedParentalRatingValue = inheritedParentalRatingValue;
|
||||||
|
updateType |= ItemUpdateType.MetadataImport;
|
||||||
|
}
|
||||||
|
|
||||||
|
return updateType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -266,6 +266,8 @@ namespace MediaBrowser.Controller.Entities
|
||||||
int? ProductionYear { get; set; }
|
int? ProductionYear { get; set; }
|
||||||
|
|
||||||
string[] Tags { get; set; }
|
string[] Tags { get; set; }
|
||||||
|
|
||||||
|
ItemUpdateType OnMetadataChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class HasMetadataExtensions
|
public static class HasMetadataExtensions
|
||||||
|
|
|
@ -179,7 +179,6 @@ namespace MediaBrowser.Model.Configuration
|
||||||
public int SchemaVersion { get; set; }
|
public int SchemaVersion { get; set; }
|
||||||
|
|
||||||
public bool EnableAnonymousUsageReporting { get; set; }
|
public bool EnableAnonymousUsageReporting { get; set; }
|
||||||
public bool EnableStandaloneMusicKeys { get; set; }
|
|
||||||
public bool EnableFolderView { get; set; }
|
public bool EnableFolderView { get; set; }
|
||||||
public bool EnableGroupingIntoCollections { get; set; }
|
public bool EnableGroupingIntoCollections { get; set; }
|
||||||
public bool DisplaySpecialsWithinSeasons { get; set; }
|
public bool DisplaySpecialsWithinSeasons { get; set; }
|
||||||
|
|
|
@ -14,9 +14,9 @@ namespace MediaBrowser.Providers.BoxSets
|
||||||
{
|
{
|
||||||
public class BoxSetMetadataService : MetadataService<BoxSet, BoxSetInfo>
|
public class BoxSetMetadataService : MetadataService<BoxSet, BoxSetInfo>
|
||||||
{
|
{
|
||||||
protected override ItemUpdateType BeforeSave(BoxSet item, bool isFullRefresh, ItemUpdateType currentUpdateType)
|
protected override ItemUpdateType BeforeSaveInternal(BoxSet item, bool isFullRefresh, ItemUpdateType currentUpdateType)
|
||||||
{
|
{
|
||||||
var updateType = base.BeforeSave(item, isFullRefresh, currentUpdateType);
|
var updateType = base.BeforeSaveInternal(item, isFullRefresh, currentUpdateType);
|
||||||
|
|
||||||
if (isFullRefresh || currentUpdateType > ItemUpdateType.None)
|
if (isFullRefresh || currentUpdateType > ItemUpdateType.None)
|
||||||
{
|
{
|
||||||
|
|
|
@ -281,7 +281,16 @@ namespace MediaBrowser.Providers.Manager
|
||||||
/// <param name="isFullRefresh">if set to <c>true</c> [is full refresh].</param>
|
/// <param name="isFullRefresh">if set to <c>true</c> [is full refresh].</param>
|
||||||
/// <param name="currentUpdateType">Type of the current update.</param>
|
/// <param name="currentUpdateType">Type of the current update.</param>
|
||||||
/// <returns>ItemUpdateType.</returns>
|
/// <returns>ItemUpdateType.</returns>
|
||||||
protected virtual ItemUpdateType BeforeSave(TItemType item, bool isFullRefresh, ItemUpdateType currentUpdateType)
|
private ItemUpdateType BeforeSave(TItemType item, bool isFullRefresh, ItemUpdateType currentUpdateType)
|
||||||
|
{
|
||||||
|
var updateType = BeforeSaveInternal(item, isFullRefresh, currentUpdateType);
|
||||||
|
|
||||||
|
updateType |= item.OnMetadataChanged();
|
||||||
|
|
||||||
|
return updateType;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual ItemUpdateType BeforeSaveInternal(TItemType item, bool isFullRefresh, ItemUpdateType currentUpdateType)
|
||||||
{
|
{
|
||||||
var updateType = ItemUpdateType.None;
|
var updateType = ItemUpdateType.None;
|
||||||
|
|
||||||
|
@ -295,13 +304,6 @@ namespace MediaBrowser.Providers.Manager
|
||||||
updateType |= ItemUpdateType.MetadataImport;
|
updateType |= ItemUpdateType.MetadataImport;
|
||||||
}
|
}
|
||||||
|
|
||||||
var inheritedParentalRatingValue = item.GetInheritedParentalRatingValue() ?? 0;
|
|
||||||
if (inheritedParentalRatingValue != item.InheritedParentalRatingValue)
|
|
||||||
{
|
|
||||||
item.InheritedParentalRatingValue = inheritedParentalRatingValue;
|
|
||||||
updateType |= ItemUpdateType.MetadataImport;
|
|
||||||
}
|
|
||||||
|
|
||||||
return updateType;
|
return updateType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,9 @@ namespace MediaBrowser.Providers.Music
|
||||||
{
|
{
|
||||||
public class AlbumMetadataService : MetadataService<MusicAlbum, AlbumInfo>
|
public class AlbumMetadataService : MetadataService<MusicAlbum, AlbumInfo>
|
||||||
{
|
{
|
||||||
protected override ItemUpdateType BeforeSave(MusicAlbum item, bool isFullRefresh, ItemUpdateType currentUpdateType)
|
protected override ItemUpdateType BeforeSaveInternal(MusicAlbum item, bool isFullRefresh, ItemUpdateType currentUpdateType)
|
||||||
{
|
{
|
||||||
var updateType = base.BeforeSave(item, isFullRefresh, currentUpdateType);
|
var updateType = base.BeforeSaveInternal(item, isFullRefresh, currentUpdateType);
|
||||||
|
|
||||||
if (isFullRefresh || currentUpdateType > ItemUpdateType.None)
|
if (isFullRefresh || currentUpdateType > ItemUpdateType.None)
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,9 +15,9 @@ namespace MediaBrowser.Providers.Music
|
||||||
{
|
{
|
||||||
public class ArtistMetadataService : MetadataService<MusicArtist, ArtistInfo>
|
public class ArtistMetadataService : MetadataService<MusicArtist, ArtistInfo>
|
||||||
{
|
{
|
||||||
protected override ItemUpdateType BeforeSave(MusicArtist item, bool isFullRefresh, ItemUpdateType currentUpdateType)
|
protected override ItemUpdateType BeforeSaveInternal(MusicArtist item, bool isFullRefresh, ItemUpdateType currentUpdateType)
|
||||||
{
|
{
|
||||||
var updateType = base.BeforeSave(item, isFullRefresh, currentUpdateType);
|
var updateType = base.BeforeSaveInternal(item, isFullRefresh, currentUpdateType);
|
||||||
|
|
||||||
if (isFullRefresh || currentUpdateType > ItemUpdateType.None)
|
if (isFullRefresh || currentUpdateType > ItemUpdateType.None)
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,9 +34,9 @@ namespace MediaBrowser.Providers.Playlists
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override ItemUpdateType BeforeSave(Playlist item, bool isFullRefresh, ItemUpdateType currentUpdateType)
|
protected override ItemUpdateType BeforeSaveInternal(Playlist item, bool isFullRefresh, ItemUpdateType currentUpdateType)
|
||||||
{
|
{
|
||||||
var updateType = base.BeforeSave(item, isFullRefresh, currentUpdateType);
|
var updateType = base.BeforeSaveInternal(item, isFullRefresh, currentUpdateType);
|
||||||
|
|
||||||
if (isFullRefresh || currentUpdateType > ItemUpdateType.None)
|
if (isFullRefresh || currentUpdateType > ItemUpdateType.None)
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,9 +16,9 @@ namespace MediaBrowser.Providers.TV
|
||||||
{
|
{
|
||||||
public class EpisodeMetadataService : MetadataService<Episode, EpisodeInfo>
|
public class EpisodeMetadataService : MetadataService<Episode, EpisodeInfo>
|
||||||
{
|
{
|
||||||
protected override ItemUpdateType BeforeSave(Episode item, bool isFullRefresh, ItemUpdateType currentUpdateType)
|
protected override ItemUpdateType BeforeSaveInternal(Episode item, bool isFullRefresh, ItemUpdateType currentUpdateType)
|
||||||
{
|
{
|
||||||
var updateType = base.BeforeSave(item, isFullRefresh, currentUpdateType);
|
var updateType = base.BeforeSaveInternal(item, isFullRefresh, currentUpdateType);
|
||||||
|
|
||||||
var seriesName = item.FindSeriesName();
|
var seriesName = item.FindSeriesName();
|
||||||
if (!string.Equals(item.SeriesName, seriesName, StringComparison.Ordinal))
|
if (!string.Equals(item.SeriesName, seriesName, StringComparison.Ordinal))
|
||||||
|
|
|
@ -17,9 +17,9 @@ namespace MediaBrowser.Providers.TV
|
||||||
{
|
{
|
||||||
public class SeasonMetadataService : MetadataService<Season, SeasonInfo>
|
public class SeasonMetadataService : MetadataService<Season, SeasonInfo>
|
||||||
{
|
{
|
||||||
protected override ItemUpdateType BeforeSave(Season item, bool isFullRefresh, ItemUpdateType currentUpdateType)
|
protected override ItemUpdateType BeforeSaveInternal(Season item, bool isFullRefresh, ItemUpdateType currentUpdateType)
|
||||||
{
|
{
|
||||||
var updateType = base.BeforeSave(item, isFullRefresh, currentUpdateType);
|
var updateType = base.BeforeSaveInternal(item, isFullRefresh, currentUpdateType);
|
||||||
|
|
||||||
if (item.IndexNumber.HasValue && item.IndexNumber.Value == 0)
|
if (item.IndexNumber.HasValue && item.IndexNumber.Value == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
[assembly: AssemblyVersion("3.2.30.18")]
|
[assembly: AssemblyVersion("3.2.30.19")]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user