Giter VIP home page Giter VIP logo

sunamu's Introduction

Logo

Sunamu (スナム)

Show your currently playing song in a stylish way!

Screenshots

Lyrics preview Browser preview Widget preview OBS source preview Sunamu will never gonna give you up Hey!

OwO wats dis?

Sunamu (pronounced as it is written) is a fancy music controller whose only purpose is to look as fancy as possible on secondary displays.

It effectively is the WAY TOO COMPLEX successor of MPRISLyrics, a project I made back when synchronized lyrics on Linux was a niche thing to have.

Features

  • Display what you are playing in your TV, secondary display, or (heck) around the entire house!

  • Get the Spotify link for every song you listen to!*

  • Get lyrics for your songs!

  • Get a GOOD Discord Rich Presence, finally!*

  • Bragging rights for your particular taste in music!**

    *This feature, or part of it, requires a Spotify Client ID and Client Secret.

    **No responsibility is taken from the Sunamu devs and contributors if you have bad taste in music

Installation

Sunamu only works on Linux! Do not spam the issue section regarding Windows or macOS, as it cannot be ported to those computers!

Linux

NOTE: Sunamu is very slow on development, mostly because there's hardly anything to implement that the developer can do. Please consider this when running a tagged release, as you can easily run a months-old, or even years-old, version. Please try compiling Sunamu from this repo instead!

Get the latest release from the Releases section.

Configuration

Sunamu's configuration file is located in:

  • Linux: Usually ~/.config/sunamu/config.json5 ($XDG_CONFIG_HOME/sunamu/config.json5);
  • Linux Flatpak: ~/.var/app/xyz.nyaomi.sunamu/config/sunamu/config.json5 (unsupported! but you can compile it yourself);

You can use it to enable or disable features, and there are a LOT of them!

Do you want to give it a read? Here it is!

Usage

Just launch it and preferably put it in fullscreen!

Notable observed quirks

Check and contribute to the compatibility table here.

License

See the LICENSE file.

sunamu's People

Contributors

aimerneige avatar boloped avatar busybox11 avatar epcosta17 avatar kamiya10 avatar nyaomidev avatar surajbhari avatar vistaus 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  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  avatar  avatar  avatar

sunamu's Issues

Lyrics not syncing with music

Hello there,
Thank you for this awesome application. I just downloaded 2.1.0 release as AMD64 deb.

I installed it on my KDE 22.10 linux machine.
I'm using Spotify deb as my player.

The song title and artist are displayed correctly, but not the thumbnail.
Also the buttons, play pause, previous, next are working fine too.

Nevertheless the lyrics are showing properly but unfortunately they don't follow along with the song.

Also for the first second the playing position bar on the bottom appears, then it disappears, which makes me think that Sunamu is not able to fetch the time related information about the song, hence the time bar disappears, and hence lyrics don't sync.

I've tried checking the configuration, but it is set as default and karaoke: true.
No logs are output when run from the terminal.

If any further info is needed I'll gladly comply.

Thanks,
Paul.

Race condition: lyrics and extra song info appear on other songs when fast skipping

Currently, for each update that Sunamu gets, a callback function updateInfo is called with the current update as its argument. This function runs asynchronously and it does a chain of asynchronous stuff:

  • update the shown information once, right after the update was pushed (first point of suspension)
  • gather more information about the track being played (lyrics.. etc) (second point of suspension)
  • update the shown information again, to push all the remaining information to the renderer process(es) (third point of suspension)

Now, if updates were sparse in time, this would've been a non-issue since there'd be plenty of time for the neat completion of any and all of those function calls; however, if a person skips really fast or if they have a bad Internet connection that delays the information gathering, then we are presented with race conditions.

We must avoid those race conditions, and mark as "out of date" all the updateInfo calls running, except the very last one

Delayed lyrics

When using Jellyfin on the Sonixd client, lyrics lag about half a second behind.

Check ID3/lrc file for lyrics

It's great how many different lyrics Sunamu can find! However, some of them just don't exist (music too new/too niche) or the syncing is wrong. I like adding my own synced lyrics to the ID3/Vorbis tag so that they are correct.

Would you consider checking the file tag, then for a .lrc file, and then checking other online sources?

CPU temp goes way up

I'm trying to run this with GNOME 42, unfortunately while it works, I have noticed the CPU temperature climbs almost to 60C, normally it sits about 36C.

Use `backdrop-filter` over `filter` for background

With filter, the framerate seems to drop when the background is changing:
https://cdn.korbsstudio.com/2022-01-15%2019-36-56.mp4 (Dead link)

With backdrop-filter, seems more smooth with no frame drop:
https://cdn.korbsstudio.com/2022-01-15-19-35-58.mp4 (Dead link)

Usually adding something basic to CSS should help, kinda like:

.background::before {
     position: fixed;
     top: 0px;
     left: 0px;
     width: 100%;
     height: 100%;
     backdrop-filter: blur(64px) brightness(50%) saturate(150%);
}

App window space too large if lyrics set to false

If one sets the Lyrics to false the app still thinks the window is that large so there is no way to drag it up near the top of the screen.
It would be nice if the app resized if no lyrics used. I'm using GNOME 42.

Widget disappear on windows 11.

Hello. I just installed Sunamu in windows 11 and the widget disappears when I open any application and return back to desktop.
I have to click on taskbar( normally where time is shown) so that widget can return. Is this windows 11 only problem? Any resolution.
It absolutely works fine in my Ubuntu and Manjaro distribution. I am using it with Vivaldi Browser and YT music. Vivaldi is chrome based so identification works fine.

[Feature bounty]: A way to manually search for lyrics

Full disclosure: This is a paid feature request.

Implement some way to choose the current provider for the lyrics per song. Implement a way to refine queries for songs (by manually specifying artist and title and album, for example).

This can be hacked around first, done it proper later.

[question][feature?] Lyric (LRC) file ?

This post complete the answer at #73

where I can put the " .lrc / .srt " file ?
I see "local: true" on the config.json but where I can add the "folder location" ?

Aside from that, you don't need to move your local .LRC files from where they belong (in pair with the tracks you're playing.)
Note that Sunamu does not support SRT files, and you need a compatible local music player to get local lyrics (such as Strawberry Music Player.)

Hello,
thank you for your answer,

What is the "local:true" values for ?
https://github.com/NyaomiDEV/Sunamu/blob/48f99900e2b9e0a7352f6d4d96b19df808f895c5/assets/config.json5#L69C10-L69C10

Because I mean, I have a youtube video, the player can found the title of the music, but there is "no lyric" for that, so, where I need to add the file ?

UI shifted and updates no longer working after sleep

I was using Sunamu for a bit and then had to do something else, so I left it in the background in one of my tabs.
Later on my laptop went to sleep, and when unlocking it and going back to Sunamu's browser tab, the whole UI shifted to the left and the updates are no longer working (see screenshot)
image
As the devtools suggested, the webserver is no longer accessible, though I don't know if it happened before or after sleep (but my guess is after).
Indeed, Sunamu is nowhere to be found in the task manager.

Background Playback

Please make this app run in background/system tray.
and any way to change lyrics provider?

appreciate your work. this app is awesome.

conflicts with mailspring when install at fedora 36

$ sudo dnf install sunamu-2.0.0.x86_64.rpm -y
Last metadata expiration check: 1:25:20 ago on Sat 30 Jul 2022 12:17:29 AM CST.
Dependencies resolved.
===================================================================================================================================================================================================================
 Package                                          Architecture                                     Version                                            Repository                                              Size
===================================================================================================================================================================================================================
Installing:
 sunamu                                           x86_64                                           2.0.0-1                                            @commandline                                            84 M

Transaction Summary
===================================================================================================================================================================================================================
Install  1 Package

Total size: 84 M
Installed size: 306 M
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Error: Transaction test error:
  file /usr/lib/.build-id/0c/42bafd2a685e794204ca324424b97defdf517f from install of sunamu-2.0.0-1.x86_64 conflicts with file from package mailspring-1.10.3-0.1.x86_64
  file /usr/lib/.build-id/1a/748b384a307a449725ccf1f8fa7a1e80b7e03e from install of sunamu-2.0.0-1.x86_64 conflicts with file from package mailspring-1.10.3-0.1.x86_64
  file /usr/lib/.build-id/3e/5ddfa3f763787484222e0129355a46f5852c53 from install of sunamu-2.0.0-1.x86_64 conflicts with file from package mailspring-1.10.3-0.1.x86_64
  file /usr/lib/.build-id/70/1a8c90b80fc7b21ab802d31ef1dc84564abfb2 from install of sunamu-2.0.0-1.x86_64 conflicts with file from package mailspring-1.10.3-0.1.x86_64
  file /usr/lib/.build-id/9c/ea93fad89b2657dd6c86ceaefd966401c3ec72 from install of sunamu-2.0.0-1.x86_64 conflicts with file from package mailspring-1.10.3-0.1.x86_64
  file /usr/lib/.build-id/be/3de1e7b9f4091f69dfd725fb88791aa6c6a9e2 from install of sunamu-2.0.0-1.x86_64 conflicts with file from package mailspring-1.10.3-0.1.x86_64
  file /usr/lib/.build-id/dd/6005cc96f2e73704ae040e75e5eb6e9db79858 from install of sunamu-2.0.0-1.x86_64 conflicts with file from package mailspring-1.10.3-0.1.x86_64
$ neofetch 
             .',;::::;,'.                aimerneige@fedora 
         .';:cccccccccccc:;,.            ----------------- 
      .;cccccccccccccccccccccc;.         OS: Fedora release 36 (Thirty Six) x86_64 
    .:cccccccccccccccccccccccccc:.       Host: TM1701 
  .;ccccccccccccc;.:dddl:.;ccccccc;.     Kernel: 5.18.13-200.fc36.x86_64 
 .:ccccccccccccc;OWMKOOXMWd;ccccccc:.    Uptime: 9 hours, 34 mins 
.:ccccccccccccc;KMMc;cc;xMMc:ccccccc:.   Packages: 2632 (rpm), 117 (flatpak) 
,cccccccccccccc;MMM.;cc;;WW::cccccccc,   Shell: zsh 5.8.1 
:cccccccccccccc;MMM.;cccccccccccccccc:   Resolution: 2560x1440 
:ccccccc;oxOOOo;MMM0OOk.;cccccccccccc:   DE: GNOME 42.3.1 
cccccc:0MMKxdd:;MMMkddc.;cccccccccccc;   WM: Mutter 
ccccc:XM0';cccc;MMM.;cccccccccccccccc'   WM Theme: Gruvbox-Material-Dark 
ccccc;MMo;ccccc;MMW.;ccccccccccccccc;    Theme: Gruvbox-Material-Dark-HIDPI [GTK2/3] 
ccccc;0MNc.ccc.xMMd:ccccccccccccccc;     Icons: Gruvbox-Material-Dark [GTK2/3] 
cccccc;dNMWXXXWM0::cccccccccccccc:,      Terminal: gnome-terminal 
cccccccc;.:odl:.;cccccccccccccc:,.       CPU: Intel i7-8550U (8) @ 4.000GHz 
:cccccccccccccccccccccccccccc:'.         GPU: NVIDIA GeForce MX250 
.:cccccccccccccccccccccc:;,..            GPU: Intel UHD Graphics 620 
  '::cccccccccccccc::;,.                 Memory: 11971MiB / 15782MiB 

mailspring version: Version 1.10.3-a476c230

Some sort of graphical bug

i recently switched from GNOME to KDE Plasma and i've been getting this weird graphical issue where the ui keeps overlapping itself. it could just be kde, because it worked fine on gnome i use Pop!_OS 22.04 :)

there's no errors when running it through the terminal, i feel like i didn't give enough information, so if you need more i'll happily give it

Ensure proper comments are written for each and every entry in the configuration file.

Sunamu will probably never have a configuration GUI because since it is not based off React, Vue or anything like that, making code to handle dynamic configuration can only be difficult at best.

However, I guess that manually editing a configuration file is simple enough if there are clear instructions on how to properly edit it.

This issue is here to remind me to update the configuration file with all the arguments actually supported in Sunamu (it currently misses a few) and to comment on each and every section of the configuration file.

roadmap

Stuff that is not coming

  • macOS support
  • Spotify Connect (you have the original project for that)
  • Fixed Spotify support on Linux (not our issue, but theirs)

Stuff that I am actually willing to do

  • Quality of life improvement on UI and UX
  • Nothing else

Problems in running both RPM

Running the RPM makes NPM complain about not having the sharp package installed.
Do I really neep to install npm for the sharp package?

not showing lyrics with `youtube-music`

I am on 2.1.0 (official .pacman build)
denyList in my configuration is empty

dbus-send --session --dest=org.freedesktop.DBus --type=method_call --print-reply /org/freedesktop/DBus org.freedesktop.DBus.ListNames | grep org.mpris.MediaPlayer2
      string "org.mpris.MediaPlayer2.chromium.instance768356"

Support for other lyric proviers?

Having the option to choose other providers would be great. I've run in to handful of songs so far that have no lyrics displayed because of NetEase not having them.

[bug] Error with AppImage on Ubuntu 20.04 + build process ?

Hello,

I have a problem when I try to use the appimage on Ubuntu:

$> chmod +x Sunamu-2.2.0/AppImage
$> ./Sunamu-2.2.0/AppImage
[lyricsOffline.js:convertUncompressed:68:23] Cannot convert uncompressed lyrics; probably the cache path does not exist.
[lyricsOffline.js:statCachePath:85:23] Cannot stat lyrics cache path; probably it does not exist.
sunamu: symbol lookup error: /tmp/.mount_SunamumtyBXM/resources/app.asar.unpacked/node_modules/sharp/build/Release/sharp-linux-x64.node: undefined symbol: vips_fail_on_get_type

I don't know what's wrong and how to fix that
on internet, some people said we need to update npm install sharp@latest
but with an AppImage I don't know how to do that.

also question 2, where I can put the " .lrc / .srt " file ?
I see "local: true" on the config.json but where I can add the "folder location" ?

Regards

musixmatch package - is it necessary?

nice program. came across it by total accident. was experimenting installing different aur helpers and sunamu happened to be on the recently updated package list on the aur home page. good for me! haha

i'm on archlinux

i installed the musixmatch-bin package from the aur. launched it, but it just brought up a sign up page. not sure if it is necessary to launch that or keep it running in background. sunamu seems to work without it. I am getting lyrics (most of the time). sometimes i dont, not sure why

Option to hide browser source when nothing is playing

Personally used sunamu for a while. and suggested it to a streamer. his complaint was that the widget takes a lot of unused space when nothing is playing in the background. in this case if the option is enabled then "all" of the elements in browser source shall not be rendered.

Restrict app from collapsing

When one hovers the mouse over the application it expands to show the player controls. Is there a setting to always show the player controls and not have it collapse?

Error: Could not load the "sharp" module using the linux-x64 runtime

Sorry in advance as I'm not exactly as well versed in all this as I'd like to believe I am.

I downloaded the AppImage file for Sunamu and found out I couldn't execute it, even after checking if all the permissions were enabled. I then tried to execute it on the terminal (./Sunamu-2.2.0.AppImage) but got this error message:

Screenshot from 2024-01-30 12-49-07

  • OS: Ubuntu 23.10
  • Node: 20.11.0
  • NPM: 10.2.4

Always-on-top Window

Hi, thanks for making this great app.

I want to ask whether the window can set as always-on-top?

Application fails to start if /tmp mounted with noexec

Steps to reproduce on Linux:

$ sudo mount -o remount,noexec /tmp
[sudo] password for xxxxx:

$ /opt/Sunamu/Sunamu
A JavaScript error occurred in the main process
Uncaught Exception:
Error: /tmp/.org.chromium.Chromium.yDNkdK: failed to map segment from shared object
at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1800)
at Object.Module._extensions..node (node:internal/modules/cjs/loader:1199:18)
at Object.func [as .node] (node:electron/js2c/asar_bundle:5:2027)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at load (/opt/Sunamu/resources/app.asar/node_modules/node-gyp-build/index.js:21:10)
at Object. (/opt/Sunamu/resources/app.asar/node_modules/leveldown/binding.js:1:43)
[6532:0802/103649.142339:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process.

[Feature bounty]: Rewrite the app in Rust

Full disclosure: I was going to do it anyway, but I got paid for it too.

Ditch Electron and its shitty 100MB requirement to package an app. Embrace Rust, so Tauri.

This issue is blocked by a number of things that are not inside this repository.

For now we have

  • Rust Windows binding for music control

We lack

  • Rust macOS binding for music control
  • Rust Windows binding to keep the window at the bottom (Z-index)
  • Rust Linux binding for music control
  • De-electronifying all the code
  • Running the front end code in Tauri (as a front to the Node back end we have)
  • Porting the back end to native Rust to use inside Tauri

macOS developers wanted

TL;DR I need this to work on macOS but I do a shitty job at being a developer. Developers needed. H E L P

Long version:
Here at Sunamu I am committed to the support of every desktop platform on planet Earth. After porting the project to Windows, it only makes sense to port it to macOS; however, the road is bumpier than I imagined.

  • For starters, there's no obvious way to get what's playing on a Mac, because there's no equivalent of a global Now Playing API and a third party application can only officially control the Apple Music app.
  • Going the AppleScript route means that there'd be no events and everything is polled explicitly by Sunamu, which will reduce responsiveness and overall performance; also, synchronized lyrics are a time sensitive matter, so having reasonably short poll times and async events is a must. Plus, if using AppleScript scripts Sunamu must know in advance which app is open and playing music, or brute force through a list of known media players; all of which is not ideal.
  • We could do it like other (native) lyrics applications do it: by making a custom Objective-C framework that exposes us the MediaRemote private framework; but Objective-C doesn't really do well with NodeJS and Electron, plus I lack the knowledge of building a native ObjC addon that can talk to the Node context.

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.