-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feeds: include videos in feeds #238
Conversation
sigal/gallery.py
Outdated
self.src_filename = filename | ||
self.date = self._get_file_date() or None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_get_file_date
should always return a date, so the or None
seems useless (and the same above).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you're right. I'll remove it.
sigal/plugins/feeds.py
Outdated
images.sort(key=lambda im: im.date, reverse=True) | ||
videos = [vid for album in gallery.albums.values() | ||
for vid in album.videos if vid.date is not None] | ||
medias = images + videos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use directly album.medias
. (album.images
and album.videos
are the filtered versions of the first one).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!
Thanks for working on this plugin @jasuarez ! I never really finished it so it is much appreciated. |
Include videos when generating the feeds, besides the images. Also, both for videos and for images without EXIF, use file modification time.
We need to escape them to avoid end up in titles like "today & tomorrow" instead of "today & tomorrow".
Thanks @jasuarez ! |
feeds: include videos in feeds
Include videos when generating the feeds, besides the images.
Also, both for videos and for images without EXIF, use file modification
time.