D29140: Fix POTD in lock screen (partly)

2020-05-12 Thread Yunhe Guo
guoyunhe updated this revision to Diff 82632.
guoyunhe added a comment.


  Fix config file path

REPOSITORY
  R114 Plasma Addons

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D29140?vs=82620&id=82632

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D29140

AFFECTED FILES
  CMakeLists.txt
  dataengines/potd/PoTD-list.txt
  dataengines/potd/cachedprovider.cpp
  kdeds/CMakeLists.txt
  kdeds/potd/CMakeLists.txt
  kdeds/potd/kded_potd.cpp
  kdeds/potd/kded_potd.desktop
  kdeds/potd/kded_potd.h

To: guoyunhe, #plasma, ngraham
Cc: davidre, ngraham, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D29140: Fix POTD in lock screen (partly)

2020-05-12 Thread Yunhe Guo
guoyunhe added a comment.


  I created the kded service and it seems running. But it doesn't cache the 
image as I expected. Don't know how to debug it.

REPOSITORY
  R114 Plasma Addons

REVISION DETAIL
  https://phabricator.kde.org/D29140

To: guoyunhe, #plasma, ngraham
Cc: davidre, ngraham, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D29140: Fix POTD in lock screen (partly)

2020-05-11 Thread Yunhe Guo
guoyunhe updated this revision to Diff 82620.
guoyunhe added a comment.


  Clean up libraries

REPOSITORY
  R114 Plasma Addons

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D29140?vs=82619&id=82620

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D29140

AFFECTED FILES
  CMakeLists.txt
  dataengines/potd/PoTD-list.txt
  dataengines/potd/cachedprovider.cpp
  kdeds/CMakeLists.txt
  kdeds/potd/CMakeLists.txt
  kdeds/potd/kded_potd.cpp
  kdeds/potd/kded_potd.desktop
  kdeds/potd/kded_potd.h

To: guoyunhe, #plasma, ngraham
Cc: davidre, ngraham, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D29140: Fix POTD in lock screen (partly)

2020-05-11 Thread Yunhe Guo
guoyunhe updated this revision to Diff 82619.
guoyunhe added a comment.


  Add file watcher

REPOSITORY
  R114 Plasma Addons

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D29140?vs=82610&id=82619

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D29140

AFFECTED FILES
  CMakeLists.txt
  dataengines/potd/PoTD-list.txt
  dataengines/potd/cachedprovider.cpp
  kdeds/CMakeLists.txt
  kdeds/potd/CMakeLists.txt
  kdeds/potd/kded_potd.cpp
  kdeds/potd/kded_potd.desktop
  kdeds/potd/kded_potd.h

To: guoyunhe, #plasma, ngraham
Cc: davidre, ngraham, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D29140: Fix POTD in lock screen (partly)

2020-05-11 Thread Yunhe Guo
guoyunhe updated this revision to Diff 82610.
guoyunhe added a comment.


  Draft for PoTD KDED. Not tested.

REPOSITORY
  R114 Plasma Addons

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D29140?vs=81064&id=82610

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D29140

AFFECTED FILES
  CMakeLists.txt
  dataengines/potd/PoTD-list.txt
  dataengines/potd/cachedprovider.cpp
  kdeds/CMakeLists.txt
  kdeds/potd/CMakeLists.txt
  kdeds/potd/kded_potd.cpp
  kdeds/potd/kded_potd.desktop
  kdeds/potd/kded_potd.h

To: guoyunhe, #plasma, ngraham
Cc: davidre, ngraham, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D29140: Fix POTD in lock screen (partly)

2020-05-11 Thread Yunhe Guo
guoyunhe added a comment.


  I was looking for kded documentation but cannot find a good example. Do you 
know any?

REPOSITORY
  R114 Plasma Addons

REVISION DETAIL
  https://phabricator.kde.org/D29140

To: guoyunhe, #plasma, ngraham
Cc: davidre, ngraham, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D29140: Fix POTD in lock screen (partly)

2020-05-06 Thread Nathaniel Graham
ngraham requested changes to this revision.
ngraham added a comment.
This revision now requires changes to proceed.


  So this only fixes the problem when the POTD image has already been cached by 
the plugin for the desktop wallpaper? While the patch would fix that particular 
use case, I don't think that's a general purpose solution, and if we do 
implement a general-purpose solution, we won't have to do this. So I think we 
should focus on the general solution, sorry. Maybe we can have kded or another 
already-running daemon perform the caching?

INLINE COMMENTS

> cachedprovider.cpp:54
>  const QString path = CachedProvider::identifierToPath( m_identifier );
> -m_image.save(path, "PNG");
> +m_image.save(path, "JPEG");
>  emit done( m_identifier, path, m_image );

seems unrelated

REPOSITORY
  R114 Plasma Addons

REVISION DETAIL
  https://phabricator.kde.org/D29140

To: guoyunhe, #plasma, ngraham
Cc: davidre, ngraham, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D29140: Fix POTD in lock screen (partly)

2020-04-25 Thread Yunhe Guo
guoyunhe added a comment.


  Anyway, this patch just focus on fixing the cache issue.

REPOSITORY
  R114 Plasma Addons

REVISION DETAIL
  https://phabricator.kde.org/D29140

To: guoyunhe, #plasma
Cc: davidre, ngraham, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D29140: Fix POTD in lock screen (partly)

2020-04-25 Thread David Redondo
davidre added a comment.


  In D29140#656817 , @guoyunhe wrote:
  
  > To totally solve the issue, there are several solutions I can find:
  >
  > 1. POTD need to have a daemon process that can always access network. The 
lock screen send request to the daemon through DBus or other protocol.
  > 2. Create an invisible lock screen widget in the desktop, so it fetches and 
updates the POTD even before screen locks.
  >
  >   The second option is much easier to do. Both will cause some performance 
impact.
  
  
  
  
  2. doesn't sound something like we want do

REPOSITORY
  R114 Plasma Addons

REVISION DETAIL
  https://phabricator.kde.org/D29140

To: guoyunhe, #plasma
Cc: davidre, ngraham, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D29140: Fix POTD in lock screen (partly)

2020-04-25 Thread Yunhe Guo
guoyunhe added a comment.


  To totally solve the issue, there are several solutions I can find:
  
  1. POTD need to have a daemon process that can always access network. The 
lock screen send request to the daemon through DBus or other protocol.
  2. Create an invisible lock screen widget in the desktop, so it fetches and 
updates the POTD even before screen locks.
  
  The second option is much easier to do. Both will cause some performance 
impact.

REPOSITORY
  R114 Plasma Addons

REVISION DETAIL
  https://phabricator.kde.org/D29140

To: guoyunhe, #plasma
Cc: ngraham, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D29140: Fix POTD in lock screen (partly)

2020-04-24 Thread Nathaniel Graham
ngraham added a comment.


  Thanks for working on this!
  
  It seems like to make this cache work on the lock screen, the file needs to 
be added to the cache *before* the screen locks, even if it hasn't been added 
there by the desktop wallpaper.

REPOSITORY
  R114 Plasma Addons

REVISION DETAIL
  https://phabricator.kde.org/D29140

To: guoyunhe, #plasma
Cc: ngraham, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D29140: Fix POTD in lock screen (partly)

2020-04-23 Thread Yunhe Guo
guoyunhe updated this revision to Diff 81064.
guoyunhe added a comment.


  Fix APOD and Flicker provider cache

REPOSITORY
  R114 Plasma Addons

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D29140?vs=81043&id=81064

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D29140

AFFECTED FILES
  dataengines/potd/cachedprovider.cpp

To: guoyunhe, #plasma
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D29140: Fix POTD in lock screen (partly)

2020-04-23 Thread Yunhe Guo
guoyunhe created this revision.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
guoyunhe requested review of this revision.

REVISION SUMMARY
  POTD was cached in `~/.cache/`. But lock screen seems not a process of 
current user, so it won't find the cache in user's home dir. So I changed cache 
location to `/tmp` and it starts to work. Note: it only works when your lock 
screen use the same POTD provider as your desktop wallpaper.

REPOSITORY
  R114 Plasma Addons

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D29140

AFFECTED FILES
  dataengines/potd/cachedprovider.cpp

To: guoyunhe
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart