Compare commits

...

5 Commits

Author SHA1 Message Date
JonnyWong16
a8a676b794 v2.1.18 2018-07-27 13:53:45 -07:00
JonnyWong16
2f40850100 Fix search bar width (Fixes Tautulli/Tautulli-Issues#104) 2018-07-26 17:25:31 -07:00
JonnyWong16
f16560cb40 Fix activity progress bar showing incorrect 100% 2018-07-25 18:48:33 -07:00
JonnyWong16
ab92e48d2e Fix auto resizing textareas scrolling to the top on focus 2018-07-25 18:39:40 -07:00
JonnyWong16
ce2982d948 Skip formatting bad parameters in notification text 2018-07-25 16:23:01 -07:00
7 changed files with 36 additions and 5 deletions

View File

@@ -1,5 +1,16 @@
# Changelog
## v2.1.18 (2018-07-27)
* Monitoring:
* Fix: Progress bar on activity cards showing incorrect 100% when starting a stream.
* Notifications:
* Fix: Notification text boxes scrolling to top when inputting text.
* Change: Skip formatting invalid notification parameters instead of returning default text.
* UI:
* Fix: Padding around search bar causing the navigation bar to break on smaller screens.
## v2.1.17-beta (2018-07-22)
* Notifications:

View File

@@ -3288,7 +3288,7 @@ pre::-webkit-scrollbar-thumb {
}
}
#search_form {
width: 300px;
width: 270px;
padding: 8px 15px;
}
#search_form span.input-textbox {

View File

@@ -617,7 +617,8 @@
if ($(this).data('state') === 'playing' && $(this).data('view_offset') >= 0) {
var view_offset = parseInt($(this).data('view_offset'));
var stream_duration = parseInt($(this).data('stream_duration'));
var progress_percent = Math.min(Math.floor(view_offset / stream_duration * 100) || 100, 100);
var progress_percent = Math.floor(view_offset / stream_duration * 100);
progress_percent = (progress_percent >= 0) ? Math.min(progress_percent, 100) : 100;
$(this).width(progress_percent - 3 + '%').html(progress_percent + '%')
.attr('data-original-title', 'Stream Progress ' + progress_percent + '%')
.data('view_offset', Math.min(view_offset + 1000, stream_duration));

View File

@@ -766,9 +766,12 @@
// auto resizing textarea for custom notification message body
$('textarea[data-autoresize]').each(function () {
var modal_body = $(this).closest('.modal-body');
var offset = this.offsetHeight - this.clientHeight;
var resizeTextarea = function (el) {
var modal_offset = modal_body.scrollTop();
$(el).css('height', 'auto').css('height', el.scrollHeight + offset);
modal_body.scrollTop(modal_offset);
};
$(this).on('focus keyup input', function () { resizeTextarea(this); }).removeAttr('data-autoresize');
});

View File

@@ -811,9 +811,12 @@
// auto resizing textarea for custom notification message body
$('textarea[data-autoresize]').each(function () {
var modal_body = $(this).closest('.modal-body');
var offset = this.offsetHeight - this.clientHeight;
var resizeTextarea = function (el) {
var modal_offset = modal_body.scrollTop();
$(el).css('height', 'auto').css('height', el.scrollHeight + offset);
modal_body.scrollTop(modal_offset);
};
$(this).on('focus keyup input', function () { resizeTextarea(this); }).removeAttr('data-autoresize');
});

View File

@@ -1435,6 +1435,10 @@ def get_themoviedb_info(rating_key=None, media_type=None, themoviedb_id=None):
class CustomFormatter(Formatter):
def __init__(self, default='{{{0}}}', default_format_spec='{{{0}:{1}}}'):
self.default = default
self.default_format_spec = default_format_spec
def convert_field(self, value, conversion):
if conversion is None:
return value
@@ -1463,4 +1467,13 @@ class CustomFormatter(Formatter):
else:
return value
else:
return super(CustomFormatter, self).format_field(value, format_spec)
try:
return super(CustomFormatter, self).format_field(value, format_spec)
except ValueError:
return self.default_format_spec.format(value[1:-1], format_spec)
def get_value(self, key, args, kwargs):
if isinstance(key, basestring):
return kwargs.get(key, self.default.format(key))
else:
return super(CustomFormatter, self).get_value(key, args, kwargs)

View File

@@ -1,2 +1,2 @@
PLEXPY_BRANCH = "beta"
PLEXPY_RELEASE_VERSION = "v2.1.17-beta"
PLEXPY_BRANCH = "master"
PLEXPY_RELEASE_VERSION = "v2.1.18"