Skip to content

Commit

Permalink
Fix torrentdialog getTooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
Js41637 committed Sep 15, 2015
1 parent 51285b5 commit 34d703e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions js/directives/torrentDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,13 @@ DuckieTV
function($scope) {
// Translates the tooltip
$scope.getTooltip = function() {
return $scope.q !== undefined ?
$filter('translate')('TORRENTDIALOG/search-download-this/tooltip') + $scope.q :
$filter('translate')('TORRENTDIALOG/search-download-any/tooltip');
if ($scope.q) {
return $filter('translate')('TORRENTDIALOG/search-download-this/tooltip') + $scope.q;
} else if ($scope.episode && $scope.serie) {
return $filter('translate')('TORRENTDIALOG/search-download-this/tooltip') + $scope.serie.name + ' ' + $scope.episode.getFormattedEpisode();
} else {
return $filter('translate')('TORRENTDIALOG/search-download-any/tooltip');
}
};
// Opens the torrent search with the episode selected
$scope.openDialog = function() {
Expand Down

0 comments on commit 34d703e

Please sign in to comment.