diff --git a/data/interfaces/default/home_stats.html b/data/interfaces/default/home_stats.html index c71c47f4..ab0d33e5 100644 --- a/data/interfaces/default/home_stats.html +++ b/data/interfaces/default/home_stats.html @@ -46,9 +46,9 @@ DOCUMENTATION :: END
% endif
@@ -75,7 +75,7 @@ DOCUMENTATION :: END
% if a['rows'][0]['grandparent_thumb'] != '':
% endif
diff --git a/data/interfaces/default/js/tables/sync_table.js b/data/interfaces/default/js/tables/sync_table.js
index c13a88cc..9853c2fe 100644
--- a/data/interfaces/default/js/tables/sync_table.js
+++ b/data/interfaces/default/js/tables/sync_table.js
@@ -9,12 +9,14 @@ sync_table_options = {
"pageLength": 25,
"stateSave": true,
"language": {
- "search":"Search: ",
- "lengthMenu":"Show _MENU_ lines per page",
- "emptyTable": "No synced items",
- "info":"Showing _START_ to _END_ of _TOTAL_ lines",
- "infoEmpty":"Showing 0 to 0 of 0 lines",
- "infoFiltered":"(filtered from _MAX_ total lines)"},
+ "search":"Search: ",
+ "lengthMenu":"Show _MENU_ lines per page",
+ "emptyTable": "No synced items",
+ "info":"Showing _START_ to _END_ of _TOTAL_ lines",
+ "infoEmpty":"Showing 0 to 0 of 0 lines",
+ "infoFiltered":"(filtered from _MAX_ total lines)",
+ "loadingRecords":' Loading items...'
+ },
"columnDefs": [
{
"targets": [0],
@@ -91,11 +93,10 @@ sync_table_options = {
},
{
"targets": [10],
- "data": null,
+ "data": "item_downloaded_percent_complete",
"createdCell": function (td, cellData, rowData, row, col) {
if (rowData['item_count'] > 0 ) {
- percent_complete = Math.round((rowData['item_downloaded_count']/rowData['item_count']*100),0);
- $(td).html('' + percent_complete + '%');
+ $(td).html('' + cellData + '%');
} else {
$(td).html('0%');
}
diff --git a/plexpy/common.py b/plexpy/common.py
index ae8f41fe..eb701edb 100644
--- a/plexpy/common.py
+++ b/plexpy/common.py
@@ -25,10 +25,10 @@ import re
from plexpy import version
-#Identify Our Application
+# Identify Our Application
USER_AGENT = 'PlexPy/-' + version.PLEXPY_VERSION + ' (' + platform.system() + ' ' + platform.release() + ')'
-### Notification Types
+# Notification Types
NOTIFY_SNATCH = 1
NOTIFY_DOWNLOAD = 2
@@ -36,13 +36,5 @@ notifyStrings = {}
notifyStrings[NOTIFY_SNATCH] = "Started Download"
notifyStrings[NOTIFY_DOWNLOAD] = "Download Finished"
-### Release statuses
-UNKNOWN = -1 # should never happen
-UNAIRED = 1 # releases that haven't dropped yet
-SNATCHED = 2 # qualified with quality
-WANTED = 3 # releases we don't have but want to get
-DOWNLOADED = 4 # qualified with quality
-SKIPPED = 5 # releases we don't want
-ARCHIVED = 6 # releases that you don't have locally (counts toward download completion stats)
-IGNORED = 7 # releases that you don't want included in your download stats
-SNATCHED_PROPER = 9 # qualified with quality
+DEFAULT_USER_THUMB = "interfaces/default/images/gravatar-default-80x80.png"
+DEFAULT_POSTER_THUMB = "interfaces/default/images/poster.png"
\ No newline at end of file
diff --git a/plexpy/plextv.py b/plexpy/plextv.py
index 07be4e51..7967b3e6 100644
--- a/plexpy/plextv.py
+++ b/plexpy/plextv.py
@@ -17,17 +17,9 @@ from plexpy import logger, helpers, plexwatch
from xml.dom import minidom
from httplib import HTTPSConnection
-from urlparse import parse_qsl
-from urllib import urlencode
import base64
-import cherrypy
-import urllib
-import urllib2
import plexpy
-import os.path
-import subprocess
-import json
class PlexTV(object):
@@ -346,6 +338,8 @@ class PlexTV(object):
status_item_ready_count = self.get_xml_attr(status, 'itemsReadyCount')
status_item_successful_count = self.get_xml_attr(status, 'itemsSuccessfulCount')
status_total_size = self.get_xml_attr(status, 'totalSize')
+ status_item_download_percent_complete = helpers.get_percent(
+ status_item_downloaded_count, status_item_count)
for settings in item.getElementsByTagName('MediaSettings'):
settings_audio_boost = self.get_xml_attr(settings, 'audioBoost')
@@ -376,6 +370,7 @@ class PlexTV(object):
"item_count": status_item_count,
"item_complete_count": status_item_complete_count,
"item_downloaded_count": status_item_downloaded_count,
+ "item_downloaded_percent_complete": status_item_download_percent_complete,
"music_bitrate": settings_music_bitrate,
"photo_quality": settings_photo_quality,
"video_quality": settings_video_quality,
diff --git a/plexpy/plexwatch.py b/plexpy/plexwatch.py
index fbe47565..69659e31 100644
--- a/plexpy/plexwatch.py
+++ b/plexpy/plexwatch.py
@@ -13,7 +13,7 @@
# You should have received a copy of the GNU General Public License
# along with PlexPy. If not, see