mirror of
https://github.com/Lidarr/Lidarr
synced 2026-04-28 23:51:46 +02:00
This fixes and implements many items on the ArtistIndex Page and ArtistDetailPage * Create ArtistStatistics Core Module and tie into API. * Create Members Class and tie into ArtistModel and Artist API resource. * Finish Out Album API resources and pass to ArtistDetailPage. * Finish Out Track and TrackFile API resources and pass to ArtistDetailPage. * Lots of UI work on Artist Detail Page to get Albums and Track list working. * Add Cover and Disc Image Types to MediaCover Class * Remove AddSeries UI Flow, since we have replaced with AddArtist (Cleanup)
46 lines
No EOL
1.2 KiB
JavaScript
46 lines
No EOL
1.2 KiB
JavaScript
var _ = require('underscore');
|
|
var Marionette = require('marionette');
|
|
var AlbumLayout = require('./AlbumLayout');
|
|
var AsSortedCollectionView = require('../../Mixins/AsSortedCollectionView');
|
|
|
|
var view = Marionette.CollectionView.extend({
|
|
|
|
itemView : AlbumLayout,
|
|
|
|
initialize : function(options) {
|
|
if (!options.trackCollection) {
|
|
throw 'trackCollection is needed';
|
|
}
|
|
console.log(options);
|
|
this.albumCollection = options.collection;
|
|
this.trackCollection = options.trackCollection;
|
|
this.artist = options.artist;
|
|
},
|
|
|
|
itemViewOptions : function() {
|
|
return {
|
|
albumCollection : this.albumCollection,
|
|
trackCollection : this.trackCollection,
|
|
artist : this.artist
|
|
};
|
|
},
|
|
|
|
onTrackGrabbed : function(message) {
|
|
if (message.track.artist.id !== this.trackCollection.artistId) {
|
|
return;
|
|
}
|
|
|
|
var self = this;
|
|
|
|
_.each(message.track.tracks, function(track) {
|
|
var ep = self.TrackCollection.get(track.id);
|
|
ep.set('downloading', true);
|
|
});
|
|
|
|
this.render();
|
|
}
|
|
});
|
|
|
|
AsSortedCollectionView.call(view);
|
|
|
|
module.exports = view; |