mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 13:10:13 -07:00
Fixed issue with Artist page not rendering the artists in DB
This commit is contained in:
parent
50d5693399
commit
0ec8830def
8 changed files with 57 additions and 42 deletions
|
@ -1,34 +1,33 @@
|
|||
var NzbDroneController = require('../Shared/NzbDroneController');
|
||||
var AppLayout = require('../AppLayout');
|
||||
var ArtistCollection = require('./ArtistCollection');
|
||||
var SeriesIndexLayout = require('./Index/SeriesIndexLayout');
|
||||
var SeriesIndexLayout = require('../Series/Index/SeriesIndexLayout');
|
||||
var SeriesDetailsLayout = require('../Series/Details/SeriesDetailsLayout');
|
||||
|
||||
module.exports = NzbDroneController.extend({
|
||||
_originalInit : NzbDroneController.prototype.initialize,
|
||||
|
||||
initialize : function() {
|
||||
this.route('', this.series);
|
||||
this.route('artist', this.series);
|
||||
this.route('artist/:query', this.seriesDetails);
|
||||
this.route('', this.artist);
|
||||
this.route('artist', this.artist);
|
||||
this.route('artist/:query', this.artistDetails);
|
||||
|
||||
this._originalInit.apply(this, arguments);
|
||||
},
|
||||
|
||||
artist : function() {
|
||||
this.setTitle('Lidarr');
|
||||
this.setArtistName('Lidarr');
|
||||
this.showMainRegion(new SeriesIndexLayout());
|
||||
},
|
||||
|
||||
seriesDetails : function(query) {
|
||||
artistDetails : function(query) {
|
||||
var artists = ArtistCollection.where({ artistNameSlug : query });
|
||||
console.log('seriesDetails, artists: ', artists);
|
||||
console.log('artistDetails, artists: ', artists);
|
||||
if (artists.length !== 0) {
|
||||
var targetSeries = artists[0];
|
||||
console.log("[ArtistController] targetSeries: ", targetSeries);
|
||||
this.setTitle(targetSeries.get('title'));
|
||||
this.setArtistName(targetSeries.get('artistName'));
|
||||
this.setTitle(targetSeries.get('artistName')); // TODO: Update NzbDroneController
|
||||
//this.setArtistName(targetSeries.get('artistName'));
|
||||
this.showMainRegion(new SeriesDetailsLayout({ model : targetSeries }));
|
||||
} else {
|
||||
this.showNotFound();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue