neffo / bing-wallpaper-gnome-extension

GNOME shell extension that syncs your desktop & lock screen wallpaper to Microsoft Bing's Image of the Day.
https://extensions.gnome.org/extension/1262/bing-wallpaper-changer/
GNU General Public License v3.0
297 stars 55 forks source link

[BUG] The resolution of downloaded UHD image sticked to 1920x1080 #202

Closed jayoh-dev closed 3 weeks ago

jayoh-dev commented 1 year ago

Describe the bug The resolution of downloaded images is 1920x1080 though set the Screen resolution option as UHD in settings.

Desktop (please complete the following information):

Additional context

The downloaded image attached. 20230326-NYCClouds_EN-GB6377009019_UHD

Log attached. The filename of the image downloading has UHD postfix.

gnome-shell[123376]: BingWallpaper extension: selected image changed to: random
gnome-shell[123376]: BingWallpaper extension: next shuffle in 3600 seconds
gnome-shell[123376]: BingWallpaper extension: Downloading https://www.bing.com/th?id=OHR.NYCClouds_EN-GB6377009019_UHD.jpg to file:///home/jay/Pictures/BingWallpaper/20230326-NYCClouds_EN-GB6377009019_UHD.jpg
gnome-shell[123376]: BingWallpaper extension: Storing state as JSON: {"maxlongdate":202303302300,"title":"New York City skyline in fog","explanation":"Bing Wallpaper of the Day for 2023-03-26","copyright":"© Orbon Alija/Getty Images","longstartdate":"202303262300","imageinfolink":"https://www.bing.com/search?q=new+york+city+skyscrapers&form=hpcapt&filters=HpDate%3a%2220230326_2300%22","imageURL":"https://www.bing.com/th?id=OHR.NYCClouds_EN-GB6377009019_UHD.jpg","filename":"/home/jay/Pictures/BingWallpaper/20230326-NYCClouds_EN-GB6377009019_UHD.jpg","favourite":false}
gnome-shell[123376]: BingWallpaper extension: scale factor: 1
gnome-shell[123376]: BingWallpaper extension: Download successful
neffo commented 1 year ago

Yeah, this is a thing that has been happening. It's not due to an incorrectly specified API call, just that that seems to be the maximum resolution of the source image.

When this happens we could have an option to fallback to another image in a different market of the same language (say EN-US if your native is EN-GB) or a random prior downloaded image if 4K is critical.

czhang03 commented 1 year ago

I have encountered the same issue. I have seen the gnome shell log as follow:

gnome-shell[1585]: BingWallpaper extension: selected image changed to: current
gnome-shell[1585]: clutter_text_set_text: assertion 'CLUTTER_IS_TEXT (self)' failed
gnome-shell[1585]: Object St.Label (0x5561fdbd9670), has been already disposed — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
gnome-shell[1585]: clutter_text_get_editable: assertion 'CLUTTER_IS_TEXT (self)' failed
gnome-shell[1585]: clutter_text_get_text: assertion 'CLUTTER_IS_TEXT (self)' failed
gnome-shell[1585]: clutter_text_set_text: assertion 'CLUTTER_IS_TEXT (self)' failed
gnome-shell[1585]: Object St.Label (0x55620024e960), has been already disposed — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
gnome-shell[1585]: clutter_text_get_editable: assertion 'CLUTTER_IS_TEXT (self)' failed
gnome-shell[1585]: clutter_text_get_text: assertion 'CLUTTER_IS_TEXT (self)' failed
gnome-shell[1585]: clutter_text_set_text: assertion 'CLUTTER_IS_TEXT (self)' failed
gnome-shell[1585]: Object St.Button (0x5561fe924470), has been already disposed — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
gnome-shell[1585]: Object .Gjs_ui_popupMenu_PopupSwitchMenuItem (0x5561fb5fbd60), has been already disposed — impossible to get any property from it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
gnome-shell[1585]: Object .Gjs_ui_popupMenu_PopupSwitchMenuItem (0x5561fb5fbd60), has been already disposed — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
gnome-shell[1585]: BingWallpaper extension: scale factor: 2
gnome-shell[1585]: BingWallpaper extension: Storing state as JSON: {"maxlongdate":202303310700,"title":"Steyr River, Austria","explanation":"Bing Wallpaper of the Day for 2023-03-30","copyright":"© guenterguni/Getty Images","longstartdate":"202303310700","imageinfolink":"https://www.bing.com/search?q=steyr+river&form=hpcapt&filters=HpDate%3a%2220230331_0700%22","imageURL":"https://www.bing.com/th?id=OHR.SteyrRiver_EN-US6366722389_UHD.jpg","filename":"/home/cheng/Pictures/BingWallpaper/20230331-SteyrRiver_EN-US6366722389_UHD.jpg","favourite":false}

Yet, in bing.json, I only find a line:

{"startdate":"20230331","fullstartdate":"202303310700","enddate":"20230401","url":"/th?id=OHR.SteyrRiver_EN-US6366722389_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp","urlbase":"/th?id=OHR.SteyrRiver_EN-US6366722389","copyright":"Steyr River, Austria (© guenterguni/Getty Images)","copyrightlink":"https://www.bing.com/search?q=steyr+river&form=hpcapt&filters=HpDate%3a%2220230331_0700%22","title":"The stunning Steyr","quiz":"/search?q=Bing+homepage+quiz&filters=WQOskey:%22HPQuiz_20230331_SteyrRiver%22&FORM=HPQUIZ","wp":true,"hsh":"0821a4d8ee08bc9d6e3b9d1411fbb51a","drk":1,"top":1,"bot":1,"hs":[]}]

which seems to indicate that it is downloading the 1080p version of the image.

I am physically in the U.S. and have my region manually setted to the U.S. I am on Ubuntu 22.10, X11, with Gnome 43.1, with a UHD display.

neffo commented 1 year ago

Yeah it's not an extension bug as such, it is correctly downloading the _UHD version, it's just that the UHD image is in fact 1920x1080.

neffo commented 1 year ago

The image height actually varies quite a bit, but looks like Bing has been selecting from lower resolutions sources recently. I have no insights into why, this is the ROW image set but there is usually similarity between all the sets. (They swap out things that might be culturally sensitive or to include something regional.)

image image

neffo commented 1 year ago

A work around to this is in testing atm, you can exclude <4K wallpapers when using shuffle mode. It helps if you have a reasonable local collection of images.

neffo commented 1 year ago

bingheights

This appears to have vastly improved since early May. (Thanks Microsoft.)