Skip to content

Commit

Permalink
change download service function name
Browse files Browse the repository at this point in the history
  • Loading branch information
taobataoma committed Apr 25, 2017
1 parent af27842 commit 5cc02e2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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: '<i class="glyphicon glyphicon-ok"></i> ' + $translate.instant('TORRENTS_DOWNLOAD_SUCCESSFULLY')
Expand Down Expand Up @@ -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: '<i class="glyphicon glyphicon-ok"></i> ' + $translate.instant('SUBTITLE_DOWNLOAD_SUCCESSFULLY')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: '<i class="glyphicon glyphicon-ok"></i> ' + $translate.instant('TORRENTS_DOWNLOAD_SUCCESSFULLY')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 5cc02e2

Please sign in to comment.