Display name in Duplicate title

This commit is contained in:
Philippe Vienne 2016-04-17 23:26:15 +02:00
parent 8e61af59a3
commit 4d98eb3ae7
2 changed files with 5 additions and 4 deletions

View file

@ -1,6 +1,6 @@
<h2>Results</h2>
<h2>Duplicates in {{playlistName}}</h2>
<div ng-if="loaded == false">Loading...</div>
<div ng-if="tracks.length == 0 && loaded">No duplicates found</div>
<div ng-if="tracks.length == 0 && loaded">No duplicate found</div>
<div ng-if="tracks.length > 0 && loaded">
<div class="list-group-item" ng-repeat="t in tracks">
{{t.track.name}} - <span ng-repeat="artist in t.track.artists">{{artist == t.track.artists[0]?'':', '}}{{artist.name}}</span>

View file

@ -30,7 +30,7 @@
}
})
.state('finder.playlist.dups',{
url: '/:uid/:id',
url: '/:uid/:id/:playlist',
views: {
'dups@finder': {
templateUrl: 'partials/dups.html',
@ -93,7 +93,7 @@
};
$scope.open = function(playlist) {
$scope.current.playlistId = playlist.id;
$state.go('finder.playlist.dups',{uid: playlist.owner.id, id: playlist.id})
$state.go('finder.playlist.dups',{uid: playlist.owner.id, id: playlist.id, playlist: encodeURIComponent(playlist.name)})
};
$scope.load();
}]);
@ -101,6 +101,7 @@
app.controller("DupsCtrl",['$scope', '$stateParams', '$http',function($scope, $stateParams, $http){
$scope.uid = $stateParams['uid'];
$scope.id = $stateParams['id'];
$scope.playlistName = decodeURIComponent($stateParams.playlist);
$scope.current.playlistId = $scope.id;
$scope.tracks = [];
$scope.loaded = false;