Code Monkey home page Code Monkey logo

reddit-wallpaper-changer's People

Contributors

benedikt257 avatar kroese avatar mkirsch42 avatar qwertydog avatar rawns avatar samboycoding avatar ugleh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reddit-wallpaper-changer's Issues

SQL UNIQUE constraint failed: versionlog.version

I upgraded to the latest version, and the first time it started okay, but from the second time I always get this SQL error:

constraint failed UNIQUE constraint failed: versionlog.version

I think what happens that it tries to insert a primary key with the version number into the table, but this key already exists.

The relevant SQL query is:

INSERT INTO versionlog (version, date)
SELECT version, MIN(date)
FROM version
GROUP BY version;

Before inserting anything into versionlog it should check that the version is not already in the database.

Functionality via terminal or scripting

Hello

Love what you've done with the RWC! Thank you for picking it up and wiping off the cobwebs.

I would like to know if there are any ways I can use scripting or terminal to add a wallpaper to favourites, blacklist, change. Three things that you can do by right clicking the icon in the system tray, but I'd like to be able to manipulate RWC by using the keyboard.

I use Flow Launcher, a new fork of Wox. I'd like to be able to run a python script from this launcher to do the above mentioned actions.

I guess you don't need to know how Wox/FlowLauncher works, just that I can do actions with RWC using a Python script.

Thank you!

Possibility to prioritize landscape-mode wallpapers?

As title states. Depending on the subreddit, wallpapers can either be for landscape-mode screens (desktops) or portrait-mode screens (phones). Is there a way to prioritize landscape-mode wallpapers, that is, wallpapers where the width is equal to or greater length than the height?

RWC problem

Hello! Recently Reddit Wallpaper Changer behaves odd. Too many requests (429). It renders the program almost completely useless. What should I do? Thanks in advance!

History/Favourites/Blacklist empty

The program works okay, but the History/Favourites/Blacklist lists stay empty. Tried running it as Administrator as suggested in a previous issue, but it made no difference.

Feature Request: Option to set wallpaper on all virtual desktops

I wanted to ask if it would be possible to add a "set on all desktops" option to RWC. I love the app, but one thing that drives me nuts is that it will only set the wallpaper on the current desktop and not all of them. I regularly use Windows 11's virtual desktop feature and would love to have RWC change the desktop backgrounds to the same background at once across all desktops.

The remote server returned an error: (403) Forbidden

This worked in the app for about 24 hours, then I started getting this 403.
The URL Works when i paste it into my browser.

2023-05-05 6:55:24 PM - FAULTYWB - GetRedditSearchUrl - INFORMATION: Full URL Search String: http://www.reddit.com/r/wallpapers/search.json?q=nsfw%3Ano+self%3Ano+((url%3A.png+OR+url%3A.jpg+OR+url%3A.jpeg)+OR+(url%3Aimgur.png+OR+url%3Aimgur.jpg+OR+url%3Aimgur.jpeg)+OR+(url%3Adeviantart))&restrict_sr=on&sort=hot&t=week
2023-05-05 6:55:24 PM - FAULTYWB - GetJsonDataAsync - INFORMATION: Searching Reddit for a wallpaper.
2023-05-05 6:55:24 PM - FAULTYWB - LogFailureAsync - ERROR: Reddit server error: System.Net.WebException: The remote server returned an error: (403) Forbidden.

Doesn't find NSFW posts

I noticed that the program doesn't find any NSFW posts. The API only returns NSFW posts when you're logged in or have &include_over_18=on in the URL, so this snipped should be added to the query.

RWC gets caught in a load spam and doesnt actually change wallpaper

Firstly - Love RWC. Great product...when its working.

I was running 1.0.13.0 but it completely stopped working about a couple of weeks back. Updated tonight to the latest verson (1.0.26.0) and initially it worked fine. It spat out an 'Unhandled exception' error screen, but on all merits it was working fine. I had to close it and reopened it, and now not only does it spit this error out but the text at the bottom of the application is essentially scrolling between my Reddit groups and 'setting wallpaper' but never actually doing anything. Its stuck on an never ending loop of finding a wallpaper, trying to apply it, then instantly searching for a new one, and so on.

Tried uninstalling and reinstalling, windows troubleshooting, and running as admin but nothing fixes the problem. Any help or insight into this would be greatly appreciated.

Cheers

EDIT: Log for reference...hopefully that will make more sense

RWC Log.txt

database missing

does not track favorites, blacklist, or history

i do not see a sqlite file anywhere. is there some kind of initialization/reset of the database? backup creates a 0 byte file. restore from the 0 byte doesn't seem to put it anywhere either.

am i overlooking something?

System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 15, position 1.

When starting RWC I receive the following error. It is a fresh install without %appdata%/Reddit Wallpaper Changer. RWC is running in the background and it is possible to "bring to front" via task manager but it still doesn't function correctly... UI elements are all over the place and it doesn't appear in task bar or tray at all.

Maybe something to do with region settings? I tried to change to something else but it didn't help.

************** Exception Text **************
System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 15, position 1.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars)
   at System.Xml.XmlTextReaderImpl.ParseText()
   at System.Xml.XmlTextReaderImpl.ParseElementContent()
   at System.Xml.XmlTextReaderImpl.Skip()
   at System.Configuration.XmlUtil.StrictSkipToNextElement(ExceptionAction action)
   at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, OverrideModeSetting overrideMode, Boolean skipInChildApps)
   at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, OverrideModeSetting overrideMode, Boolean skipInChildApps)
   at System.Configuration.BaseConfigurationRecord.ScanSections(XmlUtil xmlUtil)
   at System.Configuration.BaseConfigurationRecord.InitConfigFromFile()


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4515.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
Reddit Wallpaper Changer
    Assembly Version: 1.0.20.0
    Win32 Version: 1.0.20.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Reddit%20Wallpaper%20Changer/Reddit%20Wallpaper%20Changer.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4550.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4536.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4390.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4566.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Data.SQLite
    Assembly Version: 1.0.116.0
    Win32 Version: 1.0.116.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Reddit%20Wallpaper%20Changer/System.Data.SQLite.DLL
----------------------------------------
System.Data
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4536.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Transactions
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.



Slow loading & black solid color in between backgrounds

I have fast fiber optic internet but it still takes a long time to search and load images, and I've gotten a few glitches where it just shows a solid black color when it fails. Here's the pastebin for my log file https://pastebin.com/yW3A2n3J. I was thinking it could have a setting to just pre-load a few next wallpapers to avoid having to start searching when you hit the hotkey.

Also would be more work but a UI you could use to show the current wallpaper (or potential next ones you've downloaded) and hit next or hit save or hit favorite or blacklist, would be pretty cool. On iPhones there's reddit official widgets that lets you choose specific subreddits or alternatively choose from default settings for landscapes or nature or cities or whatever, which I am assuming are multireddits, but you could do a dropdown here to choose from a few options like that. You could also do something to validate that subreddits are valid for example.

403 Forbidden : Only when set to Multireddit mode.

At some point after the 1st of May, Multireddit support appears to have stopped working.
I believe the fix applied recently to make this work for other configurations just isn't working the same way for multireddits.
I am on version 1.0.25.

From what I can see, I get an error of 403: Forbidden, further, from watching the status bar, it appears to be trying to put an extra /r/ in front of the multireddit path.
So, when set to use a multireddit, it will try to look at: /r/https://www.reddit.com/user/(user)/m/rwcwalls/
I am not sure if this was the case in the past or if this is new.

I can provide the full log if needed, but this is what it says when trying to search:

5/14/2023 12:47:57 AM - (my hostname)- GetJsonDataAsync - INFORMATION: Searching Reddit for a wallpaper.
5/14/2023 12:47:58 AM - (my hostname) - LogFailureAsync - ERROR: Reddit server error: System.Net.Http.HttpRequestException: Response status code does not indicate success: 403 (Forbidden).
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Reddit_Wallpaper_Changer.RedditClient.d__12`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Reddit_Wallpaper_Changer.RedditClient.d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Reddit_Wallpaper_Changer.WallpaperChanger.d__27.MoveNext()
5/14/2023 12:47:59 AM - (my hostname) - SearchForWallpaperAsync - WARNING: Response status code does not indicate success: 403 (Forbidden).

Crash if settings changed while searching for wallpaper

  1. Notice wallpaper hasn't changed
  2. Open reddit-wallpaper-changer
  3. Notice it says "searching .."
  4. Change settings to include more subs
  5. Wallpaper-changer finds new wallpaper and then crashes
    Event logs:
Faulting application name: Reddit Wallpaper Changer.exe, version: 1.0.19.0, time stamp: 0x628ccb51
Faulting module name: clr.dll, version: 4.8.4515.0, time stamp: 0x624ce98e
Exception code: 0xc00000fd
Fault offset: 0x0000000000004fd4
Faulting process id: 0x9e8
Faulting application start time: 0x01d8cc2d1438022c
Faulting application path: C:\Program Files (x86)\Reddit Wallpaper Changer\Reddit Wallpaper Changer.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Report Id: 11ee7093-d909-4681-af93-e67dc953a14e
Faulting package full name: 
Faulting package-relative application ID: 
Faulting application name: Reddit Wallpaper Changer.exe, version: 1.0.19.0, time stamp: 0x628ccb51
Faulting module name: mscorlib.ni.dll, version: 4.8.4515.0, time stamp: 0x624ce856
Exception code: 0xc00000fd
Fault offset: 0x0000000000566acc
Faulting process id: 0x1938
Faulting application start time: 0x01d8cc322c3dba32
Faulting application path: C:\Program Files (x86)\Reddit Wallpaper Changer\Reddit Wallpaper Changer.exe
Faulting module path: C:\Windows\assembly\NativeImages_v4.0.30319_64\mscorlib\b8493bec853ac702d2188091d76ccffa\mscorlib.ni.dll
Report Id: 3189a94b-8d87-400d-993d-0b0b96031d1c
Faulting package full name: 
Faulting package-relative application ID: 

[Feature] set own API key to avoid 429 Error

Thanks to reddits recent changes in their API rate limiting (Source ) and pricing I'm guessing this addon is quickly running out of its free allocation.

Suggestion would be to have users be able to set their own API key which should be enough to not run into any limits.

Cannot fully import settings from 1.0.13.0

When trying to import settings from an .xml file that was exported on 1.0.13.0 (or any version not containing the includeNSFW option), the import will fail halfway through.

Error message (in french) :
image

I'm sure it's because the IncludeNsfw tag is missing from the xml file.

Settings.Default.includeNsfw = bool.TryParse(xn["IncludeNsfw"].InnerText, out var result) && result;

Haven't done C# in a year but it might be coming from trying to access InnerText property of an absent xn["IncludeNsfw"]

429 (Too Many Requests)

Since this morning I have this error code
And in the log it says

  • SearchForWallpaperAsync - WARNING: Response status code does not indicate success: 429 (Too Many Requests).
    I tried everything, ended up by reinstalling the software, but nothing fixed it.

Hotkey support

Thanks for this working fork. Would it be possible to add hotkey support for changing wallpapers and setting favorites?

Feature Request: Thumbs up/Thumbs Down in Tray Menu

Hi there, I love this program and how reliably it works!

I wanted to ask if it would be possible to add a Thumbs up/down option to the menu when you click the tray icon? I was thinking it would be easy to do, but in writing this I realize you'd have to do some sort of logging in with our Reddit account, and I don't think the program required that when setting it up-- so I understand if it's totally unrealistic. Still love it, thanks for maintaining it.

Remote server returned an error: (404) Not Found

I keep getting this error. Remote server returned an error: (404) Not Found

Full error log:
11/6/2022 5:57:33 PM - DELL-T20 - SearchForWallpaperAsync - INFORMATION: Looking for a wallpaper. 11/6/2022 5:57:33 PM - DELL-T20 - GetRedditSearchUrl - INFORMATION: Selected sub to search: winterporn,EarthPorn,wallpaper,wallpapers, 11/6/2022 5:57:33 PM - DELL-T20 - GetRedditSearchUrl - INFORMATION: Full URL Search String: http://www.reddit.com/r/winterporn,EarthPorn,wallpaper,wallpapers,/search.json?q=1920x1080+nsfw%3Ano+self%3Ano+((url%3A.png+OR+url%3A.jpg+OR+url%3A.jpeg)+OR+(url%3Aimgur.png+OR+url%3Aimgur.jpg+OR+url%3Aimgur.jpeg)+OR+(url%3Adeviantart))&restrict_sr=on&sort=hot&t=day 11/6/2022 5:57:33 PM - DELL-T20 - GetJsonDataAsync - INFORMATION: Searching Reddit for a wallpaper. 11/6/2022 5:57:33 PM - DELL-T20 - LogFailure - ERROR: Reddit server error: The remote server returned an error: (404) Not Found. 11/6/2022 5:57:33 PM - DELL-T20 - SearchForWallpaperAsync - WARNING: The remote server returned an error: (404) Not Found.

Hope this can be fixed! Thanks for all your work!

Reddit Wallpaper Changer issue

Hello man, i dont know if you are still maintaining this amazing app, but i just have a minor issue that i would like to solve if possible, the problem is when i set hotkeys it works just fine except the one for changing the wallpaper, now i am not sure what can issue be caused by, so i just wanted to contact you in case you already had someone reporting something like this. Thanks for your amazing work on the app and thanks for your time. Hope you answer soon.

The request was aborted: Could not create SSL/TLS secure channel.

ERROR: Reddit server error: The request was aborted: Could not create SSL/TLS secure channel.

Looks like reddit updated their API.

https://www.reddit.com/r/redditsecurity/comments/oeyuom/tls_protocol_and_ciphersuite_modernization/

Any chance for an update on this fork? I find it the only usable version since the parent's thread management seems completely broken.

Some pointers that might help:
How to specify SSL protocol to use for WebClient class
Default SecurityProtocol in .NET 4.5

My guess is something like:
System.Net.ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

Should work maybe somewhere in the CreateWebClient method perhaps?

Maybe it is time for me to figure out how to compile a c# app...

Only uses first search result

Hi, I noticed that only the first search result is used for the background. When I manually click "Change wallpaper" but the search still returns the same first result (which is usually the case for a while), it does its 50 retries but completly ignores that there are more than 1 result.
I'd expect that the program would choose the second search result or a random one, until it hasn't been used already.
I'm using the version 1.0.22.0 from yesterday.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.