Nerixyz / current-song2

Display the currently playing song/audio.
https://currentsong.nerixyz.de
89 stars 7 forks source link

Theme doesnt apply, stays green #294

Open fenobronas opened 1 year ago

fenobronas commented 1 year ago

Theme doesn't apply(downloaded and put transparent in the same folder as customsong2.exe)

Nerixyz commented 1 year ago

Your theme file needs to be named theme.css if you don't want to modify the config:

-+ folder
 |
 + currentsong2.exe
 + config.toml
 + theme.css
fenobronas commented 1 year ago

Theme file is named theme.css, and the current folder has the same files as your comment, like shown here

Nerixyz commented 1 year ago

The only thing I can think of is that you set a path in config.toml (server > custom_theme_path). You can set an absolute path there.

MushFunGus commented 1 year ago

yeah it doesn't work, no amount of absolute pathing or file name changing changes it from green.

MushFunGus commented 1 year ago

2023-05-09T07:49:02.763214Z WARN HTTP request{http.method: GET, http.route: /theme.css, http.flavor: 1.1, http.scheme: http, http.host: localhost:48457, http.client_ip: 127.0.0.1, http.user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.134 OBS/29.0.2 Safari/537.36, http.target: /theme.css, otel.name: HTTP GET /theme.css, otel.kind: "server", request_id: ec149c97-ad00-48bd-a8db-5215874e0133 exception.message: The system cannot find the file specified. (os error 2) exception.details: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." } http.status_code: 404 otel.status_code: "OK"}: tracing_actix_web::middleware: Error encountered while processing the incoming HTTP request: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }

Not found of some kind, despite the path setting.

MushFunGus commented 1 year ago

It is also strange that it's searching for theme.css despite me changing it to transparent.css but also just using the theme name, it doesn't apply.

MushFunGus commented 1 year ago

So curiously, it seems it is currently unable to read its own config file which is why. If I re-run the current-song2.exe with a modified config, it changes it to config.toml.old and recreates a clean file.

Nerixyz commented 1 year ago

So curiously, it seems it is currently unable to read its own config file which is why. If I re-run the current-song2.exe with a modified config, it changes it to config.toml.old and recreates a clean file.

It should print a warning on why it did that ("Couldn't read config, creating a new one").

My only guess would be that it's in the wrong working directory. Normally, it changes to the directory of the executable unless --current-dir is specified, in which case it stays in the current directory (source).