update artists
This commit is contained in:
parent
26d3f9740c
commit
8d6702b115
|
@ -17,7 +17,12 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class MusicArtist : Folder, IMetadataContainer, IItemByName, IHasMusicGenres, IHasDualAccess, IHasProductionLocations, IHasLookupInfo<ArtistInfo>
|
public class MusicArtist : Folder, IMetadataContainer, IItemByName, IHasMusicGenres, IHasDualAccess, IHasProductionLocations, IHasLookupInfo<ArtistInfo>
|
||||||
{
|
{
|
||||||
public bool IsAccessedByName { get; set; }
|
[IgnoreDataMember]
|
||||||
|
public bool IsAccessedByName
|
||||||
|
{
|
||||||
|
get { return ParentId == Guid.Empty; }
|
||||||
|
}
|
||||||
|
|
||||||
public List<string> ProductionLocations { get; set; }
|
public List<string> ProductionLocations { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
|
|
|
@ -961,7 +961,7 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||||
Name = name
|
Name = name
|
||||||
|
|
||||||
}).Cast<MusicArtist>()
|
}).Cast<MusicArtist>()
|
||||||
.Where(i => !i.IsAccessedByName)
|
.OrderBy(i => i.IsAccessedByName ? 1 : 0)
|
||||||
.Cast<T>()
|
.Cast<T>()
|
||||||
.FirstOrDefault();
|
.FirstOrDefault();
|
||||||
|
|
||||||
|
@ -984,11 +984,6 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||||
Path = path
|
Path = path
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isArtist)
|
|
||||||
{
|
|
||||||
(item as MusicArtist).IsAccessedByName = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
var task = CreateItem(item, CancellationToken.None);
|
var task = CreateItem(item, CancellationToken.None);
|
||||||
Task.WaitAll(task);
|
Task.WaitAll(task);
|
||||||
}
|
}
|
||||||
|
@ -2574,8 +2569,8 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||||
throw new ArgumentNullException("name");
|
throw new ArgumentNullException("name");
|
||||||
}
|
}
|
||||||
|
|
||||||
name = _fileSystem.GetValidFilename(name);
|
name = _fileSystem.GetValidFilename(name);
|
||||||
|
|
||||||
var rootFolderPath = ConfigurationManager.ApplicationPaths.DefaultUserViewsPath;
|
var rootFolderPath = ConfigurationManager.ApplicationPaths.DefaultUserViewsPath;
|
||||||
|
|
||||||
var virtualFolderPath = Path.Combine(rootFolderPath, name);
|
var virtualFolderPath = Path.Combine(rootFolderPath, name);
|
||||||
|
|
|
@ -82,7 +82,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||||
private IDbCommand _updateInheritedRatingCommand;
|
private IDbCommand _updateInheritedRatingCommand;
|
||||||
private IDbCommand _updateInheritedTagsCommand;
|
private IDbCommand _updateInheritedTagsCommand;
|
||||||
|
|
||||||
public const int LatestSchemaVersion = 72;
|
public const int LatestSchemaVersion = 73;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="SqliteItemRepository"/> class.
|
/// Initializes a new instance of the <see cref="SqliteItemRepository"/> class.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user