diff --git a/echo360/downloader.py b/echo360/downloader.py index 3ab2460..1a9d450 100644 --- a/echo360/downloader.py +++ b/echo360/downloader.py @@ -184,7 +184,7 @@ def download_all(self): videos_to_be_download = [] for video in reversed(filtered_videos): # reverse so we download newest first lecture_number = self._find_pos(videos, video) - title = "Lecture {}".format(lecture_number + 1) + title = "Lecture {} [{}]".format(lecture_number + 1, video.title) filename = self._get_filename(self._course.course_id, video.date, title) videos_to_be_download.append((filename, video)) diff --git a/echo360/videos.py b/echo360/videos.py index be90823..76f89a5 100644 --- a/echo360/videos.py +++ b/echo360/videos.py @@ -63,6 +63,8 @@ def __init__(self, video_json, driver): date = dateutil.parser.parse(video_json["startTime"]).date() self._date = date.strftime("%Y-%m-%d") + self._title = video_json['title'] + except KeyError as e: self._blow_up("Unable to parse video data from JSON (course_data)", e) @@ -103,6 +105,10 @@ def date(self): def url(self): return self._url + @property + def title(self): + return self._title + @staticmethod def get_date(video_json): try: