-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Flickr image URLs and video preview
- Changed from using the `farm*n*.static.flickr.com` domains to `live.staticflickr.com` domain for the URLs of Flickr-hosted images (see https://www.flickr.com/services/api/misc.urls.html ) - Fixed missing preview image for videos when viewed in lists - Added "(Video)" after the title of any Flickr videos when viewed in lists.
- Loading branch information
1 parent
576b036
commit 0d2d74c
Showing
5 changed files
with
15 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,7 +116,7 @@ def test_original_icon_url(self): | |
user = UserFactory(iconfarm=8, iconserver=7420, nsid="35034346050@N01") | ||
self.assertEqual( | ||
user.original_icon_url, | ||
"https://farm8.staticflickr.com/7420/buddyicons/[email protected]", | ||
"https://live.staticflickr.com/7420/buddyicons/[email protected]", | ||
) | ||
|
||
def test_original_icon_url_default(self): | ||
|
@@ -409,7 +409,7 @@ def test_original_url(self): | |
original_format="gif", | ||
) | ||
self.assertEqual( | ||
photo.original_url, "https://farm3.static.flickr.com/1234/4567_7777_o.gif" | ||
photo.original_url, "https://live.staticflickr.com/1234/4567_7777_o.gif" | ||
) | ||
|
||
def test_remote_original_url(self): | ||
|
@@ -424,14 +424,14 @@ def test_remote_original_url(self): | |
) | ||
self.assertEqual( | ||
photo.remote_original_url, | ||
"https://farm3.static.flickr.com/1234/4567_7777_o.gif", | ||
"https://live.staticflickr.com/1234/4567_7777_o.gif", | ||
) | ||
|
||
def test_medium_url(self): | ||
"Has a different format to most other image sizes." | ||
photo = PhotoFactory(farm=3, server="1234", flickr_id=4567, secret="9876") | ||
self.assertEqual( | ||
photo.medium_url, "https://farm3.static.flickr.com/1234/4567_9876.jpg" | ||
photo.medium_url, "https://live.staticflickr.com/1234/4567_9876.jpg" | ||
) | ||
|
||
def test_image_urls(self): | ||
|
@@ -440,7 +440,7 @@ def test_image_urls(self): | |
for size, prop in self.photo_sizes.items(): | ||
self.assertEqual( | ||
getattr(photo, prop), | ||
f"https://farm3.static.flickr.com/1234/4567_9876_{size}.jpg", | ||
f"https://live.staticflickr.com/1234/4567_9876_{size}.jpg", | ||
) | ||
|
||
def test_image_url_with_invalid_size(self): | ||
|
@@ -504,7 +504,7 @@ def test_remote_original_url(self): | |
) | ||
self.assertEqual( | ||
photo.remote_original_url, | ||
"https://farm3.static.flickr.com/1234/4567_7777_o.gif", | ||
"https://live.staticflickr.com/1234/4567_7777_o.gif", | ||
) | ||
|
||
def test_medium_url(self): | ||
|