Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'plays': self.plays if self.plays is not None else 0,
'progress': self.progress,
'last_watched_at': to_iso8601(self.last_watched_at),
'collected_at': to_iso8601(self.collected_at),
'paused_at': to_iso8601(self.paused_at),
'ids': dict([
(key, value) for (key, value) in self.keys[1:] # NOTE: keys[0] is the (, ) identifier
])
})
if self.rating:
result['rating'] = self.rating.value
result['rated_at'] = to_iso8601(self.rating.timestamp)
return result
def to_dict(self):
result = self.to_identifier()
result.update({
'watched': 1 if self.is_watched else 0,
'collected': 1 if self.is_collected else 0,
'plays': self.plays if self.plays is not None else 0,
'progress': self.progress,
'last_watched_at': to_iso8601(self.last_watched_at),
'collected_at': to_iso8601(self.collected_at),
'paused_at': to_iso8601(self.paused_at)
})
if self.rating:
result['rating'] = self.rating.value
result['rated_at'] = to_iso8601(self.rating.timestamp)
return result
params.append(id)
# Build query
query = {}
if page:
query['page'] = page
if per_page:
query['limit'] = per_page
if start_at:
query['start_at'] = to_iso8601(start_at)
if end_at:
query['end_at'] = to_iso8601(end_at)
# Request watched history
return super(SyncHistoryInterface, self).get(
media, store, params,
query=query,
flat=True,
**kwargs
)
def to_dict(self):
result = self.to_identifier()
result['seasons'] = [
season.to_dict()
for season in self.seasons.values()
]
if self.rating:
result['rating'] = self.rating.value
result['rated_at'] = to_iso8601(self.rating.timestamp)
return result
def to_dict(self):
result = self.to_identifier()
result.update({
'ids': dict([
(key, value) for (key, value) in self.keys[1:] # NOTE: keys[0] is the season identifier
])
})
if self.rating:
result['rating'] = self.rating.value
result['rated_at'] = to_iso8601(self.rating.timestamp)
return result
def to_dict(self):
result = self.to_identifier()
result.update({
'watched': 1 if self.is_watched else 0,
'collected': 1 if self.is_collected else 0,
'plays': self.plays if self.plays is not None else 0,
'progress': self.progress,
'last_watched_at': to_iso8601(self.last_watched_at),
'collected_at': to_iso8601(self.collected_at),
'paused_at': to_iso8601(self.paused_at)
})
if self.rating:
result['rating'] = self.rating.value
result['rated_at'] = to_iso8601(self.rating.timestamp)
return result
def to_dict(self):
result = self.to_identifier()
result.update({
'title': self.title,
'watched': 1 if self.is_watched else 0,
'collected': 1 if self.is_collected else 0,
'plays': self.plays if self.plays is not None else 0,
'progress': self.progress,
'last_watched_at': to_iso8601(self.last_watched_at),
'collected_at': to_iso8601(self.collected_at),
'paused_at': to_iso8601(self.paused_at),
'ids': dict([
(key, value) for (key, value) in self.keys[1:] # NOTE: keys[0] is the (, ) identifier
])
})
if self.rating:
result['rating'] = self.rating.value
result['rated_at'] = to_iso8601(self.rating.timestamp)
return result