Giter VIP home page Giter VIP logo

current-song2's Introduction

Current Song 2

example screenshot with default theme

The documentation is located at currentsong.nerixyz.de.

This project is a rewrite of the CurrentSong Overlay. The core is written in Rust now. Both Windows and Unix platforms are supported. On Windows, GlobalSystemMediaTransportControls is used and on Unix, D-Bus is used.

The goal of the project is to create a simple yet powerful overlay that displays the currently playing song. There are a few unique features separating this project:

  • Near zero latency ⏱ Current Song 2 doesn't poll applications or APIs for updates.

  • Displaying Progress 💯 Progress is displayed where available.

  • Display Album Art 🖼

  • Customizable 🔧 The overlay is customizable through CSS (theme.css) and JavaScript (user.js), see Customization. Modules and the server can be configured in a config.toml file, see Configuration.

  • Setup

  • Configuration

  • Customization

  • Building

Architecture

graph TD;
    gsmtc[GSMTC<br><i>Windows</i>]
    dbus[MPRIS D-Bus<br><i>Unix</i>]
    ext[Browser Extension]
    cso2[CurrentSong2]
    ext-->cso2
    Browser-->dbus
    Spotify-->dbus
    VLC-->dbus
    MPV-->dbus
    Browser-- limited <br> playback progress -->gsmtc
    Browser-- playback progress -->ext
    Spotify-->gsmtc
    gsmtc-->cso2
    dbus-->cso2
    cso2-->Overlay

Planned Features

See more in the projects tab.

current-song2's People

Contributors

dependabot[bot] avatar nerixyz 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  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

current-song2's Issues

Include filter for Spotify.exe not working

Got everything setup how I need it, however I can't get the filter config option to work.
I want it to only show the music playing on Spotify.

I've tried both Include and Exclude modes with corresponding settings

mode = "Include"
items = ["Spotify.exe"]

or

mode = "Exclude"
items = ["msedge.exe","chrome.exe","firefox.exe"]

However when I use the Include mode with this settings, nothing gets recognized at all (no Spotify, Firefox, etc.).
And when I use the Exclude mode it still recognizes output from Firefox.

I'm on Windows 11 22H2 (Build 22621.3447) with Spotify 1.2.35.663.gb699649e.
Any idea what I'm doing wrong?

system cannot find file specified?

I keep getting "WARN current_song2::config: Couldn't read config, creating a new one., error: The system cannot find the file specified. (os error 2)" in the currentsong_2.txt file, anything obvious I must be doing wrong? It's just in a folder in a folder in My Documents, so I don't understand why it's inaccessible.

Suggestion: Disappear when music is paused

I realised that when music is paused, the overlay is still visible.

Can we get a config to make the overlay disappear (like V1 did)?

I liked that feature before as it meant I could have the overlay on all my OBS scenes and it'd just show up automatically when I play music. I can get around it if I want to by hiding the overlay when the music is paused, but that's a bit less reliable.

Not Asking to Stop Old Instance

Nothing shows up to tell about the older instance after opening again. It just lines up next to the old one in the task manager.

Config Overwritten Every Restart

When trying to close the app and relaunch it to see if css changes have been applied, the app remakes its config file and overwrites any changes, making it impossible to ever change the theme.

Progress Bar Bug

The progress bar does not reset to 0 when looping or playing the same song again. Also does not update if the music is skipped around a bit.

Transparent Background Still Mildly Visible

Heyyo, first off, THANK YOU. This little program is amazing, and it just works. No gimmicks, constant refreshing, it's great!

The one and only thing I've noticed is when the background is set to transparent, there's still a little bubble visible.

Would it be possible to remove this?

image

Add notification mode

I'd like to set it up in a way where it shows up for the first ten seconds of a song, and then disappears until the next song starts. I couldn't figure out how to make that happen on my own, so I wanted to reach out and ask.

This should be possible today by adding custom JS, but this could be some option (maybe in the URL).

Chrome YouTube incorrect title/artist

Issue

For this Youtube video, the correct title/artist should be:

Title: "Ob-la-di ob-la-da - The Beatles (LYRICS/LETRA) [Original]"
Artist: "el perro beatle"

But instead, it's showing as:

Title: "la-di ob-la-da - The Beatles"
Artist: "Ob"

Screenshot

image

Source video: https://www.youtube.com/watch?v=_Paqe2-BCYM

Websocket message

{"type":"Playing","data":{"title":"Ob-la-di ob-la-da - The Beatles (LYRICS/LETRA) [Original]","artist":"el perro beatle","trackNumber":0,"image":{"id":15,"epochId":1},"timeline":{"ts":1705505109989,"durationMs":189761,"progressMs":10,"rate":1.0},"album":{"title":"","trackCount":0},"source":"gsmtc::Chrome"}}

My theme.css

:root {
    --text-color: #ddd;
    --progress-color: #67736e;
    --max-height: 6.0rem;
    --height: 6.0rem;
    --min-height: 4.0rem;
}


#song-container {
    bottom: 0;
    right: 0;
    transform-origin: right;
    background: #2b2b2b;
    box-shadow: 0 0 4px 2px #111;
}

#song-info {
    padding: 10px 20px 10px 10px;
}

Not using any custom JS. The issue also occurs with the default CSS. Tested with other videos, but even those with a similar number of hyphens in the title seem to be fine.

Let me know if you need any more info. Thanks for the great tool :-)

Every time I play a new video I get the following error in current_song2.log (WARN gsmtc::manager: Could not get current sessions, error)

When playing a youtube video on chrome and using currentsong2 to display the video information on OBS,
Every time I play a new video I get the following error in current_song2.log

2022-09-27T21:56:40.347934Z WARN gsmtc::manager: Could not get current sessions, error: この操作を正しく終了しました。
2022-09-27T21:56:40.348248Z WARN gsmtc::manager: Could not get current sessions, error: この操作を正しく終了しました。
2022-09-27T21:56:40.348439Z WARN gsmtc::manager: Could not get current sessions, error: この操作を正しく終了しました。
2022-09-27T21:56:40.350553Z WARN gsmtc::manager: Could not get current sessions, error: この操作を正しく終了しました。
2022-09-27T21:56:40.350577Z WARN gsmtc::manager: Could not get current sessions, error: この操作を正しく終了しました。

However, it does not mean that something is wrong with the operation
Also, this error will not be output if OBS is not started

currentsong2 is running with administrator privileges

Version of current_song2:
v0.1.0-alpha.7

chrome version:
バージョン: 105.0.5195.127(Official Build) (64 ビット)

OBS version:
28.0.02
ss002 - Properties for 'current song2 info'
ss003 - OBS 28 0 2 (64-bit, windows) - Profile: ニコニコ生放送 - Scenes: RemotePlay
ss004 - C:¥CurrentSong2¥current_song2 log * - EmEditor

Music from chrome (youtube) not appearing in overlay

With the extension installed, playing something from youtube won't show up on the overlay, but playing something from spotify will show up on the overlay.

issue.mp4

image

A week or two ago it had been working, but I'm unsure if in the time since then something changed with the extension or with my setup.

And I apologize in advance if I'm just missing something very obvious and or if this is a duplicate issue.

Thanks!

When playing a playlist with chrome in app mode, current_song2 cannot get the thumbnail image of the video after about 2 hours.

When playing a playlist with chrome in app mode, current_song2 cannot get the thumbnail image of the video after about 2 hours.
Restart chrome and current_song2 should be able to pick it up normally.

It is highly likely that youtube or chrome is the cause of this error, but I will report it

App mode chrome link to:
"C:\Program Files\Google\Chrome\Application\chrome_proxy.exe" --profile-directory=Default --app="https://music.youtube.com/browse/UCermf7vqBLEsYL-X_8gBcUg"

Error in current_song2.log:
2022-09-25T22:24:13.619012Z WARN HTTP request{http.method: GET, http.route: /api/img/{id}/{target_epoch}, http.flavor: 1.1, http.scheme: http, http.host: 127.0.0.1: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/28.0.2 Safari/537.36, http.target: /api/img/3/7, otel.name: HTTP GET /api/img/{id}/{target_epoch}, otel.kind: "server", request_id: 27bcd086-f6b3-46ac-a8fd-517c13198371 exception.message: Requested image doesn't exist exception.details: "Requested image doesn't exist" http.status_code: 404 otel.status_code: "OK"}: tracing_actix_web::middleware: Error encountered while processing the incoming HTTP request: "Requested image doesn't exist"

currentsong2 is running with administrator privileges

Version of current_song2:
v0.1.0-alpha.7

chrome version:
バージョン: 105.0.5195.127(Official Build) (64 ビット)

OBS version:
28.0.02

ss005 - NoTitle
ss006 - NoTitle

Not showing up in OBS?

The URL works fine in my browser but is just blank in OBS for some reason.

I've tried using different resolutions, messing with the browser source settings but nothing seems to fix it
image
image

Pausing Spotify doesn't pause progress

I've setup the configs to include only Spotify, and it seems to pickup the songs and progress fine, however when a song is paused, the progress keeps going regardless.
current_song_paused

The above GIF demonstrates the issue, and I've also positioned the song near the end so you can see it hit 1, then bounce back to the current progress and continue ticking up to 1 again. I've included Spotify itself in the view too to show that the song is indeed paused.

[feature request]filter by URL

I would like the ability to filter by URL when playing in a browser such as chrome.
Example: Filter by music.youtube.com to not output video information of www.youtube.com that is playing at the same time.

Localhost not showing up anything (Edge / Firefox)

Hello ! I'm new to all this and I think I need help with understanding how some of the files works.
I've been roaming the documentation for precisions of these files but I can't find what I'm looking for : is there something I need to do in order to have access to default theme ? Or do I just need to create files myself (which I can since I'm learning CSS) ?

EDIT : please look at the third message I did, it's probably more helpful.

Here are some screens to show how my config is and what is displayed:

Current-song folder :
image

Localhost display while having youtube :
image

image
(translastion : CurrentSong / Can Always read and modify datas from this site)

curent-song2.log (with restarts and tries) :

2024-01-23T10:19:05.299901Z WARN current_song2::config: Couldn't read config, creating a new one., error: Le fichier spécifié est introuvable. (os error 2)
2024-01-23T10:19:05.313702Z INFO actix_server::builder: starting 4 workers
2024-01-23T10:19:05.313734Z INFO actix_server::server: Actix runtime found; starting in Actix runtime
2024-01-23T10:19:15.931344Z 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; rv:121.0) Gecko/20100101 Firefox/121.0, http.target: /theme.css, otel.name: HTTP GET /theme.css, otel.kind: "server", request_id: a3d3c1e2-5392-4014-a3ab-e4ae5956d1cd exception.message: Le fichier spécifié est introuvable. (os error 2) exception.details: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." } 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: "Le fichier spécifié est introuvable." }
2024-01-23T10:19:15.949165Z 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; rv:121.0) Gecko/20100101 Firefox/121.0, http.target: /theme.css, otel.name: HTTP GET /theme.css, otel.kind: "server", request_id: 66ef015b-1b2b-4acd-b507-d7bc1d64cb81 exception.message: Le fichier spécifié est introuvable. (os error 2) exception.details: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." } 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: "Le fichier spécifié est introuvable." }
2024-01-23T10:19:15.957252Z WARN HTTP request{http.method: GET, http.route: /user.js, 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; rv:121.0) Gecko/20100101 Firefox/121.0, http.target: /user.js, otel.name: HTTP GET /user.js, otel.kind: "server", request_id: d8959e33-9477-47f4-9db6-0e800c52c9a7 exception.message: Le fichier spécifié est introuvable. (os error 2) exception.details: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." } 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: "Le fichier spécifié est introuvable." }
2024-01-23T10:19:17.465745Z 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; rv:121.0) Gecko/20100101 Firefox/121.0, http.target: /theme.css, otel.name: HTTP GET /theme.css, otel.kind: "server", request_id: db51a446-a568-4393-946e-5036b4cacdea exception.message: Le fichier spécifié est introuvable. (os error 2) exception.details: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." } 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: "Le fichier spécifié est introuvable." }
2024-01-23T10:19:17.472849Z WARN HTTP request{http.method: GET, http.route: /user.js, 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; rv:121.0) Gecko/20100101 Firefox/121.0, http.target: /user.js, otel.name: HTTP GET /user.js, otel.kind: "server", request_id: f4c0dbbc-2dc1-447f-b93d-7afc49a129de exception.message: Le fichier spécifié est introuvable. (os error 2) exception.details: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." } 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: "Le fichier spécifié est introuvable." }
2024-01-23T10:20:33.948997Z 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; rv:121.0) Gecko/20100101 Firefox/121.0, http.target: /theme.css, otel.name: HTTP GET /theme.css, otel.kind: "server", request_id: 587a041b-ea6b-4c3e-a396-de6f1eb5564f exception.message: Le fichier spécifié est introuvable. (os error 2) exception.details: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." } 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: "Le fichier spécifié est introuvable." }
2024-01-23T10:20:33.954281Z WARN HTTP request{http.method: GET, http.route: /user.js, 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; rv:121.0) Gecko/20100101 Firefox/121.0, http.target: /user.js, otel.name: HTTP GET /user.js, otel.kind: "server", request_id: c93ea89c-7c41-4668-b409-a696cff67835 exception.message: Le fichier spécifié est introuvable. (os error 2) exception.details: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." } 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: "Le fichier spécifié est introuvable." }
2024-01-23T10:22:45.300814Z 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; rv:121.0) Gecko/20100101 Firefox/121.0, http.target: /theme.css, otel.name: HTTP GET /theme.css, otel.kind: "server", request_id: 6014a49c-c651-4a7d-979f-b95af4dbeb9f exception.message: Le fichier spécifié est introuvable. (os error 2) exception.details: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." } 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: "Le fichier spécifié est introuvable." }
2024-01-23T10:22:45.306569Z WARN HTTP request{http.method: GET, http.route: /user.js, 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; rv:121.0) Gecko/20100101 Firefox/121.0, http.target: /user.js, otel.name: HTTP GET /user.js, otel.kind: "server", request_id: 54c63585-0fa8-4c8b-b632-a1feadb220e1 exception.message: Le fichier spécifié est introuvable. (os error 2) exception.details: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." } 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: "Le fichier spécifié est introuvable." }
2024-01-23T10:24:54.505216Z 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; rv:121.0) Gecko/20100101 Firefox/121.0, http.target: /theme.css, otel.name: HTTP GET /theme.css, otel.kind: "server", request_id: 79ea8d48-a7da-4368-8e0e-ce48c4b570cb exception.message: Le fichier spécifié est introuvable. (os error 2) exception.details: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." } 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: "Le fichier spécifié est introuvable." }
2024-01-23T10:24:54.523520Z WARN HTTP request{http.method: GET, http.route: /user.js, 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; rv:121.0) Gecko/20100101 Firefox/121.0, http.target: /user.js, otel.name: HTTP GET /user.js, otel.kind: "server", request_id: 156856c1-7365-40f7-8b10-a04b8e61a8bf exception.message: Le fichier spécifié est introuvable. (os error 2) exception.details: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." } 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: "Le fichier spécifié est introuvable." }
2024-01-23T10:25:53.394357Z 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; rv:121.0) Gecko/20100101 Firefox/121.0, http.target: /theme.css, otel.name: HTTP GET /theme.css, otel.kind: "server", request_id: 2e6bc0b5-a1e2-4a20-aff2-186bf1e3812f exception.message: Le fichier spécifié est introuvable. (os error 2) exception.details: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." } 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: "Le fichier spécifié est introuvable." }
2024-01-23T10:25:53.398679Z WARN HTTP request{http.method: GET, http.route: /user.js, 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; rv:121.0) Gecko/20100101 Firefox/121.0, http.target: /user.js, otel.name: HTTP GET /user.js, otel.kind: "server", request_id: e6f1dd95-64dc-4659-b3a5-b054cfb7103e exception.message: Le fichier spécifié est introuvable. (os error 2) exception.details: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." } 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: "Le fichier spécifié est introuvable." }
2024-01-23T10:26:11.895690Z 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; rv:121.0) Gecko/20100101 Firefox/121.0, http.target: /theme.css, otel.name: HTTP GET /theme.css, otel.kind: "server", request_id: cd1858aa-a1e1-4028-af32-36a936bd5b0a exception.message: Le fichier spécifié est introuvable. (os error 2) exception.details: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." } 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: "Le fichier spécifié est introuvable." }
2024-01-23T10:26:11.901535Z WARN HTTP request{http.method: GET, http.route: /user.js, 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; rv:121.0) Gecko/20100101 Firefox/121.0, http.target: /user.js, otel.name: HTTP GET /user.js, otel.kind: "server", request_id: c57cb157-656b-4562-965b-ee97203bdee4 exception.message: Le fichier spécifié est introuvable. (os error 2) exception.details: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." } 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: "Le fichier spécifié est introuvable." }
2024-01-23T10:26:59.726858Z INFO actix_server::builder: starting 4 workers
2024-01-23T10:26:59.726876Z INFO actix_server::server: Actix runtime found; starting in Actix runtime
2024-01-23T10:27:18.270256Z 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; rv:121.0) Gecko/20100101 Firefox/121.0, http.target: /theme.css, otel.name: HTTP GET /theme.css, otel.kind: "server", request_id: c8cfce7d-ca29-4263-b921-9b46b8c7c92b exception.message: Le fichier spécifié est introuvable. (os error 2) exception.details: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." } 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: "Le fichier spécifié est introuvable." }
2024-01-23T10:27:18.278469Z WARN HTTP request{http.method: GET, http.route: /user.js, 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; rv:121.0) Gecko/20100101 Firefox/121.0, http.target: /user.js, otel.name: HTTP GET /user.js, otel.kind: "server", request_id: 010d800c-2812-4516-9843-1e35bb3e3c5d exception.message: Le fichier spécifié est introuvable. (os error 2) exception.details: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." } 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: "Le fichier spécifié est introuvable." }
2024-01-23T10:27:22.846781Z INFO actix_server::builder: starting 4 workers
2024-01-23T10:27:22.846794Z INFO actix_server::server: Actix runtime found; starting in Actix runtime
2024-01-23T10:30:06.445793Z 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; rv:121.0) Gecko/20100101 Firefox/121.0, http.target: /theme.css, otel.name: HTTP GET /theme.css, otel.kind: "server", request_id: 37356b3f-6904-474b-a3a4-94ad2355027d exception.message: Le fichier spécifié est introuvable. (os error 2) exception.details: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." } 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: "Le fichier spécifié est introuvable." }
2024-01-23T10:30:06.453815Z WARN HTTP request{http.method: GET, http.route: /user.js, 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; rv:121.0) Gecko/20100101 Firefox/121.0, http.target: /user.js, otel.name: HTTP GET /user.js, otel.kind: "server", request_id: 1f566c77-9f31-44d1-9dfc-02ef8e1c290f exception.message: Le fichier spécifié est introuvable. (os error 2) exception.details: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." } 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: "Le fichier spécifié est introuvable." }
2024-01-23T10:31:32.105827Z 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; rv:121.0) Gecko/20100101 Firefox/121.0, http.target: /theme.css, otel.name: HTTP GET /theme.css, otel.kind: "server", request_id: caeb2087-7b7b-4f62-9647-a830be8eafc1 exception.message: Le fichier spécifié est introuvable. (os error 2) exception.details: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." } 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: "Le fichier spécifié est introuvable." }
2024-01-23T10:31:32.113300Z WARN HTTP request{http.method: GET, http.route: /user.js, 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; rv:121.0) Gecko/20100101 Firefox/121.0, http.target: /user.js, otel.name: HTTP GET /user.js, otel.kind: "server", request_id: 8a1c95d5-c48b-4174-a173-b2977fc10e5c exception.message: Le fichier spécifié est introuvable. (os error 2) exception.details: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." } 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: "Le fichier spécifié est introuvable." }
2024-01-23T10:31:34.251284Z INFO actix_server::builder: starting 4 workers
2024-01-23T10:31:34.251297Z INFO actix_server::server: Actix runtime found; starting in Actix runtime
2024-01-23T10:31:38.050259Z 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; rv:121.0) Gecko/20100101 Firefox/121.0, http.target: /theme.css, otel.name: HTTP GET /theme.css, otel.kind: "server", request_id: 263b5379-dd15-48e4-985e-5425081a74de exception.message: Le fichier spécifié est introuvable. (os error 2) exception.details: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." } 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: "Le fichier spécifié est introuvable." }
2024-01-23T10:31:38.055489Z WARN HTTP request{http.method: GET, http.route: /user.js, 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; rv:121.0) Gecko/20100101 Firefox/121.0, http.target: /user.js, otel.name: HTTP GET /user.js, otel.kind: "server", request_id: 29c4e4de-a941-4a08-9ec1-967b8a9b4b13 exception.message: Le fichier spécifié est introuvable. (os error 2) exception.details: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." } 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: "Le fichier spécifié est introuvable." }

Publish win-gsmtc to crates.io?

I'm toying with GlobalSystemMediaTransportControlsSessionManager and I see you've already put in a bunch of work into getting it usable.

Are there plans to publish it to crates.io as a standalone crate? It seems fairly complete from a quick scan.

When using "include" filter nothing shows up.

Hello,
This is working great. I'm trying to tweak the setting so it only pulls song info from Firefox and when I use the include setting song info doesn't come up. Running on Win11 Firefox 99.0. Alternatively, if I change it to exclude, it starts working again pulling data from Chrome and Firefox. Am I just missing something? Any help is appreciated.

Side Note - i'm pretty nooblet with css. Is there a sample theme.css file that can be used/shared?

config file
no_autostart = true
[modules.gsmtc]
enabled = true

[modules.gsmtc.filter]
mode = "Include"
items = ["firefox.exe"]

[server]
port = 48457

Centering the Position of the Widget

Hey,
I think it would be really nice to be able to center the positioning of the widget. Currently it defaults to top left. Perhaps add a ?pos=c or something like that.

Output to file

Config:

[file-output]
path = "path/to/file.txt"
type = "text"
# optional
format = "{artist} - {title}"
# or
type = "json"
  • Output to text file
  • Output to json

Move title/artist cleanup to extension

Currently, cleanup of titles is done in various places throughout the project.

This should be reduced, since some parts don't need any cleanup (spotify for example) but others might need a lot more (for example youtube through GSMTC).

min-width causes album art element to stretch

using this theme.css:
:root { --theme-color: white; --image-overlay-opacity: 75%; } #song-container { min-width: 450px; }

results in the album art element being stretched (not the art itself) instead of adding whitespace on the right:

image

Theme not loading due to EXE creating the incorrect (or simply different?) config file

Heya! I was trying to use this tool and simply could NOT get the theme to load. After trying to figure it out for about an hour, I discovered that the config on the documentation site is different than the default config the EXE creates. The one on the documentation site actually loads the theme properly.

Here's some images for comparison. The first one being from the site and the second one being what the EXE creates by default.

github overlay 1
github2

To be honest, not sure why changing it to what's listed on the documentation works, but it does. On firefox it no longer shows the error of not being able to find theme.css once I changed it.

Would recommend checking this out as I almost changed tools due to this!

EDIT: This is for the most recent version 0.10.

Stopped working

Was working fine a week ago, using opera.exe to grab YouTube data.
Displays an error now

2023-11-30T15:41:49.108173Z  INFO actix_server::builder: starting 16 workers
2023-11-30T15:41:49.108205Z  INFO actix_server::server: Actix runtime found; starting in Actix runtime
2023-11-30T15:43:05.581668Z  WARN HTTP request{http.method: GET, http.route: /user.js, 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/30.0.0 Safari/537.36, http.target: /user.js, otel.name: HTTP GET /user.js, otel.kind: "server", request_id: 1f9d6da7-9d79-4f0b-bf1b-d25857b7ddb2 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." }
2023-11-30T15:43:14.507325Z  WARN HTTP request{http.method: GET, http.route: /user.js, 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/118.0.0.0 Safari/537.36 OPR/104.0.0.0, http.target: /user.js, otel.name: HTTP GET /user.js, otel.kind: "server", request_id: 1b3436a3-0ce1-4a97-9337-606ac5eb0207 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." }
2023-11-30T15:43:55.869976Z  INFO actix_server::builder: starting 16 workers
2023-11-30T15:43:55.869986Z  INFO actix_server::server: Actix runtime found; starting in Actix runtime
2023-11-30T15:44:02.614550Z  WARN HTTP request{http.method: GET, http.route: /user.js, 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/30.0.0 Safari/537.36, http.target: /user.js, otel.name: HTTP GET /user.js, otel.kind: "server", request_id: ecb9b5bd-2533-47dd-9ab1-1798fce77924 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." }
2023-11-30T15:49:09.971856Z  WARN HTTP request{http.method: GET, http.route: /user.js, 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/118.0.0.0 Safari/537.36 OPR/104.0.0.0, http.target: /user.js, otel.name: HTTP GET /user.js, otel.kind: "server", request_id: 520eaa09-1a62-465b-881f-e4ab2e41c89f 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." }
2023-11-30T15:50:57.644442Z  INFO actix_server::builder: starting 16 workers
2023-11-30T15:50:57.644473Z  INFO actix_server::server: Actix runtime found; starting in Actix runtime
2023-11-30T15:51:11.972392Z  WARN HTTP request{http.method: GET, http.route: /user.js, 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/30.0.0 Safari/537.36, http.target: /user.js, otel.name: HTTP GET /user.js, otel.kind: "server", request_id: bc3004ee-58d2-4d20-a700-f31b5cd72b75 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." }
2023-11-30T15:51:14.550183Z  WARN HTTP request{http.method: GET, http.route: /user.js, 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/118.0.0.0 Safari/537.36 OPR/104.0.0.0, http.target: /user.js, otel.name: HTTP GET /user.js, otel.kind: "server", request_id: 0b3bcf1e-744b-4470-9110-b26fa122d5cc 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." }

Document Setup

  • Add video tutorial
  • Add screenshots of setup in readme
  • Impove documentation in readme

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.