mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Manual merge of v1.4.21 into v2
This commit is contained in:
commit
68072d8340
13 changed files with 120 additions and 16 deletions
|
@ -455,7 +455,7 @@ General optional parameters:
|
|||
data = None
|
||||
apikey = hashlib.sha224(str(random.getrandbits(256))).hexdigest()[0:32]
|
||||
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:
|
||||
data = plexpy.CONFIG.API_KEY
|
||||
else:
|
||||
|
|
|
@ -205,10 +205,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:
|
||||
|
|
|
@ -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()
|
||||
|
@ -492,6 +492,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)
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
PLEXPY_BRANCH = "master"
|
||||
PLEXPY_RELEASE_VERSION = "1.4.17"
|
||||
PLEXPY_RELEASE_VERSION = "1.4.21"
|
||||
|
|
|
@ -4632,13 +4632,18 @@ class WebInterface(object):
|
|||
'Come with me if you want to live.',
|
||||
'Who is your daddy and what does he do?',
|
||||
'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!',
|
||||
'That\'s for sleeping with my wife!',
|
||||
'Remember when I said I\'d kill you last... I lied!',
|
||||
'You want to be a farmer? Here\'s a couple of acres',
|
||||
'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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue