mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-23 18:44:45 +01:00
add AlbumArtists to item dto's
This commit is contained in:
@@ -1175,6 +1175,28 @@ namespace MediaBrowser.Server.Implementations.Dto
|
||||
if (hasAlbumArtist != null)
|
||||
{
|
||||
dto.AlbumArtist = hasAlbumArtist.AlbumArtists.FirstOrDefault();
|
||||
|
||||
dto.AlbumArtists = hasAlbumArtist
|
||||
.AlbumArtists
|
||||
.Select(i =>
|
||||
{
|
||||
try
|
||||
{
|
||||
var artist = _libraryManager.GetArtist(i);
|
||||
return new NameIdPair
|
||||
{
|
||||
Name = artist.Name,
|
||||
Id = artist.Id.ToString("N")
|
||||
};
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.ErrorException("Error getting album artist", ex);
|
||||
return null;
|
||||
}
|
||||
})
|
||||
.Where(i => i != null)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
// Add video info
|
||||
|
||||
@@ -1172,6 +1172,7 @@
|
||||
"LabelIfYouWishToContinueWithDeletion": "If you wish to continue, please confirm by entering the value of:",
|
||||
"ButtonIdentify": "Identify",
|
||||
"LabelAlbumArtist": "Album artist:",
|
||||
"LabelAlbumArtists": "Album artists:",
|
||||
"LabelAlbum": "Album:",
|
||||
"LabelCommunityRating": "Community rating:",
|
||||
"LabelVoteCount": "Vote count:",
|
||||
|
||||
@@ -136,6 +136,14 @@ namespace MediaBrowser.Server.Implementations.Sync
|
||||
|
||||
var jobId = Guid.NewGuid().ToString("N");
|
||||
|
||||
if (string.IsNullOrWhiteSpace(request.Quality))
|
||||
{
|
||||
request.Quality = GetQualityOptions(request.TargetId)
|
||||
.Where(i => i.IsDefault)
|
||||
.Select(i => i.Id)
|
||||
.FirstOrDefault(i => !string.IsNullOrWhiteSpace(i));
|
||||
}
|
||||
|
||||
var job = new SyncJob
|
||||
{
|
||||
Id = jobId,
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace MediaBrowser.Server.Implementations.Sync
|
||||
|
||||
string[] queries = {
|
||||
|
||||
"create table if not exists SyncJobs (Id GUID PRIMARY KEY, TargetId TEXT NOT NULL, Name TEXT NOT NULL, Quality TEXT NOT NULL, Status TEXT NOT NULL, Progress FLOAT, UserId TEXT NOT NULL, ItemIds TEXT NOT NULL, Category TEXT, ParentId TEXT, UnwatchedOnly BIT, ItemLimit INT, SyncNewContent BIT, DateCreated DateTime, DateLastModified DateTime, ItemCount int)",
|
||||
"create table if not exists SyncJobs (Id GUID PRIMARY KEY, TargetId TEXT NOT NULL, Name TEXT NOT NULL, Quality TEXT, Status TEXT NOT NULL, Progress FLOAT, UserId TEXT NOT NULL, ItemIds TEXT NOT NULL, Category TEXT, ParentId TEXT, UnwatchedOnly BIT, ItemLimit INT, SyncNewContent BIT, DateCreated DateTime, DateLastModified DateTime, ItemCount int)",
|
||||
"create index if not exists idx_SyncJobs on SyncJobs(Id)",
|
||||
|
||||
"create table if not exists SyncJobItems (Id GUID PRIMARY KEY, ItemId TEXT, ItemName TEXT, MediaSourceId TEXT, JobId TEXT, TemporaryPath TEXT, OutputPath TEXT, Status TEXT, TargetId TEXT, DateCreated DateTime, Progress FLOAT, AdditionalFiles TEXT, MediaSource TEXT, IsMarkedForRemoval BIT, JobItemIndex INT)",
|
||||
|
||||
Reference in New Issue
Block a user