diff --git a/modules/torrents/client/controllers/torrent-info.client.controller.js b/modules/torrents/client/controllers/torrent-info.client.controller.js index fe2238de..f6d76dd5 100644 --- a/modules/torrents/client/controllers/torrent-info.client.controller.js +++ b/modules/torrents/client/controllers/torrent-info.client.controller.js @@ -118,7 +118,7 @@ */ vm.downloadTorrent = function (id) { var url = '/api/torrents/download/' + id; - DownloadService.downloadTorrentFile(url, null, function (status) { + DownloadService.downloadFile(url, null, function (status) { if (status === 200) { Notification.success({ message: ' ' + $translate.instant('TORRENTS_DOWNLOAD_SUCCESSFULLY') @@ -546,7 +546,7 @@ //evt.preventDefault(); var url = '/api/subtitles/' + vm.torrentLocalInfo._id.toString() + '/' + sub._id.toString(); - DownloadService.downloadTorrentFile(url, null, function (status) { + DownloadService.downloadFile(url, null, function (status) { if (status === 200) { Notification.success({ message: ' ' + $translate.instant('SUBTITLE_DOWNLOAD_SUCCESSFULLY') diff --git a/modules/torrents/client/controllers/torrents.client.controller.js b/modules/torrents/client/controllers/torrents.client.controller.js index fd2bd284..bcc89bb0 100644 --- a/modules/torrents/client/controllers/torrents.client.controller.js +++ b/modules/torrents/client/controllers/torrents.client.controller.js @@ -220,7 +220,7 @@ */ vm.downloadTorrent = function (id) { var url = '/api/torrents/download/' + id; - DownloadService.downloadTorrentFile(url, null, function (status) { + DownloadService.downloadFile(url, null, function (status) { if (status === 200) { Notification.success({ message: ' ' + $translate.instant('TORRENTS_DOWNLOAD_SUCCESSFULLY') diff --git a/modules/torrents/client/services/torrent-download.client.service.js b/modules/torrents/client/services/torrent-download.client.service.js index c309bc39..5c257887 100644 --- a/modules/torrents/client/services/torrent-download.client.service.js +++ b/modules/torrents/client/services/torrent-download.client.service.js @@ -10,10 +10,10 @@ function DownloadService($http, FileSaver) { return { - downloadTorrentFile: downloadTorrentFile + downloadFile: downloadFile }; - function downloadTorrentFile(url, request, successcb, errorcb) { + function downloadFile(url, request, successcb, errorcb) { $http({ url: url, method: 'GET',