-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Windows] File paths and cover images #1296
Comments
I would probably say this is a file permissions issue. I would try deleting this one |
For me images work only if placed in the same directory as |
@kurac338 I would suggest to NOT put files there manually. Certainly not in Use the full path to the image. |
Initially when I first switched to Sunshine (v18.6), I had played around with the syntax of locations and path types (absolute, relative) for images, but only the method described in my previous comment worked as expected. Since than, I've followed each release and the images were persisted in the Although I haven't tried messing with the image configuration since than. |
I'm glad I'm not the only one experiencing this. |
URLs don't work. |
Thanks it wasn't clear. |
This issue is stale because it has been open for 90 days with no activity. Comment or remove the stale label, otherwise this will be closed in 10 days. |
No comments were added to this issue since our previous discussion, but the issue is still active on latest stable Sunhine Aside from our previous observations, I have also noticed that the web UI does not respect quotation marks for the image path input field. They are stripped/sanitized as soon as the app is saved/added. IMO the issue is actually a mix of several bugs:
|
We don't want the quotes, so we remove them. It's still a string though.
Last time I checked absolute paths do work. Here's the function. std::string
validate_app_image_path(std::string app_image_path) {
if (app_image_path.empty()) {
return DEFAULT_APP_IMAGE_PATH;
}
// get the image extension and convert it to lowercase
auto image_extension = std::filesystem::path(app_image_path).extension().string();
boost::to_lower(image_extension);
// return the default box image if extension is not "png"
if (image_extension != ".png") {
return DEFAULT_APP_IMAGE_PATH;
}
// check if image is in assets directory
auto full_image_path = std::filesystem::path(SUNSHINE_ASSETS_DIR) / app_image_path;
if (std::filesystem::exists(full_image_path)) {
return full_image_path.string();
}
else if (app_image_path == "./assets/steam.png") {
// handle old default steam image definition
return SUNSHINE_ASSETS_DIR "/steam.png";
}
// check if specified image exists
std::error_code code;
if (!std::filesystem::exists(app_image_path, code)) {
// return default box image if image does not exist
BOOST_LOG(warning) << "Couldn't find app image at path ["sv << app_image_path << ']';
return DEFAULT_APP_IMAGE_PATH;
}
// image is a png, and not in assets directory
// return only "content-type" http header compatible image type
return app_image_path;
} In human terms.
|
It seems this issue hasn't had any activity in the past 90 days. If it's still something you'd like addressed, please let us know by leaving a comment. Otherwise, to help keep our backlog tidy, we'll be closing this issue in 10 days. Thanks! |
This issue was closed because it has been stalled for 10 days with no activity. |
Is there an existing issue for this?
Is your issue described in the documentation?
Is your issue present in the nightly release?
Describe the Bug
Sunshine Nightly Version 0.19.1.8da2caf764587b31902f058606334ac6e612b65f
Steps:
Adding an app in the GUI results in a change in the
/config/apps.json
file but also an error:C:\Program Files\Sunshine\config\apps.json
is still written to despite the error and inconsistent slashes.Selecting a cover image using the find image function also results in inconsistent slashes.
The new app appears in Moonlight clients but with no image cover. Correcting the slashes (all "\\" or "/") in
config/apps.json
does not help.Manually configuring the configs/apps.json file path in the GUI to
"C:\Program Files\Sunshine\config\apps.json"
does not help.Expected Behavior
Additional Context
No response
Host Operating System
Windows
Operating System Version
10 Pro 22H2 Build 19045.2965
Architecture
64 bit
Sunshine commit or version
0.19.1.8da2caf764587b31902f058606334ac6e612b65f
Package
Windows - installer
GPU Type
Nvidia
GPU Model
GeForce RTX 3070
GPU Driver/Mesa Version
531.79
Capture Method (Linux Only)
No response
Config
Apps
Relevant log output
The text was updated successfully, but these errors were encountered: