Skip to content
This repository has been archived by the owner on May 5, 2020. It is now read-only.

Commit

Permalink
Add platform and publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
Cruel committed Jun 23, 2016
1 parent cab5318 commit 205a061
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion TitleInfo.py
Expand Up @@ -27,6 +27,8 @@ def __init__(self, id, uid = None):
self.vote_count = 0
self.release_date = None
self.product_code = None
self.platform = None
self.publisher = None

self.icon = None
self.logger = logging.getLogger()
Expand All @@ -47,7 +49,7 @@ def to_array(self):
return [self.name, self.name_normalized, self.uid, self.regions,
self.country_code, self.size, self.icon_index, self.seed, self.genres,
self.languages, self.features, self.vote_score, self.vote_count,
self.release_date, self.product_code]
self.release_date, self.product_code, self.platform, self.publisher]


@staticmethod
Expand Down Expand Up @@ -159,6 +161,10 @@ def fetch_data(self):
except:
self.logger.warn("No icon for title {} {}".format(self.id, self.name))

# Get platform and publisher
self.platform = int(xml.find("*/platform").attrib['id'])
self.publisher = int(xml.find("*/publisher").attrib['id'])

# Get genres
genres = xml.find("*/genres")
if genres:
Expand Down

0 comments on commit 205a061

Please sign in to comment.