def __init__(self, assets, parent):
    super(InternUdemyLectureAssets, self).__init__(parent)
    self._mediatype = assets.get('type')
    self._extension = assets.get('extension')
    title = assets.get('title', '')
    if (not title):
        title = assets.get('filename')
    if (title and title.endswith(self._extension)):
        ok = ('{0:03d} '.format(parent._lecture_index) + title)
        self._filename = ok
    else:
        ok = ('{0:03d} '.format(parent._lecture_index) + assets.get('filename'))
        self._filename = ok
    self._url = assets.get('download_url')
def __init__(self, assets, parent):
    super(InternUdemyLectureAssets, self).__init__(parent)
    self._mediatype = assets.get('type')
    self._extension = assets.get('extension')
    title = assets.get('title', )
    if (not title):
        title = assets.get('filename')
    if (title and title.endswith(self._extension)):
        ok = ('{0:03d} '.format(parent._lecture_index) + title)
        self._filename = ok
    else:
        ok = ('{0:03d} '.format(parent._lecture_index) + assets.get('filename'))
        self._filename = ok
    self._url = assets.get('download_url')