mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-30 11:38:36 -07:00
Merge branch 'dev'
This commit is contained in:
commit
683e5663e1
5 changed files with 38 additions and 24 deletions
|
@ -1,5 +1,12 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## v1.2.5 (2015-11-25)
|
||||||
|
|
||||||
|
* Add video_decision and audio_decision to notification options
|
||||||
|
* Fix IP address logging
|
||||||
|
* Fix log spam if notifications disabled
|
||||||
|
|
||||||
|
|
||||||
## v1.2.4 (2015-11-24)
|
## v1.2.4 (2015-11-24)
|
||||||
|
|
||||||
* Add filtering by media type in the history table
|
* Add filtering by media type in the history table
|
||||||
|
|
|
@ -1001,9 +1001,17 @@ available_notification_agents = sorted(notifiers.available_notification_agents()
|
||||||
<td width="150"><strong>{episode_num00}</strong></td>
|
<td width="150"><strong>{episode_num00}</strong></td>
|
||||||
<td>The two digit episode number.</td>
|
<td>The two digit episode number.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="150"><strong>{video_decision}</strong></td>
|
||||||
|
<td>The video transcode decisions for the media item.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="150"><strong>{audio_decision}</strong></td>
|
||||||
|
<td>The audio transcode decisions for the media item.</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="150"><strong>{transcode_decision}</strong></td>
|
<td width="150"><strong>{transcode_decision}</strong></td>
|
||||||
<td>The transcode decisions for the media item.</td>
|
<td>The stream transcode decisions for the media item.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="150"><strong>{year}</strong></td>
|
<td width="150"><strong>{year}</strong></td>
|
||||||
|
|
|
@ -39,7 +39,6 @@ class ActivityProcessor(object):
|
||||||
'parent_title': session['parent_title'],
|
'parent_title': session['parent_title'],
|
||||||
'grandparent_title': session['grandparent_title'],
|
'grandparent_title': session['grandparent_title'],
|
||||||
'friendly_name': session['friendly_name'],
|
'friendly_name': session['friendly_name'],
|
||||||
'ip_address': session['ip_address'],
|
|
||||||
'player': session['player'],
|
'player': session['player'],
|
||||||
'platform': session['platform'],
|
'platform': session['platform'],
|
||||||
'parent_rating_key': session['parent_rating_key'],
|
'parent_rating_key': session['parent_rating_key'],
|
||||||
|
@ -78,20 +77,19 @@ class ActivityProcessor(object):
|
||||||
threading.Thread(target=notification_handler.notify,
|
threading.Thread(target=notification_handler.notify,
|
||||||
kwargs=dict(stream_data=values, notify_action='play')).start()
|
kwargs=dict(stream_data=values, notify_action='play')).start()
|
||||||
|
|
||||||
|
# If it's our first write then time stamp it.
|
||||||
started = int(time.time())
|
started = int(time.time())
|
||||||
timestamp = {'started': started}
|
timestamp = {'started': started}
|
||||||
|
self.db.upsert('sessions', timestamp, keys)
|
||||||
|
|
||||||
|
ip_address = {'ip_address': session['ip_address']}
|
||||||
# Try and grab IP address from logs (fallback if not on PMS 0.9.14 and above)
|
# Try and grab IP address from logs (fallback if not on PMS 0.9.14 and above)
|
||||||
if not session['ip_address']:
|
if not session['ip_address']:
|
||||||
if plexpy.CONFIG.IP_LOGGING_ENABLE and plexpy.CONFIG.PMS_LOGS_FOLDER:
|
if plexpy.CONFIG.IP_LOGGING_ENABLE and plexpy.CONFIG.PMS_LOGS_FOLDER:
|
||||||
ip_address = self.find_session_ip(rating_key=session['rating_key'],
|
ip_address = self.find_session_ip(rating_key=session['rating_key'],
|
||||||
machine_id=session['machine_id'])
|
machine_id=session['machine_id'])
|
||||||
timestamp.update({'ip_address': ip_address})
|
ip_address = {'ip_address': ip_address}
|
||||||
else:
|
self.db.upsert('sessions', ip_address, keys)
|
||||||
timestamp.update({'ip_address': None})
|
|
||||||
|
|
||||||
# If it's our first write then time stamp it.
|
|
||||||
self.db.upsert('sessions', timestamp, keys)
|
|
||||||
|
|
||||||
def write_session_history(self, session=None, import_metadata=None, is_import=False, import_ignore_interval=0):
|
def write_session_history(self, session=None, import_metadata=None, is_import=False, import_ignore_interval=0):
|
||||||
from plexpy import users
|
from plexpy import users
|
||||||
|
|
|
@ -161,7 +161,7 @@ def notify(stream_data=None, notify_action=None):
|
||||||
elif stream_data['media_type'] == 'clip':
|
elif stream_data['media_type'] == 'clip':
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
logger.debug(u"PlexPy Notifier :: Notify called with unsupported media type.")
|
#logger.debug(u"PlexPy Notifier :: Notify called with unsupported media type.")
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
logger.debug(u"PlexPy Notifier :: Notify called but incomplete data received.")
|
logger.debug(u"PlexPy Notifier :: Notify called but incomplete data received.")
|
||||||
|
@ -370,6 +370,8 @@ def build_notify_text(session=None, timeline=None, state=None):
|
||||||
duration = helpers.convert_milliseconds_to_minutes(metadata['duration'])
|
duration = helpers.convert_milliseconds_to_minutes(metadata['duration'])
|
||||||
|
|
||||||
# Default values
|
# Default values
|
||||||
|
video_decision = ''
|
||||||
|
audio_decision = ''
|
||||||
transcode_decision = ''
|
transcode_decision = ''
|
||||||
stream_duration = 0
|
stream_duration = 0
|
||||||
view_offset = 0
|
view_offset = 0
|
||||||
|
@ -381,18 +383,15 @@ def build_notify_text(session=None, timeline=None, state=None):
|
||||||
# Session values
|
# Session values
|
||||||
if session:
|
if session:
|
||||||
# Generate a combined transcode decision value
|
# Generate a combined transcode decision value
|
||||||
if session['video_decision']:
|
video_decision = session['video_decision'].title()
|
||||||
if session['video_decision'] == 'transcode':
|
audio_decision = session['audio_decision'].title()
|
||||||
transcode_decision = 'Transcode'
|
|
||||||
elif session['video_decision'] == 'copy' or session['audio_decision'] == 'copy':
|
if session['video_decision'] == 'transcode' or session['audio_decision'] == 'transcode':
|
||||||
transcode_decision = 'Direct Stream'
|
transcode_decision = 'Transcode'
|
||||||
else:
|
elif session['video_decision'] == 'copy' or session['audio_decision'] == 'copy':
|
||||||
transcode_decision = 'Direct Play'
|
transcode_decision = 'Direct Stream'
|
||||||
elif session['audio_decision']:
|
else:
|
||||||
if session['audio_decision'] == 'transcode':
|
transcode_decision = 'Direct Play'
|
||||||
transcode_decision = 'Transcode'
|
|
||||||
else:
|
|
||||||
transcode_decision = 'Direct Play'
|
|
||||||
|
|
||||||
if state != 'play':
|
if state != 'play':
|
||||||
if session['paused_counter']:
|
if session['paused_counter']:
|
||||||
|
@ -422,10 +421,12 @@ def build_notify_text(session=None, timeline=None, state=None):
|
||||||
'artist_name': metadata['grandparent_title'],
|
'artist_name': metadata['grandparent_title'],
|
||||||
'album_name': metadata['parent_title'],
|
'album_name': metadata['parent_title'],
|
||||||
'track_name': metadata['title'],
|
'track_name': metadata['title'],
|
||||||
'season_num': metadata['parent_index'],
|
'season_num': metadata['parent_index'].zfill(1),
|
||||||
'season_num00': metadata['parent_index'].zfill(2),
|
'season_num00': metadata['parent_index'].zfill(2),
|
||||||
'episode_num': metadata['index'],
|
'episode_num': metadata['index'].zfill(1),
|
||||||
'episode_num00': metadata['index'].zfill(2),
|
'episode_num00': metadata['index'].zfill(2),
|
||||||
|
'video_decision': video_decision,
|
||||||
|
'audio_decision': audio_decision,
|
||||||
'transcode_decision': transcode_decision,
|
'transcode_decision': transcode_decision,
|
||||||
'year': metadata['year'],
|
'year': metadata['year'],
|
||||||
'studio': metadata['studio'],
|
'studio': metadata['studio'],
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
PLEXPY_VERSION = "master"
|
PLEXPY_VERSION = "master"
|
||||||
PLEXPY_RELEASE_VERSION = "1.2.4"
|
PLEXPY_RELEASE_VERSION = "1.2.5"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue