Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5417747473 | ||
![]() |
cf6847d777 | ||
![]() |
464fa1f8a3 | ||
![]() |
665a6435ef | ||
![]() |
2d64ba4a0e | ||
![]() |
006c778dca | ||
![]() |
bd636b756b | ||
![]() |
d21b74f231 | ||
![]() |
4354f72578 | ||
![]() |
f5ca522e6c | ||
![]() |
8a556a50ab | ||
![]() |
532ff59dfe | ||
![]() |
ec685407bb | ||
![]() |
be9a1dcf06 | ||
![]() |
1f7e8b4d9a | ||
![]() |
b3da08ce74 | ||
![]() |
50753db4ff | ||
![]() |
b3fe6145e2 |
20
CHANGELOG.md
20
CHANGELOG.md
@@ -1,5 +1,25 @@
|
||||
# Changelog
|
||||
|
||||
## v1.4.24 (2017-10-01)
|
||||
|
||||
* Fix: New Plex Web urls. (Thanks @Joshua1337)
|
||||
* Fix: Fallback to the product name if the player title is blank.
|
||||
* New: Added no forking option to startup arguments. (Thanks @Vashypooh)
|
||||
|
||||
|
||||
## v1.4.23 (2017-09-30)
|
||||
|
||||
* Fix: Playstation 4 platform name.
|
||||
* Fix: PlexWatch and Plexivity import.
|
||||
* Fix: Pushbullet authorization header.
|
||||
|
||||
|
||||
## v1.4.22 (2017-08-19)
|
||||
|
||||
* Fix: Cleaning up of old config backups.
|
||||
* Fix: Temporary fix for incorrect source media info.
|
||||
|
||||
|
||||
## v1.4.21 (2017-07-01)
|
||||
|
||||
* New: Updated donation methods.
|
||||
|
@@ -92,7 +92,9 @@ def main():
|
||||
'--nolaunch', action='store_true', help='Prevent browser from launching on startup')
|
||||
parser.add_argument(
|
||||
'--pidfile', help='Create a pid file (only relevant when running as a daemon)')
|
||||
|
||||
parser.add_argument(
|
||||
'--nofork', action='store_true', help='Start PlexPy as a service, do not fork when restarting')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.verbose:
|
||||
@@ -116,6 +118,10 @@ def main():
|
||||
plexpy.DAEMON = True
|
||||
plexpy.QUIET = True
|
||||
|
||||
if args.nofork:
|
||||
plexpy.NOFORK = True
|
||||
logger.info("PlexPy is running as a service, it will not fork when restarted.")
|
||||
|
||||
if args.pidfile:
|
||||
plexpy.PIDFILE = str(args.pidfile)
|
||||
|
||||
|
@@ -326,9 +326,10 @@
|
||||
<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>
|
||||
<li><a href="#crypto-donation" role="tab" data-toggle="tab" class="crypto-donation" data-coin="bitcoin" data-name="Bitcoin" data-address="3FdfJAyNWU15Sf11U9FTgPHuP1hPz32eEN">Bitcoin</a></li>
|
||||
<li><a href="#crypto-donation" role="tab" data-toggle="tab" class="crypto-donation" data-coin="bitcoincash" data-name="Bitcoin Cash" data-address="1H2atabxAQGaFAWYQEiLkXKSnK9CZZvt2n">Bitcoin Cash</a></li>
|
||||
<li><a href="#crypto-donation" role="tab" data-toggle="tab" class="crypto-donation" data-coin="ethereum" data-name="Ethereum" data-address="0x77ae4c2b8de1a1ccfa93553db39971da58c873d3">Ethereum</a></li>
|
||||
<li><a href="#crypto-donation" role="tab" data-toggle="tab" class="crypto-donation" data-coin="litecoin" data-name="Litecoin" data-address="LWpPmUqQYHBhMV83XSCsHzPmKLhJt6r57J">Litecoin</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane active" id="paypal-donation" style="text-align: center">
|
||||
@@ -414,12 +415,13 @@ ${next.headerIncludes()}
|
||||
});
|
||||
|
||||
$('#donation_type a.crypto-donation').on('shown.bs.tab', function () {
|
||||
var crypto_type = $(this).data('coin');
|
||||
var crypto_coin = $(this).data('coin');
|
||||
var crypto_name = $(this).data('name');
|
||||
var crypto_address = $(this).data('address')
|
||||
$('#crypto_qr_code').empty().qrcode({
|
||||
text: crypto_type + ":" + crypto_address
|
||||
text: crypto_coin + ":" + crypto_address
|
||||
});
|
||||
$('#crypto_type_label').html(crypto_type);
|
||||
$('#crypto_type_label').html(crypto_name);
|
||||
$('#crypto_address').html(crypto_address);
|
||||
});
|
||||
% endif
|
||||
|
@@ -115,9 +115,9 @@ DOCUMENTATION :: END
|
||||
<div class="col-md-9">
|
||||
<div class="summary-content-poster hidden-xs hidden-sm">
|
||||
% if data['media_type'] == 'track':
|
||||
<a href="https://app.plex.tv/web/app#!/server/${config['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${data['parent_rating_key']}" target="_blank" title="View in Plex Web">
|
||||
<a href="https://app.plex.tv/desktop#!/server/${config['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${data['parent_rating_key']}" target="_blank" title="View in Plex Web">
|
||||
% else:
|
||||
<a href="https://app.plex.tv/web/app#!/server/${config['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${data['rating_key']}" target="_blank" title="View in Plex Web">
|
||||
<a href="https://app.plex.tv/desktop#!/server/${config['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${data['rating_key']}" target="_blank" title="View in Plex Web">
|
||||
% endif
|
||||
% if data['media_type'] == 'episode':
|
||||
<div class="summary-poster-face-episode" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=500&height=280&fallback=art);">
|
||||
|
@@ -258,6 +258,8 @@ function getPlatformImagePath(platformName) {
|
||||
return 'images/platforms/pmp.png';
|
||||
} else if (platformName.indexOf("PlexTogether") > -1) {
|
||||
return 'images/platforms/plextogether.png';
|
||||
} else if (platformName.indexOf("Linux") > -1) {
|
||||
return 'images/platforms/linux.png';
|
||||
} else {
|
||||
return 'images/platforms/default.png';
|
||||
}
|
||||
@@ -467,4 +469,4 @@ function humanFileSize(bytes, si) {
|
||||
++u;
|
||||
} while (Math.abs(bytes) >= thresh && u < units.length - 1);
|
||||
return bytes.toFixed(1) + ' ' + units[u];
|
||||
}
|
||||
}
|
||||
|
@@ -54,6 +54,7 @@ VERBOSE = True
|
||||
DAEMON = False
|
||||
CREATEPID = False
|
||||
PIDFILE = None
|
||||
NOFORK = False
|
||||
|
||||
SCHED = BackgroundScheduler()
|
||||
SCHED_LOCK = threading.Lock()
|
||||
@@ -989,13 +990,16 @@ def shutdown(restart=False, update=False):
|
||||
args += ARGS
|
||||
if '--nolaunch' not in args:
|
||||
args += ['--nolaunch']
|
||||
logger.info('Restarting PlexPy with %s', args)
|
||||
|
||||
# os.execv fails with spaced names on Windows
|
||||
# https://bugs.python.org/issue19066
|
||||
if os.name == 'nt':
|
||||
if NOFORK:
|
||||
logger.info('Running as service, not forking. Exiting...')
|
||||
elif os.name == 'nt':
|
||||
logger.info('Restarting PlexPy with %s', args)
|
||||
subprocess.Popen(args, cwd=os.getcwd())
|
||||
else:
|
||||
logger.info('Restarting PlexPy with %s', args)
|
||||
os.execv(exe, args)
|
||||
|
||||
os._exit(0)
|
||||
|
@@ -220,7 +220,7 @@ class ActivityProcessor(object):
|
||||
if not is_import:
|
||||
logger.debug(u"PlexPy ActivityProcessor :: Fetching metadata for item ratingKey %s" % session['rating_key'])
|
||||
pms_connect = pmsconnect.PmsConnect()
|
||||
result = pms_connect.get_metadata_details(rating_key=str(session['rating_key']))
|
||||
result = pms_connect.get_metadata_details(rating_key=str(session['rating_key']), get_media_info=True)
|
||||
if result and result['metadata']:
|
||||
metadata = result['metadata']
|
||||
else:
|
||||
@@ -293,10 +293,10 @@ class ActivityProcessor(object):
|
||||
'(last_insert_rowid(), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'
|
||||
|
||||
args = [session['rating_key'], session['video_decision'], session['audio_decision'],
|
||||
session['duration'], session['width'], session['height'], session['container'],
|
||||
session['video_codec'], session['audio_codec'], session['bitrate'],
|
||||
session['video_resolution'], session['video_framerate'], session['aspect_ratio'],
|
||||
session['audio_channels'], session['transcode_protocol'], session['transcode_container'],
|
||||
metadata['duration'], metadata['width'], metadata['height'], metadata['container'],
|
||||
metadata['video_codec'], metadata['audio_codec'], metadata['bitrate'],
|
||||
metadata['video_resolution'], metadata['video_framerate'], metadata['aspect_ratio'],
|
||||
metadata['audio_channels'], session['transcode_protocol'], session['transcode_container'],
|
||||
session['transcode_video_codec'], session['transcode_audio_codec'],
|
||||
session['transcode_audio_channels'], session['transcode_width'], session['transcode_height'],
|
||||
session['transcode_decision']]
|
||||
|
@@ -39,7 +39,8 @@ DEFAULT_ART = "interfaces/default/images/art.png"
|
||||
PLATFORM_NAME_OVERRIDES = {'Konvergo': 'Plex Media Player',
|
||||
'Mystery 3': 'Playstation 3',
|
||||
'Mystery 4': 'Playstation 4',
|
||||
'Mystery 5': 'Xbox 360'
|
||||
'Mystery 5': 'Xbox 360',
|
||||
'WebMAF': 'Playstation 4'
|
||||
}
|
||||
|
||||
PMS_PLATFORM_NAME_OVERRIDES = {'MacOSX': 'Mac'
|
||||
|
@@ -17,6 +17,7 @@ import arrow
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import time
|
||||
|
||||
from configobj import ConfigObj
|
||||
|
||||
@@ -610,7 +611,7 @@ def make_backup(cleanup=False, scheduler=False):
|
||||
|
||||
if cleanup:
|
||||
now = time.time()
|
||||
# Delete all scheduled backup files except from the last 5.
|
||||
# Delete all scheduled backup older than BACKUP_DAYS.
|
||||
for root, dirs, files in os.walk(backup_folder):
|
||||
ini_files = [os.path.join(root, f) for f in files if f.endswith('.sched.ini')]
|
||||
for file_ in ini_files:
|
||||
|
@@ -666,7 +666,7 @@ def build_notify_text(session=None, timeline=None, notify_action=None, agent_id=
|
||||
remaining_duration = duration - view_offset
|
||||
|
||||
# Build Plex URL
|
||||
metadata['plex_url'] = 'https://app.plex.tv/web/app#!/server/{0}/details?key=%2Flibrary%2Fmetadata%2F{1}'.format(
|
||||
metadata['plex_url'] = 'https://app.plex.tv/desktop#!/server/{0}/details?key=%2Flibrary%2Fmetadata%2F{1}'.format(
|
||||
plexpy.CONFIG.PMS_IDENTIFIER, str(rating_key))
|
||||
|
||||
# Get media IDs from guid and build URLs
|
||||
|
@@ -1123,7 +1123,7 @@ class PUSHBULLET(object):
|
||||
http_handler.request("POST",
|
||||
"/v2/pushes",
|
||||
headers={'Content-type': "application/json",
|
||||
'Authorization': 'Basic %s' % base64.b64encode(self.apikey + ":")},
|
||||
'Access-Token': self.apikey},
|
||||
body=json.dumps(data))
|
||||
|
||||
response = http_handler.getresponse()
|
||||
@@ -1155,7 +1155,7 @@ class PUSHBULLET(object):
|
||||
http_handler = HTTPSConnection("api.pushbullet.com")
|
||||
http_handler.request("GET", "/v2/devices",
|
||||
headers={'Content-type': "application/json",
|
||||
'Authorization': 'Basic %s' % base64.b64encode(self.apikey + ":")})
|
||||
'Access-Token': self.apikey})
|
||||
|
||||
response = http_handler.getresponse()
|
||||
request_status = response.status
|
||||
|
@@ -414,7 +414,17 @@ def import_from_plexivity(database=None, table_name=None, import_ignore_interval
|
||||
'genres': extracted_xml['genres'],
|
||||
'studio': extracted_xml['studio'],
|
||||
'labels': extracted_xml['labels'],
|
||||
'full_title': row['full_title']
|
||||
'full_title': row['full_title'],
|
||||
'width': extracted_xml['width'],
|
||||
'height': extracted_xml['height'],
|
||||
'container': extracted_xml['container'],
|
||||
'video_codec': extracted_xml['video_codec'],
|
||||
'audio_codec': extracted_xml['audio_codec'],
|
||||
'bitrate': extracted_xml['bitrate'],
|
||||
'video_resolution': extracted_xml['video_resolution'],
|
||||
'video_framerate': extracted_xml['video_framerate'],
|
||||
'aspect_ratio': extracted_xml['aspect_ratio'],
|
||||
'audio_channels': extracted_xml['audio_channels']
|
||||
}
|
||||
|
||||
# On older versions of PMS, "clip" items were still classified as "movie" and had bad ratingKey values
|
||||
|
@@ -407,7 +407,17 @@ def import_from_plexwatch(database=None, table_name=None, import_ignore_interval
|
||||
'genres': extracted_xml['genres'],
|
||||
'studio': extracted_xml['studio'],
|
||||
'labels': extracted_xml['labels'],
|
||||
'full_title': row['full_title']
|
||||
'full_title': row['full_title'],
|
||||
'width': extracted_xml['width'],
|
||||
'height': extracted_xml['height'],
|
||||
'container': extracted_xml['container'],
|
||||
'video_codec': extracted_xml['video_codec'],
|
||||
'audio_codec': extracted_xml['audio_codec'],
|
||||
'bitrate': extracted_xml['bitrate'],
|
||||
'video_resolution': extracted_xml['video_resolution'],
|
||||
'video_framerate': extracted_xml['video_framerate'],
|
||||
'aspect_ratio': extracted_xml['aspect_ratio'],
|
||||
'audio_channels': extracted_xml['audio_channels']
|
||||
}
|
||||
|
||||
# On older versions of PMS, "clip" items were still classified as "movie" and had bad ratingKey values
|
||||
|
@@ -881,6 +881,9 @@ class PmsConnect(object):
|
||||
'video_framerate': helpers.get_xml_attr(media, 'videoFrameRate'),
|
||||
'audio_codec': helpers.get_xml_attr(media, 'audioCodec'),
|
||||
'audio_channels': helpers.get_xml_attr(media, 'audioChannels'),
|
||||
'aspect_ratio': helpers.get_xml_attr(media, 'aspectRatio'),
|
||||
'width': helpers.get_xml_attr(media, 'width'),
|
||||
'height': helpers.get_xml_attr(media, 'height'),
|
||||
'file': helpers.get_xml_attr(media.getElementsByTagName('Part')[0], 'file'),
|
||||
'file_size': helpers.get_xml_attr(media.getElementsByTagName('Part')[0], 'size'),
|
||||
}
|
||||
@@ -1112,7 +1115,8 @@ class PmsConnect(object):
|
||||
'friendly_name': user_details['friendly_name'],
|
||||
'user_thumb': user_details['user_thumb'],
|
||||
'ip_address': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'address').split('::ffff:')[-1],
|
||||
'player': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'title'),
|
||||
'player': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'title')
|
||||
or helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'product'),
|
||||
'platform': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'platform'),
|
||||
'machine_id': machine_id,
|
||||
'state': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'state'),
|
||||
@@ -1255,7 +1259,8 @@ class PmsConnect(object):
|
||||
'friendly_name': user_details['friendly_name'],
|
||||
'user_thumb': user_details['user_thumb'],
|
||||
'ip_address': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'address').split('::ffff:')[-1],
|
||||
'player': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'title'),
|
||||
'player': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'title')
|
||||
or helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'product'),
|
||||
'platform': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'platform'),
|
||||
'machine_id': machine_id,
|
||||
'state': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'state'),
|
||||
@@ -1319,7 +1324,8 @@ class PmsConnect(object):
|
||||
'friendly_name': user_details['friendly_name'],
|
||||
'user_thumb': user_details['user_thumb'],
|
||||
'ip_address': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'address').split('::ffff:')[-1],
|
||||
'player': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'title'),
|
||||
'player': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'title')
|
||||
or helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'product'),
|
||||
'platform': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'platform'),
|
||||
'machine_id': machine_id,
|
||||
'state': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'state'),
|
||||
@@ -1382,7 +1388,8 @@ class PmsConnect(object):
|
||||
'friendly_name': user_details['friendly_name'],
|
||||
'user_thumb': user_details['user_thumb'],
|
||||
'ip_address': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'address').split('::ffff:')[-1],
|
||||
'player': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'title'),
|
||||
'player': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'title')
|
||||
or helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'product'),
|
||||
'platform': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'platform'),
|
||||
'machine_id': machine_id,
|
||||
'state': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'state'),
|
||||
@@ -1488,7 +1495,8 @@ class PmsConnect(object):
|
||||
'friendly_name': user_details['friendly_name'],
|
||||
'user_thumb': user_details['user_thumb'],
|
||||
'ip_address': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'address').split('::ffff:')[-1],
|
||||
'player': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'title'),
|
||||
'player': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'title')
|
||||
or helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'product'),
|
||||
'platform': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'platform'),
|
||||
'machine_id': machine_id,
|
||||
'state': helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'state'),
|
||||
|
@@ -1,2 +1,2 @@
|
||||
PLEXPY_VERSION = "master"
|
||||
PLEXPY_RELEASE_VERSION = "1.4.21"
|
||||
PLEXPY_RELEASE_VERSION = "1.4.24"
|
||||
|
Reference in New Issue
Block a user