Skip to content

Commit

Permalink
Added Guid.construct() method
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzeman committed Feb 24, 2016
1 parent 5370f5d commit 43b4c6e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions plex_metadata/guid.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ def sid(self):
# `sid` property always returns strings
return str(self.id)

@classmethod
def construct(cls, service, id, extra=None):
result = cls(id, extra)
result.service = service
result.id = id

return result

@classmethod
def parse(cls, guid, match=True, media=None, strict=False):
if not guid:
Expand Down

0 comments on commit 43b4c6e

Please sign in to comment.