diff --git a/js/controllers/sidepanel/TorrentDetailsCtrl.js b/js/controllers/sidepanel/TorrentDetailsCtrl.js index 0b8033438..099f93b69 100644 --- a/js/controllers/sidepanel/TorrentDetailsCtrl.js +++ b/js/controllers/sidepanel/TorrentDetailsCtrl.js @@ -28,7 +28,7 @@ DuckieTV.controller('TorrentDetailsCtrl', ["DuckieTorrent", "torrent", "$scope", file.isMovie = file.name.substring(file.name.length - 3).match(/mp4|avi|mkv|mpeg|mpg|flv/g); if (file.isMovie) { file.searchFileName = file.name.indexOf('/') > -1 ? file.name.split('/').pop().split(' ').pop() : file.name; - file.path = torrent.downloadDir || ''; + file.path = self.torrent.getDownloadDir(); } return file; }); diff --git a/js/services/TorrentClients/Transmission.js b/js/services/TorrentClients/Transmission.js index 795ce841a..bfd2c352c 100644 --- a/js/services/TorrentClients/Transmission.js +++ b/js/services/TorrentClients/Transmission.js @@ -57,6 +57,9 @@ TransmissionData.extends(TorrentData, { return new Promise(function(resolve) { resolve(self.files); }); + }, + getDownloadDir: function() { + return this.downloadDir; } }); diff --git a/js/services/TorrentClients/uTorrent.js b/js/services/TorrentClients/uTorrent.js index 62af92e47..d52a0dfbe 100644 --- a/js/services/TorrentClients/uTorrent.js +++ b/js/services/TorrentClients/uTorrent.js @@ -590,6 +590,9 @@ DuckieTorrent resolve(files); }); }, + getDownloadDir: function() { + return $parse('properties.all.directory')(this); + }, /** * The torrent is started if the status is uneven. */