Fix Unsplash POTD not updating
ClosedPublic

Authored by guoyunhe on Aug 4 2019, 12:49 PM.

Details

Summary

The bug only affect Unsplash POTD provider. If you choose Unsplash POTD, the wallpaper won't update daily.

Previous patch for Unsplash Wallpapers changed the identifier format, for example, unsplash:123456 is not a fixed date identifier. So we can not simply detect whether an identifier contains date by looking for :. This patch detect date string with regular expression.

Diff Detail

Repository
R114 Plasma Addons
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
guoyunhe created this revision.Aug 4 2019, 12:49 PM
Restricted Application added a project: Plasma. · View Herald TranscriptAug 4 2019, 12:49 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
guoyunhe requested review of this revision.Aug 4 2019, 12:49 PM
guoyunhe edited the summary of this revision. (Show Details)Aug 4 2019, 12:52 PM
ngraham added a subscriber: ngraham.Aug 4 2019, 2:26 PM

Have you tested to make sure this doesn't break other providers?

Have you tested to make sure this doesn't break other providers?

I need several days to test because it only change once a day... (changing local time won't work)

This is not working. Unsplash wallpapers still don't update daily. I need further debugging.

guoyunhe updated this revision to Diff 63300.Aug 7 2019, 4:53 PM
guoyunhe edited the summary of this revision. (Show Details)

Fix CacheProvider's cache validation function

guoyunhe updated this revision to Diff 63301.Aug 7 2019, 4:55 PM

Add import

It works now. Tested with several different POTD providers.

Great, I'll test for a few days as well. The code looks sane.

ngraham retitled this revision from Fix POTD doesn't update to Fix Unsplash POTD not updating.Aug 8 2019, 5:47 PM
ngraham accepted this revision.Aug 9 2019, 12:43 PM

Got a new image now. LGTM.

This revision is now accepted and ready to land.Aug 9 2019, 12:43 PM
Closed by commit R114:2e0ddd4cb3d1: Fix Unsplash POTD not updating (authored by Guo Yunhe <i@guoyunhe.me>). · Explain WhyAug 9 2019, 2:59 PM
This revision was automatically updated to reflect the committed changes.