Skip to content

Commit

Permalink
Fixed issue when playing media extras
Browse files Browse the repository at this point in the history
  • Loading branch information
zSeriesGuy committed Sep 11, 2020
1 parent c3f896f commit 37281b5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 16 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## v4.1.02 (2020-09-11)
* (FIXED) Issue when playing media extras.

## v4.1.01 (2020-07-27)
* (FIXED) Issue with configuration update with keyword args after adding multi-account support.

Expand Down
2 changes: 1 addition & 1 deletion plexpy/activity_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def get_live_session(self):
if int(session['session_key']) == self.get_session_key():
# Live sessions don't have rating keys in sessions
# Get it from the websocket data
if not session['rating_key']:
if 'rating_key' not in session:
session['rating_key'] = self.get_rating_key()
return session

Expand Down
22 changes: 8 additions & 14 deletions plexpy/servers.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ def __iter__(self):
for server in self.servers:
yield server

def __getattr__(self, key):
return getattr(self, key)

def __setattr__(self, key, value):
vars(self)[key] = value

Expand Down Expand Up @@ -1308,18 +1305,15 @@ def get_metadata_details(self, rating_key='', sync_id='', cache_key=None, media_

section_id = helpers.get_xml_attr(a, 'librarySectionID')
library_name = helpers.get_xml_attr(a, 'librarySectionTitle')
library_id = ''

query = 'SELECT id FROM library_sections ' \
'WHERE server_id = ? and section_id = ?'
monitor_db = database.MonitorDatabase()

for x in range(2):
result = monitor_db.select_single(query, args=[self.CONFIG.ID, int(section_id)])
if result:
library_id = result['id']
break
else:
self.refresh_libraries()
if section_id.isdigit():
for x in range(2):
library_id = libraries.get_section_index(server_id=self.CONFIG.ID, section_id=section_id)
if library_id:
break
else:
self.refresh_libraries()

directors = []
writers = []
Expand Down
2 changes: 1 addition & 1 deletion plexpy/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
PLEXPY_BRANCH = "master"
PLEXPY_RELEASE_VERSION = "v4.1.01"
PLEXPY_RELEASE_VERSION = "v4.1.02"

0 comments on commit 37281b5

Please sign in to comment.