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

Conversation

2 participants
@jasuarez
Contributor

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

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

Contributor

Cool!

@saimn

This comment has been minimized.

Owner

saimn commented Feb 1, 2017

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

jasuarez added some commits Feb 1, 2017

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.
feed: escape title and description
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

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@saimn

This comment has been minimized.

Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment