Exemple #1
0
 def to_front_dict(self) -> dict:
     base = super(CatchupStream, self).to_front_dict()
     start_utc = date_to_utc_msec(self.start)
     stop_utc = date_to_utc_msec(self.stop)
     base[CatchupsFields.START_RECORD_FIELD] = start_utc
     base[CatchupsFields.STOP_RECORD_FIELD] = stop_utc
     return base
 def to_dict(self) -> dict:
     return {
         Device.ID_FIELD: self.get_id(),
         Device.NAME_FIELD: self.name,
         Device.STATUS_FIELD: self.status,
         Device.CREATED_DATE_FIELD: date_to_utc_msec(self.created_date)
     }
Exemple #3
0
 def to_dict(stream: VodBasedStream) -> dict:
     return {
         VodFields.DESCRIPTION_FIELD: stream.description,
         VodFields.TRAILER_URL_FIELD: stream.trailer_url,
         VodFields.USER_SCORE_FIELD: stream.user_score,
         VodFields.PRIME_DATE_FIELD: date_to_utc_msec(stream.prime_date),
         VodFields.COUNTRY_FIELD: stream.country,
         VodFields.DURATION_FIELD: stream.duration
     }
 def synctime(self):
     if not self._sync_time:
         return None
     return date_to_utc_msec(self._sync_time)
Exemple #5
0
 def synctime(self):
     return date_to_utc_msec(self._sync_time)
Exemple #6
0
 def synctime(self):
     if self._sync_time == Service.CALCULATE_VALUE:
         return Service.CALCULATE_VALUE
     return date_to_utc_msec(self._sync_time)
 def expiration_date_utc_msec(self):
     return date_to_utc_msec(self.exp_date)
 def created_date_utc_msec(self):
     return date_to_utc_msec(self.created_date)
 def to_front_dict(self):
     res = self.sid.to_front_dict()
     res[UserStream.FAVORITE_FIELD] = self.favorite
     res[UserStream.PRIVATE_FIELD] = self.private
     res[UserStream.RECENT_FIELD] = date_to_utc_msec(self.recent)
     return res