Comments (8)
Pending closure, changes to be included in 1.0.10.
from reddit-wallpaper-changer.
Added pull request #27 to fix RWC entering a state where it is running but no timers to search for a wallpaper are enabled, as described in my last comment.
from reddit-wallpaper-changer.
Committed the changes. :)
I've also moved the "is an image URL?" and "is still on Imgur?" checks into the background worker process when actually looking for a wallpaper, rather than at the 'setting wallpaper stage. I've been running a new build in a VM with my changes, your commit and @BlackDragon17 's settings and set it to change my wallpaper every minute. So far, it's been running for about an hour now and is changing my wallpaper quite happily. It's also pulled a few links form DeviantArt too without any problems. :)
17/02/2017 10:56:55 - WIN10-VM: Found a wallpaper! Title: River Fields Study by Piotr Dura, URL: http://threedeee.deviantart.com/art/River-Fields-Study-534022462, ThreadID: 36j8gw
17/02/2017 10:56:55 - WIN10-VM: Setting wallpaper.
17/02/2017 10:56:56 - WIN10-VM: URL: http://img12.deviantart.net/bc3b/i/2015/139/0/d/river_fields_study_by_threedeee-d8txyda.jpg
17/02/2017 10:56:56 - WIN10-VM: Title: River Fields Study by Piotr Dura
17/02/2017 10:56:56 - WIN10-VM: Thread ID: 36j8gw
17/02/2017 10:56:56 - WIN10-VM: Wallpaper changed!
17/02/2017 10:57:55 - WIN10-VM: Changing wallpaper.
from reddit-wallpaper-changer.
I think two possible solutions to this behavior could be:
-
Making RWC capable of interpreting DeviantArt links, as in, when it receives an indirect DA image link (example), it should convert it to a direct image link (example).
-
Increasing the number of times that RWC tries to change the wallpaper before giving up from 2 to, for example, 5.
from reddit-wallpaper-changer.
Making RWC capable of interpreting DeviantArt links, as in, when it receives an indirect DA image link (example), it should convert it to a direct image link (example).
A logic for that is in place using oembed. The URL for your image is turned into: http://backend.deviantart.com/oembed?url=http://seansoong.deviantart.com/art/Ming-Men-Lake-358359052 and the direct url is fetched from that result.
Increasing the number of times that RWC tries to change the wallpaper before giving up from 2 to, for example, 5.
It sits at 50, however I think not every unsuccessful search will start a new one, especially when there is a bug, which seems to be the case here ;-).
@Rawns: To me, it seems as if the HttpWebRequest to check for an image you inserted at the very beginning of setWallpaper causes the issue observed here. For deviantart URLs I get a timeout every time (no clue why) which throws the exception that leads to the logmessages observed by @BlackDragon17. Adding if (!url.Contains("deviantart"))
around that bit of code allows RWC to set the wallpaper in question here.
Maybe the check for deleted images and direct image links should be integrated into the workflow of the backgroundworker as it seems quite specific to the site that the program is pulling from?
from reddit-wallpaper-changer.
Thanks for the info. I'll get this fixed in the next release. :)
from reddit-wallpaper-changer.
Theoretically, RWC should start looking for another Wallpaper in a situation as described by @BlackDragon17, right?
As far as I can tell, the intended behavior is Timer breakBetweenChange is started, ticks after a second and essentially restarts the wallpaper search (by restarting the changeWallpaperTimer again).
After playing around with it for a while, I am a little confused though.
Are you sure that restarting a Timer from BackgroundWorker works? As far as I can tell, the Timer never ticks.
Replacing
breakBetweenChange.Enabled = true;
with
this.Invoke((MethodInvoker)(() => {breakBetweenChange.Enabled = true;}));
works. (Source: http://stackoverflow.com/questions/9940293/enable-system-form-timer-from-backgroundworker)
I doubt that this is best practice though and maybe it will cause other bugs. I have seen Timers.Timer mentioned as an alternative to Windows.Forms.Timer for multithreaded applications, but I haven't had the time to look into what makes that better and how to get it to work in RWC.
from reddit-wallpaper-changer.
Fixed.
from reddit-wallpaper-changer.
Related Issues (20)
- wallpapers not changing after error updating thumbnail
- [Android] Images are aligned slightly differently on the lock screen and the homescreen
- RWC won't stop changing wallpapers
- Importing SQL Lite DB from existing wallpaper changer to new install gives error HOT 1
- ERROR: Unexpected error: Unexpected character encountered while parsing value: <. Path '', line 0, position 0
- DOES NOT WORK AT ALL I TRIED EVERYTHING!
- 50 Attempts to change wallpaper. Disabling RWC. HOT 5
- Project has a lot of unresolved merge conflicts
- Unhandled exception occured, could not load file or assembly 'System.Data.SQLite.dll" HOT 3
- Error 403
- RWC Won't change after 50 attempts
- Reddit Wallpaper Changer is not changing wallpaper automatically
- History and Favorites/Blacklist appear to straight up not do anything
- Reddit Wallpaper Changer error HOT 3
- ERROR: Reddit server error: The request was aborted: Could not create SSL/TLS secure channel. HOT 2
- The app is not functioning. Error: 'The request was aborted. Could not create SSL/TLS secure channel' HOT 1
- Reddit Wallpaper Changer not working. HOT 3
- not able to log in?
- Error on Windows 10 HOT 2
- REQUEST WAS ABORTED HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reddit-wallpaper-changer.