m4tx / tundra

MyAnimeList scrobbler for Linux
https://tundra.moe
GNU General Public License v3.0
53 stars 2 forks source link

Add browser window title detection too #97

Open K0-RR opened 8 months ago

K0-RR commented 8 months ago

I watch anime online in my browser instead of locally. It would be nice if Tundra could detect Firefox/Chromium running and monitor the current tab name. I know that not all websites will change the title depending on the episode, but most do.

m4tx commented 8 months ago

Do you have any examples of websites that do that? I thought MPRIS-based detection would suffice in these cases; I believe both Firefox and Chrome report media being played to the operating system. Another question is whether Tundra can make use of that in the current version - that's why I'm asking for specific websites so I can test them individually.

I'm unsure if there's a way to enumerate window titles on Wayland, so that might reduce the usefulness of such a feature, especially in the future, when more distros switch to Wayland by default. Ideally, other methods should be explored.

ligmaSec commented 8 months ago

Do you have any examples of websites that do that? I thought MPRIS-based detection would suffice in these cases; I believe both Firefox and Chrome report media being played to the operating system. Another question is whether Tundra can make use of that in the current version - that's why I'm asking for specific websites so I can test them individually.

I'm unsure if there's a way to enumerate window titles on Wayland, so that might reduce the usefulness of such a feature, especially in the future, when more distros switch to Wayland by default. Ideally, other methods should be explored.

dunno for other window managers, but hyprland gives you the details of the windows and their title with hyprctl clients