Manual merge of v1.4.21 into v2

This commit is contained in:
JonnyWong16 2017-08-02 21:37:59 -07:00
commit 68072d8340
13 changed files with 120 additions and 16 deletions

View file

@ -1,5 +1,31 @@
# Changelog # Changelog
## v1.4.21 (2017-07-01)
* New: Updated donation methods.
## 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.
## v1.4.18 (2017-04-22)
* New: Added some new Arnold quotes. (Thanks @senepa)
* Fix: Text wrapping in datatable footers.
* Fix: API command get_apikey. (Thanks @Hellowlol)
## v1.4.17 (2017-03-04) ## v1.4.17 (2017-03-04)
* New: Configurable month range for the Plays by month graph. (Thanks @Pbaboe) * New: Configurable month range for the Plays by month graph. (Thanks @Pbaboe)

View file

@ -1,15 +1,13 @@
# PlexPy # PlexPy
[![Join the chat at https://gitter.im/plexpy/general](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/plexpy/general?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Discord](https://img.shields.io/badge/Discord-PlexPy-738bd7.svg?style=flat-square)](https://discord.gg/36ggawe)
[![Gitter](https://img.shields.io/badge/Gitter-PlexPy-ed1965.svg?style=flat-square)](https://gitter.im/plexpy/general)
[![Plex Forums](https://img.shields.io/badge/Plex%20Forums-PlexPy-E5A00D.svg?style=flat-square)](https://forums.plex.tv/discussion/169591/plexpy-another-plex-monitoring-program)
A python based web application for monitoring, analytics and notifications for [Plex Media Server](https://plex.tv). A python based web application for monitoring, analytics and notifications for [Plex Media Server](https://plex.tv).
This project is based on code from [Headphones](https://github.com/rembo10/headphones) and [PlexWatchWeb](https://github.com/ecleese/plexWatchWeb). This project is based on code from [Headphones](https://github.com/rembo10/headphones) and [PlexWatchWeb](https://github.com/ecleese/plexWatchWeb).
* [Plex forum thread](https://forums.plex.tv/discussion/169591/plexpy-another-plex-monitoring-program)
* [Gitter chat](https://gitter.im/plexpy/general)
* [/r/Plex Discord server](https://discord.gg/011TFFWSuNFI02EKr) | [PlexPy Discord server](https://discord.gg/36ggawe)
## Features ## Features
* Responsive web design viewable on desktop, tablet and mobile web browsers. * Responsive web design viewable on desktop, tablet and mobile web browsers.

View file

@ -223,8 +223,7 @@
<li><a href="${anon_url('https://github.com/%s/plexpy/wiki/Frequently-Asked-Questions-(FAQ)' % plexpy.CONFIG.GIT_USER)}" target="_blank"><i class="fa fa-fw fa-question-circle"></i> FAQ</a></li> <li><a href="${anon_url('https://github.com/%s/plexpy/wiki/Frequently-Asked-Questions-(FAQ)' % plexpy.CONFIG.GIT_USER)}" target="_blank"><i class="fa fa-fw fa-question-circle"></i> FAQ</a></li>
<li><a href="settings?support=true"><i class="fa fa-fw fa-comment"></i> Support</a></li> <li><a href="settings?support=true"><i class="fa fa-fw fa-comment"></i> Support</a></li>
<li role="separator" class="divider"></li> <li role="separator" class="divider"></li>
<li><a href="${anon_url('https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DG783BMSCU3V4')}" target="_blank"><i class="fa fa-fw fa-paypal"></i> Paypal</a></li> <li><a href="#" data-target="#donate-modal" data-toggle="modal"><i class="fa fa-fw fa-heart"></i> Donate</a></li>
<li><a href="${anon_url('https://www.coinbase.com/JonnyWong16')}" target="_blank"><i class="fa fa-fw fa-btc"></i> Bitcoin</a></li>
<li role="separator" class="divider"></li> <li role="separator" class="divider"></li>
% if plexpy.CONFIG.CHECK_GITHUB: % if plexpy.CONFIG.CHECK_GITHUB:
<li><a href="#" id="nav-update"><i class="fa fa-fw fa-arrow-circle-up"></i> Check for Updates</a></li> <li><a href="#" id="nav-update"><i class="fa fa-fw fa-arrow-circle-up"></i> Check for Updates</a></li>
@ -294,6 +293,63 @@ ${next.modalIncludes()}
</div> </div>
</div> </div>
</div> </div>
% else:
<div id="donate-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="crypto-donate-modal">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
<h4 class="modal-title">PlexPy Donation</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-12" style="text-align: center;">
<h4>
<strong>Thank you for supporting PlexPy!</strong>
</h4>
<p>
Please select a donation method.
</p>
</div>
</div>
<ul id="donation_type" class="nav nav-pills" role="tablist" style="display: flex; justify-content: center; margin: 10px 0;">
<li class="active"><a href="#paypal-donation" role="tab" data-toggle="tab">PayPal</a></li>
<li><a href="#flattr-donation" role="tab" data-toggle="tab">Flattr</a></li>
<li><a href="#crypto-donation" role="tab" data-toggle="tab" class="crypto-donation" data-coin="Bitcoin" data-address="15YMw9c8uH7QecVPXSSjdZ7s55vnbmdKLq">Bitcoin</a></li>
<li><a href="#crypto-donation" role="tab" data-toggle="tab" class="crypto-donation" data-coin="Ethereum" data-address="0x8512f6545858eB6269A0F39349F1cC86Df6Ffaf6">Ethereum</a></li>
<li><a href="#crypto-donation" role="tab" data-toggle="tab" class="crypto-donation" data-coin="Litecoin" data-address="LZWsygTHuL4KNbg2H5EzXBDdJKNtZoqq2R">Litecoin</a></li>
</ul>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="paypal-donation" style="text-align: center">
<p>
Click the button below to continue to PayPal.
</p>
<a href="${anon_url('https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=6XPPKTDSX9QFL&lc=US&item_name=PlexPy&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted')}" target="_blank">
<img src="images/gold-rect-paypal-34px.png" alt="PayPal">
</a>
</div>
<div role="tabpanel" class="tab-pane" id="flattr-donation" style="text-align: center">
<p>
Click the button below to continue to Flattr.
</p>
<a href="${anon_url('https://flattr.com/submit/auto?user_id=JonnyWong16&url=https://github.com/JonnyWong16/plexpy&title=PlexPy&language=en_GB&tags=github&category=software')}" target="_blank">
<img src="images/flattr-badge-large.png" alt="Flattr">
</a>
</div>
<div role="tabpanel" class="tab-pane" id="crypto-donation">
<label>QR Code</label>
<pre id="crypto_qr_code" style="text-align: center"></pre>
<label><span id="crypto_type_label"></span> Address</label>
<pre id="crypto_address" style="text-align: center"></pre>
</div>
</div>
</div>
<div class="modal-footer">
<input type="button" class="btn btn-bright" data-dismiss="modal" value="Close">
</div>
</div>
</div>
</div>
% endif % endif
<div id="confirm-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="confirm-modal"> <div id="confirm-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="confirm-modal">
@ -320,8 +376,10 @@ ${next.modalIncludes()}
<script src="${http_root}js/bootstrap-hover-dropdown.min.js"></script> <script src="${http_root}js/bootstrap-hover-dropdown.min.js"></script>
<script src="${http_root}js/pnotify.custom.min.js"></script> <script src="${http_root}js/pnotify.custom.min.js"></script>
<script src="${http_root}js/script.js"></script> <script src="${http_root}js/script.js"></script>
<script src="${http_root}js/jquery.qrcode.min.js"></script>
% if _session['user_group'] == 'admin' and plexpy.CONFIG.BROWSER_ENABLED: % if _session['user_group'] == 'admin' and plexpy.CONFIG.BROWSER_ENABLED:
<script src="${http_root}js/ajaxNotifications.js"></script> <script src="${http_root}js/ajaxNotifications.js"></script>
% else:
% endif % endif
<script> <script>
% if _session['user_group'] == 'admin': % if _session['user_group'] == 'admin':
@ -357,6 +415,16 @@ ${next.modalIncludes()}
$(this).html('<i class="fa fa-spin fa-refresh"></i> Checking'); $(this).html('<i class="fa fa-spin fa-refresh"></i> Checking');
window.location.href = "checkGithub"; window.location.href = "checkGithub";
}); });
$('#donation_type a.crypto-donation').on('shown.bs.tab', function () {
var crypto_type = $(this).data('coin');
var crypto_address = $(this).data('address')
$('#crypto_qr_code').empty().qrcode({
text: crypto_type + ":" + crypto_address
});
$('#crypto_type_label').html(crypto_type);
$('#crypto_address').html(crypto_address);
});
% endif % endif
$('.dropdown-toggle').click(function (e) { $('.dropdown-toggle').click(function (e) {

View file

@ -2621,6 +2621,9 @@ a .home-platforms-list-cover-face:hover
.dataTables_paginate li { .dataTables_paginate li {
margin: 0; margin: 0;
} }
div.dataTables_info {
white-space: normal !important;
}
.tooltip.top .tooltip-arrow { .tooltip.top .tooltip-arrow {
border-top-color: #fff; border-top-color: #fff;
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View file

@ -261,6 +261,8 @@ function getPlatformImagePath(platformName) {
return 'images/platforms/pmp.png'; return 'images/platforms/pmp.png';
} else if (platformName.indexOf("DLNA") > -1) { } else if (platformName.indexOf("DLNA") > -1) {
return 'images/platforms/dlna.png'; return 'images/platforms/dlna.png';
} else if (platformName.indexOf("PlexTogether") > -1) {
return 'images/platforms/plextogether.png';
} else { } else {
return 'images/platforms/default.png'; return 'images/platforms/default.png';
} }

View file

@ -455,7 +455,7 @@ General optional parameters:
data = None data = None
apikey = hashlib.sha224(str(random.getrandbits(256))).hexdigest()[0:32] apikey = hashlib.sha224(str(random.getrandbits(256))).hexdigest()[0:32]
if plexpy.CONFIG.HTTP_USERNAME and plexpy.CONFIG.HTTP_PASSWORD: if plexpy.CONFIG.HTTP_USERNAME and plexpy.CONFIG.HTTP_PASSWORD:
if username == plexpy.HTTP_USERNAME and password == plexpy.CONFIG.HTTP_PASSWORD: if username == plexpy.CONFIG.HTTP_USERNAME and password == plexpy.CONFIG.HTTP_PASSWORD:
if plexpy.CONFIG.API_KEY: if plexpy.CONFIG.API_KEY:
data = plexpy.CONFIG.API_KEY data = plexpy.CONFIG.API_KEY
else: else:

View file

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

View file

@ -382,7 +382,7 @@ class Libraries(object):
pass pass
# If no cache was imported, get all library children items # 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: if refresh or not rows:
pms_connect = pmsconnect.PmsConnect() pms_connect = pmsconnect.PmsConnect()
@ -492,6 +492,8 @@ class Libraries(object):
results = sorted(results, key=lambda k: helpers.cast_to_int(k['media_index']), reverse=reverse) results = sorted(results, key=lambda k: helpers.cast_to_int(k['media_index']), reverse=reverse)
elif sort_key == 'file_size' or sort_key == 'bitrate': elif sort_key == 'file_size' or sort_key == 'bitrate':
results = sorted(results, key=lambda k: helpers.cast_to_int(k[sort_key]), reverse=reverse) 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: else:
results = sorted(results, key=lambda k: k[sort_key], reverse=reverse) results = sorted(results, key=lambda k: k[sort_key], reverse=reverse)

View file

@ -1,2 +1,2 @@
PLEXPY_BRANCH = "master" PLEXPY_BRANCH = "master"
PLEXPY_RELEASE_VERSION = "1.4.17" PLEXPY_RELEASE_VERSION = "1.4.21"

View file

@ -4632,13 +4632,18 @@ class WebInterface(object):
'Come with me if you want to live.', 'Come with me if you want to live.',
'Who is your daddy and what does he do?', 'Who is your daddy and what does he do?',
'Oh, cookies! I can\'t wait to toss them.', 'Oh, cookies! I can\'t wait to toss them.',
'Can you hurry up. My horse is getting tired.', 'Make it quick because my horse is getting tired.',
'What killed the dinosaurs? The Ice Age!', 'What killed the dinosaurs? The Ice Age!',
'That\'s for sleeping with my wife!', 'That\'s for sleeping with my wife!',
'Remember when I said I\'d kill you last... I lied!', 'Remember when I said I\'d kill you last... I lied!',
'You want to be a farmer? Here\'s a couple of acres', 'You want to be a farmer? Here\'s a couple of acres',
'Now, this is the plan. Get your ass to Mars.', 'Now, this is the plan. Get your ass to Mars.',
'I just had a terrible thought... What if this is a dream?' 'I just had a terrible thought... What if this is a dream?',
'Well, listen to this one: Rubber baby buggy bumpers!',
'Take your toy back to the carpet!',
'My name is John Kimble... And I love my car.',
'I eat Green Berets for breakfast.',
'Put that cookie down! NOW!'
] ]
return random.choice(quote_list) return random.choice(quote_list)