completely removed restart as its broken for most cases

This commit is contained in:
hamza zia 2014-05-31 18:01:57 +08:00
parent 3ca6abe3be
commit 884de1ed22
2 changed files with 0 additions and 37 deletions

View File

@ -325,13 +325,6 @@
<i class="icon-play"></i>
</button>
<button
ng-show="canRestart(download)"
class="btn"
ng-click="restart(download)">
<i class="icon-repeat"></i>
</button>
<button
class="btn hidden-phone"
ng-click="remove(download)">

View File

@ -54,28 +54,6 @@ function(
rpc.once(method, [d.gid], cb);
}
scope.restart = function(d) {
// XXX broken in general: does not work with torrents
// XXX broken in general: does not carry over prefs
// XXX broken in particular: uris no longer stored in context object
throw new Error("broken");
var uris =
_.chain(d.files).map(function(f) { return f.uris })
.filter(function(uris) { return uris.length })
.map(function(uris) {
return _.chain(uris)
.map(function(u) { return u.uri })
.uniq().value();
}).value();
if (uris.length > 0) {
scope.remove(d, function() {
rpc.once('addUri', uris, angular.noop, true);
});
}
}
// start filling in the model of active,
// waiting and stopped download
rpc.subscribe('tellActive', [], function(data) {
@ -409,14 +387,6 @@ function(
return ctx;
};
scope.canRestart = function(d) {
if (['active', 'paused'].indexOf(d.status) == -1
&& !d.bittorrent)
return true;
return false;
};
scope.hasStatus = function hasStatus(d, status) {
if (_.isArray(status)) {
if (status.length == 0) return false;