Skip to content
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

Merged
merged 3 commits into from Feb 5, 2017
Merged

feeds: include videos in feeds #238

merged 3 commits into from Feb 5, 2017

Conversation

@jasuarez
Copy link
Contributor

@jasuarez jasuarez commented Feb 1, 2017

Include videos when generating the feeds, besides the images.

Also, both for videos and for images without EXIF, use file modification
time.

@jasuarez jasuarez force-pushed the jasuarez:feed-videos branch from 7cc4431 to 460c468 Feb 1, 2017
self.src_filename = filename
self.date = self._get_file_date() or None

This comment has been minimized.

@saimn

saimn Feb 1, 2017
Owner

_get_file_date should always return a date, so the or None seems useless (and the same above).

This comment has been minimized.

@jasuarez

jasuarez Feb 2, 2017
Author Contributor

Yes, you're right. I'll remove it.

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

This comment has been minimized.

@saimn

saimn Feb 1, 2017
Owner

You can use directly album.medias. (album.images and album.videos are the filtered versions of the first one).

This comment has been minimized.

@jasuarez

jasuarez Feb 2, 2017
Author Contributor

Cool!

@saimn
Copy link
Owner

@saimn saimn commented Feb 1, 2017

Thanks for working on this plugin @jasuarez ! I never really finished it so it is much appreciated.

jasuarez added 3 commits Feb 1, 2017
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".
@jasuarez jasuarez force-pushed the jasuarez:feed-videos branch from d7c8755 to 1374c14 Feb 2, 2017
@saimn saimn merged commit ba18664 into saimn:master Feb 5, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@saimn
Copy link
Owner

@saimn saimn commented Feb 5, 2017

Thanks @jasuarez !

@saimn saimn added this to the 1.4.0 milestone Feb 5, 2017
@jasuarez jasuarez deleted the jasuarez:feed-videos branch Feb 6, 2017
kontza pushed a commit to kontza/sigal that referenced this pull request Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants