Merge pull request #949 from croneter/unicode

Add unicode representation to Playlist() class
This commit is contained in:
croneter 2019-08-02 10:49:56 +02:00 committed by GitHub
commit 46830d29a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,7 +63,7 @@ class Playlist(object):
self.kodi_type = None
self.kodi_hash = None
def __repr__(self):
def __unicode__(self):
return ("{{"
"'plex_id': {self.plex_id}, "
"'plex_name': '{self.plex_name}', "
@ -74,6 +74,9 @@ class Playlist(object):
"'kodi_hash': '{self.kodi_hash}'"
"}}").format(self=self)
def __repr__(self):
return self.__unicode__().encode('utf-8')
def __str__(self):
return self.__repr__()