Compare commits

..

7 Commits

Author SHA1 Message Date
JonnyWong16
29c7853380 v1.4.20 2017-06-24 21:41:24 -07:00
JonnyWong16
cd417aaf44 Support custom port for Mattermost (Slack) notifications 2017-06-24 21:34:53 -07:00
JonnyWong16
428a5cc0ff Udate file sizes when refreshing media info 2017-06-24 21:34:22 -07:00
JonnyWong16
d128d7c8e6 Sort 4k properly in media info table 2017-06-24 21:17:26 -07:00
JonnyWong16
8027199bd5 Merge pull request #1021 from senepa/senepa-patch-1
Fixed math used to calculate human_duration
2017-06-24 21:07:35 -07:00
JonnyWong16
099a887cc7 Add PlexTogether platform image 2017-06-24 21:06:40 -07:00
o
1c50e615cf Fixing math used to calculate human_duration
There are 86400 seconds in a day
2017-04-22 19:27:31 -04:00
7 changed files with 21 additions and 7 deletions

View File

@@ -1,5 +1,14 @@
# Changelog
## v1.4.20 (2017-06-24)
* New: Added platform image for the PlexTogether player.
* Fix: Corrected math used to calculate human duration. (Thanks @senepa)
* Fix: Sorting of 4k in media info tables.
* Fix: Update file sizes when refreshing media info tables.
* Fix: Support a custom port for Mattermost (Slack) notifications.
## v1.4.19 (2017-05-31)
* Fix: Video resolution not showing up for transcoded streams on PMS 1.7.x.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -256,6 +256,8 @@ function getPlatformImagePath(platformName) {
return 'images/platforms/wp.png';
} else if (platformName.indexOf("Plex Media Player") > -1) {
return 'images/platforms/pmp.png';
} else if (platformName.indexOf("PlexTogether") > -1) {
return 'images/platforms/plextogether.png';
} else {
return 'images/platforms/default.png';
}

View File

@@ -204,10 +204,10 @@ def human_duration(s, sig='dhms'):
hd = ''
if str(s).isdigit() and s > 0:
d = int(s / 84600)
h = int((s % 84600) / 3600)
m = int(((s % 84600) % 3600) / 60)
s = int(((s % 84600) % 3600) % 60)
d = int(s / 86400)
h = int((s % 86400) / 3600)
m = int(((s % 86400) % 3600) / 60)
s = int(((s % 86400) % 3600) % 60)
hd_list = []
if sig >= 'd' and d > 0:

View File

@@ -382,7 +382,7 @@ class Libraries(object):
pass
# If no cache was imported, get all library children items
cached_items = {d['rating_key']: d['file_size'] for d in rows}
cached_items = {d['rating_key']: d['file_size'] for d in rows} if not refresh else {}
if refresh or not rows:
pms_connect = pmsconnect.PmsConnect()
@@ -491,6 +491,8 @@ class Libraries(object):
results = sorted(results, key=lambda k: helpers.cast_to_int(k['media_index']), reverse=reverse)
elif sort_key == 'file_size' or sort_key == 'bitrate':
results = sorted(results, key=lambda k: helpers.cast_to_int(k[sort_key]), reverse=reverse)
elif sort_key == 'video_resolution':
results = sorted(results, key=lambda k: helpers.cast_to_int(k[sort_key].replace('4k', '2160p').rstrip('p')), reverse=reverse)
else:
results = sorted(results, key=lambda k: k[sort_key], reverse=reverse)

View File

@@ -2062,9 +2062,10 @@ class SLACK(object):
data['attachments'] = [attachment]
slackhost = urlparse(self.slack_hook).hostname
slackport = urlparse(self.slack_hook).port
slackpath = urlparse(self.slack_hook).path
http_handler = HTTPSConnection(slackhost)
http_handler = HTTPSConnection(slackhost, slackport)
http_handler.request("POST",
slackpath,
headers={'Content-type': "application/json"},

View File

@@ -1,2 +1,2 @@
PLEXPY_VERSION = "master"
PLEXPY_RELEASE_VERSION = "1.4.19"
PLEXPY_RELEASE_VERSION = "1.4.20"