Open trailjeep opened 2 years ago
Yes. I thought about this while I was building the plugin too. I'll try to add something to support user collections.
Just wanting to second this request. I found a way to download my collection and view them like a slideshow.
@trailjeep Any chance you made your "hack" as a change to the code of this plugin, and is there like a pull request or something I could use?
@trailjeep Any chance you made your "hack" as a change to the code of this plugin, and is there like a pull request or something I could use?
Sorry, it is an ugly hack that just does what I want. Here is the diff file if you know what to do (basically edit 1 line and comment out 3 others):
--- contents/ui/main.qml 2022-10-06 22:18:17.954288483 -0400
+++ /home/USER/.local/share/plasma/wallpapers/net.sub-pop.kdewallhavenwallpaper/contents/ui/main.qml 2023-01-22 20:06:39.382673454 -0500
@@ -91 +91 @@
- var url = `https://wallhaven.cc/api/v1/search?`
+ var url = `https://wallhaven.cc/api/v1/collections/WALLHAVEN_USER/COLLECTION#`
@@ -109 +109 @@
- url += `categories=${categories}&`
+ //url += `categories=${categories}&`
@@ -127 +127 @@
- url += `purity=${purity}&`
+ //url += `purity=${purity}&`
@@ -129 +129 @@
- url += `sorting=${wallpaper.configuration.Sorting}&`
+ //url += `sorting=${wallpaper.configuration.Sorting}&`
Of course, you would have to reverse changes to use as intended.
I learned more about the collections API and it's not a swap-in replacement for a query. You have to input the desired username, for example. This will require some UI changes to swap between collections or queries. Not an insurmountable change, but more complex than a simple radio group.
I love this plugin, thanks! Could you add ability to set user collections in addition to search tags? I hacked it in for my needs, but it would be nice as a configurable option.