mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 13:10:13 -07:00
Fixes misc issues on Artist Detail Page (#57)
Get MB link working, bring in album-type from db instead of hard code, sort albums by release date, fix quirk with track number sorting, rename tool-tips
This commit is contained in:
parent
0c2880c2fe
commit
1a1721b4ee
7 changed files with 27 additions and 9 deletions
|
@ -19,6 +19,7 @@ namespace NzbDrone.Api.Albums
|
||||||
public string Path { get; set; }
|
public string Path { get; set; }
|
||||||
public int ProfileId { get; set; }
|
public int ProfileId { get; set; }
|
||||||
public int Duration { get; set; }
|
public int Duration { get; set; }
|
||||||
|
public string AlbumType { get; set; }
|
||||||
public Ratings Ratings { get; set; }
|
public Ratings Ratings { get; set; }
|
||||||
public DateTime? ReleaseDate { get; set; }
|
public DateTime? ReleaseDate { get; set; }
|
||||||
public List<string> Genres { get; set; }
|
public List<string> Genres { get; set; }
|
||||||
|
@ -48,6 +49,7 @@ namespace NzbDrone.Api.Albums
|
||||||
Images = model.Images,
|
Images = model.Images,
|
||||||
Ratings = model.Ratings,
|
Ratings = model.Ratings,
|
||||||
Duration = model.Duration,
|
Duration = model.Duration,
|
||||||
|
AlbumType = model.AlbumType
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,6 +70,7 @@ namespace NzbDrone.Api.Albums
|
||||||
Title = resource.Title,
|
Title = resource.Title,
|
||||||
Images = resource.Images,
|
Images = resource.Images,
|
||||||
Ratings = resource.Ratings,
|
Ratings = resource.Ratings,
|
||||||
|
AlbumType = resource.AlbumType
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,21 @@ module.exports = Backbone.Collection.extend({
|
||||||
this.models = [];
|
this.models = [];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
comparator : function(model1, model2) {
|
||||||
|
var album1 = model1.get('releaseDate');
|
||||||
|
var album2 = model2.get('releaseDate');
|
||||||
|
|
||||||
|
if (album1 > album2) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (album1 < album2) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
},
|
||||||
|
|
||||||
fetch : function(options) {
|
fetch : function(options) {
|
||||||
if (!this.artistId) {
|
if (!this.artistId) {
|
||||||
throw 'artistId is required';
|
throw 'artistId is required';
|
||||||
|
|
|
@ -99,7 +99,7 @@ module.exports = Marionette.Layout.extend({
|
||||||
label : 'Status',
|
label : 'Status',
|
||||||
cell : TrackStatusCell,
|
cell : TrackStatusCell,
|
||||||
sortable : false
|
sortable : false
|
||||||
},
|
}
|
||||||
//{
|
//{
|
||||||
// name : 'this',
|
// name : 'this',
|
||||||
// label : '',
|
// label : '',
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
Release Date: {{albumReleaseDate}}
|
Release Date: {{albumReleaseDate}}
|
||||||
</div>
|
</div>
|
||||||
<div class="album-detail-type">
|
<div class="album-detail-type">
|
||||||
Type: Album
|
Type: {{albumType}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="album-info" class="album-info"></div>
|
<div id="album-info" class="album-info"></div>
|
||||||
|
|
|
@ -8,17 +8,17 @@
|
||||||
<i class="x-monitored" title="Toggle monitored state for entire artist"/>
|
<i class="x-monitored" title="Toggle monitored state for entire artist"/>
|
||||||
{{name}}
|
{{name}}
|
||||||
<div class="artist-actions pull-right">
|
<div class="artist-actions pull-right">
|
||||||
<div class="x-episode-file-editor">
|
<div class="x-track-file-editor">
|
||||||
<i class="icon-lidarr-track-file" title="Modify episode files for artist"/>
|
<i class="icon-lidarr-track-file" title="Modify track files for artist"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="x-refresh">
|
<div class="x-refresh">
|
||||||
<i class="icon-lidarr-refresh icon-can-spin" title="Update artist info and scan disk"/>
|
<i class="icon-lidarr-refresh icon-can-spin" title="Update artist info and scan disk"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="x-rename">
|
<div class="x-rename">
|
||||||
<i class="icon-lidarr-rename" title="Preview rename for all episodes"/>
|
<i class="icon-lidarr-rename" title="Preview rename for all albums"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="x-search">
|
<div class="x-search">
|
||||||
<i class="icon-lidarr-search" title="Search for monitored episodes in this artist"/>
|
<i class="icon-lidarr-search" title="Search for monitored albums in this artist"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="x-edit">
|
<div class="x-edit">
|
||||||
<i class="icon-lidarr-edit" title="Edit artist"/>
|
<i class="icon-lidarr-edit" title="Edit artist"/>
|
||||||
|
|
|
@ -9,7 +9,7 @@ module.exports = PageableCollection.extend({
|
||||||
|
|
||||||
state : {
|
state : {
|
||||||
sortKey : 'trackNumber',
|
sortKey : 'trackNumber',
|
||||||
order : 1,
|
order : -1,
|
||||||
pageSize : 100000
|
pageSize : 100000
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ Handlebars.registerHelper('poster', function() {
|
||||||
|
|
||||||
|
|
||||||
Handlebars.registerHelper('MBUrl', function() {
|
Handlebars.registerHelper('MBUrl', function() {
|
||||||
return 'https://musicbrainz.org/artist/' + this.mbId;
|
return 'https://musicbrainz.org/artist/' + this.foreignArtistId;
|
||||||
});
|
});
|
||||||
|
|
||||||
Handlebars.registerHelper('TADBUrl', function() {
|
Handlebars.registerHelper('TADBUrl', function() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue