summaryrefslogtreecommitdiffstats
path: root/pyload
diff options
context:
space:
mode:
Diffstat (limited to 'pyload')
-rw-r--r--pyload/database/FileDatabase.py2
-rw-r--r--pyload/web/app/scripts/views/dashboard/filterView.js20
-rw-r--r--pyload/web/app/scripts/views/headerView.js1
-rw-r--r--pyload/web/app/templates/default/dashboard/actionbar.html5
-rw-r--r--pyload/web/app/templates/default/dashboard/package.html4
5 files changed, 26 insertions, 6 deletions
diff --git a/pyload/database/FileDatabase.py b/pyload/database/FileDatabase.py
index 7765cd744..1dc35e028 100644
--- a/pyload/database/FileDatabase.py
+++ b/pyload/database/FileDatabase.py
@@ -426,7 +426,7 @@ class FileMethods(DatabaseMethods):
return [r[0] for r in self.c]
@queue
- def restartFailed(self, owner):
+ def restartFailed(self, owner=None):
# status=queued, where status in failed, aborted, temp offline
self.c.execute("UPDATE files SET dlstatus=3, error='' WHERE dlstatus IN (7, 11, 12)")
diff --git a/pyload/web/app/scripts/views/dashboard/filterView.js b/pyload/web/app/scripts/views/dashboard/filterView.js
index ad72cf926..736b740e1 100644
--- a/pyload/web/app/scripts/views/dashboard/filterView.js
+++ b/pyload/web/app/scripts/views/dashboard/filterView.js
@@ -31,7 +31,10 @@ define(['jquery', 'backbone', 'underscore', 'app', 'utils/apitypes', 'models/Pac
},
template: template,
+ // Visible dl state
state: null,
+ // bit mask of filtered, thus not visible media types
+ types: 0,
initialize: function() {
this.state = Api.DownloadState.All;
@@ -120,6 +123,10 @@ define(['jquery', 'backbone', 'underscore', 'app', 'utils/apitypes', 'models/Pac
// determine if a file should be visible
// TODO: non download files
is_visible: function(file) {
+ // bit is set -> not visible
+ if (file.get('media') & this.types)
+ return false;
+
if (this.state === Api.DownloadState.Finished)
return file.isFinished();
else if (this.state === Api.DownloadState.Unfinished)
@@ -140,7 +147,20 @@ define(['jquery', 'backbone', 'underscore', 'app', 'utils/apitypes', 'models/Pac
},
filter_type: function(e) {
+ var el = $(e.target);
+ var type = parseInt(el.data('type'));
+
+ // Bit is already set, so type is not visible, will become visible now
+ if (type & this.types) {
+ el.find('i').removeClass('icon-remove').addClass('icon-ok');
+ } else { // type will be hidden
+ el.find('i').removeClass('icon-ok').addClass('icon-remove');
+ }
+ this.types ^= type;
+
+ this.apply_filter();
+ return false;
}
});
diff --git a/pyload/web/app/scripts/views/headerView.js b/pyload/web/app/scripts/views/headerView.js
index 2c83fb381..b4ffbc35d 100644
--- a/pyload/web/app/scripts/views/headerView.js
+++ b/pyload/web/app/scripts/views/headerView.js
@@ -144,7 +144,6 @@ define(['jquery', 'underscore', 'backbone', 'app', 'models/ServerStatus', 'colle
// Render progressbar only when needed
if (!_.isEqual([data.tasks, data.downloads], this.lastStatus)) {
- console.log('render bar');
this.lastStatus = [data.tasks, data.downloads];
this.$('#progress-info').html(templateProgress(data));
} else {
diff --git a/pyload/web/app/templates/default/dashboard/actionbar.html b/pyload/web/app/templates/default/dashboard/actionbar.html
index a8b2ebecd..ad9a1278d 100644
--- a/pyload/web/app/templates/default/dashboard/actionbar.html
+++ b/pyload/web/app/templates/default/dashboard/actionbar.html
@@ -31,8 +31,9 @@
<li><a class="filter-type" data-type="4" href="#"><i class="icon-ok"></i>&nbsp;Image</a></li>
<li><a class="filter-type" data-type="8" href="#"><i class="icon-ok"></i>&nbsp;Video</a></li>
<li><a class="filter-type" data-type="16" href="#"><i class="icon-ok"></i>&nbsp;Document</a></li>
- <li><a class="filter-type" data-type="32" href="#"><i class="icon-remove"></i>&nbsp;Archive</a></li>
- <li><a class="filter-type" data-type="1" href="#"><i class="icon-remove"></i>&nbsp;Other</a></li>
+ <li><a class="filter-type" data-type="32" href="#"><i class="icon-ok"></i>&nbsp;Archive</a></li>
+ <li><a class="filter-type" data-type="64" href="#"><i class="icon-ok"></i>&nbsp;Executable</a></li>
+ <li><a class="filter-type" data-type="1" href="#"><i class="icon-ok"></i>&nbsp;Other</a></li>
</ul>
</li>
<li class="dropdown" style="float: right;">
diff --git a/pyload/web/app/templates/default/dashboard/package.html b/pyload/web/app/templates/default/dashboard/package.html
index 0f2496046..83f4fa39e 100644
--- a/pyload/web/app/templates/default/dashboard/package.html
+++ b/pyload/web/app/templates/default/dashboard/package.html
@@ -9,8 +9,8 @@
<div class="package-frame">
<div class="tag-area">
- <span class="badge badge-success"><i class="icon-tag"></i>video</span>
- <span class="badge badge-success badge-ghost"><i class="icon-tag"></i> Add Tag</span>
+ <!--<span class="badge badge-success"><i class="icon-tag"></i>video</span>-->
+ <!--<span class="badge badge-success badge-ghost"><i class="icon-tag"></i> Add Tag</span>-->
</div>
<div class="package-indicator">
<i class="icon-plus-sign btn-move" data-toggle="tooltip" title="Move files here"></i>