From 34d703ecf837dc8edcdc07a4481309c46eacb2c2 Mon Sep 17 00:00:00 2001 From: Js41637 ftw Date: Tue, 15 Sep 2015 17:02:03 +1000 Subject: [PATCH] Fix torrentdialog getTooltip --- js/directives/torrentDialog.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/js/directives/torrentDialog.js b/js/directives/torrentDialog.js index b0be87e7e..d065d0f90 100644 --- a/js/directives/torrentDialog.js +++ b/js/directives/torrentDialog.js @@ -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() {