Coder Social home page Coder Social logo

sptlrx's Introduction

A light novel (Japanese: ライトノベル, Hepburn: raito noberu) is a type of popular literature novel native to Japan, usually classified as young adult fiction targeting teens to twenties. The definition is very vague, and wide ranging.

Wikipedia, the free encyclopedia.

sptlrx's People

Contributors

bachoseven avatar ethangillengg avatar jzw2 avatar mhoogesteger avatar moritzboehme avatar raitonoberu 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

sptlrx's Issues

[FEATURE] TimeStamp and Export stdout

Hey, should be a simple idea, but to be able to include the timestamp in the stdout and also a --export to just download the entire .lrc file. since, there's not a single working/reliable .lrc downloader

Option to hide errors

When using a device without a constant internet connection (e.g. laptop), the script shows an Error, as it can't access the spotify api (Error: Get "https://open.spotify.com/get_access_token?reason=transport&productType=web_player"...).
This error message shows up on my status bar, when I would rather have it not show anything if it can't access the internet.
Could you add an option/flag to hide it?

[Feature Request] Font size change

The vim plugin zen-mode by folke has the ability to change the font size of Kitty, Wezterm and Alacritty.

Here's an example in lines 36-75. I would do it myself, but I'm not knowledgeable enough in Go or in programming in general.

This would allow for the lyrics window to have a different font size making it more readable, this can be done easily by zooming in, but adjusting the font size this way means that it can then be reversed after the application closes.

This is just an idea and I would understand it if it's not implemented

Support for different players

Now I get the current track and position from Spotify itself. But it is theoretically possible to add support for other sources and use Spotify only to get the lyrics.

Suggestion: improved MPRIS query

Description

I noticed that I was getting some incorrect lyrics for certain songs. If I understand correctly, the query constructed by the MPRIS source (and perhaps others as well, I didn't check those) is <artist> <title>. I would like to suggest <artist> - <album> - <title> instead (if != "" like now, of course).

If you agree to this conceptually, I'd be willing to open a pull request if desired. My Go experience is very limited, but this change looks simple enough.

Motivation

The current query does not seem to sufficiently narrow down results. For example, I noticed issues with the Exegenesis tracks from Muse's album The Resistance (some others as well but these are the ones I experimented with more in-depth). The last 3 tracks of the album are:

  • Exogenesis: Symphony Part 1 (Overture)
  • Exogenesis: Symphony Part 2 (Cross-Polination)
  • Exogenesis: Symphony Part 3 (Redemption)

When I try the current query (e.g. curl -G "https://lyricsapi.vercel.app/api/lyrics?lrc=1" --data-urlencode "name=Muse Exogenesis: Symphony Part 1 (Overture)" for the first one), it returns the lyrics for the track "Hysteria" from the album "Absolution" (also by Muse) instead, for each of the three songs. When I try my suggested query (e.g. curl -G "https://lyricsapi.vercel.app/api/lyrics?lrc=1" --data-urlencode "name=Muse - The Resistance - Exogenesis: Symphony Part 1 (Overture)") it gives the correct lyrics.

For reference, the - seem to be required for disambiguation: if I leave them out, the first two tracks resolve correctly but the third one still returns the lyrics for "Hysteria".

PS: thanks for the amazing application, I only recently discovered it but I'm loving it already.

Any plans to support FreeBSD?

(Or *BSD if that's easily doable)
Currently it doesn't build on FreeBSD because the mpris source files are only for Linux, Windows, and Darwin.
I was wondering if there were any plans to support BSDs in there, in theory they should be similar or even the same as Linux.

Support regex in players whitelist

Use case: I'd been using sptlrx to get the lyrics for ncspot, a TUI Spotify player, and for a few versions it's not advertised as "ncspot" on MPRIS, but instead as ncspot.instancexxxxx, where xxxxx is a random number like 23409.

For this reason, it would be really useful to be able to write a regex such as

mpris:
  players: [ncspot.instance*, tauon, spotify]

instead of removing the whitelist altogether (which would mean that things like Chrome tabs get recognised as lyrics).

Thanks for making this project btw, it's awesome!

The project is alive!

You may think that the project is in a state of stagnation, but I'm here to say that it's not :)

I'm going to take the final exams, perhaps the most important in my life. That's why I had to forget about programming for a while. But hey, I'll be back at the end of June.

I'm almost done adding system-wide players and mpd, I just haven't commited anything yet. Thank you for your patience.

Lyrics API not responding?

For about a week now, no lyrics have showed up in sptlrx, just blank, then I took a look at the output of curl -G "https://lyricsapi.vercel.app/api/lyrics?lrc=1" --data-urlencode "name=$(playerctl metadata --format '{{artist}} {{title}}')" as suggested by your comment in another issue, and it just returns nothing.

Migrate to lrclib.net

Here we'll track the progress of moving the source of free lyrics from Spotify to lrclib. Since lrclib's own search engine is not good enough to find the desired track, what we will do is:

  • sptlrx sends a fuzzy query to our lyrcsapi instance;
  • lyricsapi makes a search request to Spotify, which will give us the exact metadata;
  • then we make a request to lrclib's api with the exact title, album, artist and duration, and they give us the lyrics;
  • we parse their format and return good old JSON to sptlrx.

What's nice about this is that Vercel caches our responses, so we won't make the same request to lrclib twice. I tested this scenario briefly and it works awesome, it even has lyrics to songs that Spotify doesn't have. Also, AFAIK, we don't even need to specify Spotify cookies when hosting lyricsapi because unregistered users can do search requests too.

Suggestion: MPRIS for Macos

Im sure many ncspot (MPRIS) users like me is waiting for mac support. This would be crazy!

At this moment, when i edit the config to work with mpris on my m1 mac, i get the below error:
Error: couldn't load player: darwin is not supported

Black screen

Just added cookie and set player as mpris. Getting black screen without any response from sptlrx. Can't seem to find logs

Lyrics flashes randomly

I have a very strange problem. Lyrics are disappearing and appearing again on the screen randomly (I guess) Here is a video:

sptlrx.mp4

Why is this happening? Could it be my spotify cookie wrong (expired) somehow?

I think it is also affecting sptlrx pipe. I get the same line twice even though it doesn't appear in the song twice.

Allow piping of current line

Hi, first off a great thanks for creating something like this , its really an awesome feature , been looking for something like this since forever.

  • will it be possible to pipe out the output so any other application can use it as well. A great application of it will be to be able to show the current lyric line in waybar/polybar

  • also will it be possible to have a offset for lyrics ( can be both ve/+ve )

Output *only* ONE lyric line to the pipe?

Hi! I'm trying to use this application in a setup where I would like to only show the current line to terminal then exit.
I can't seem to get this working because the application never exits.

I would like to suggest the following improvements:

  • Only output the current line then exit

  • An option to output the next lyric line alone then exit, like above, BUT slightly in advance (Think: Karaoke). I like to sing along but sometimes I forget the lyrics.

    • Perhaps could be configured like this:
     pipe_single_line: true,
     karaoke_mode: true

My current actual use case is the following:

image

I have several other use cases I can think about, that would be solved by making this behaviour work.

Related: #1, #8

How install in raspberry pi?

Hi.
I try the

curl -sSL instl.sh/raitonoberu/sptlrx/linux | bash

This happened:

i Found latest release of sptlrx (version: v1.0.0) i Found 9 assets in 'v1.0.0' release - searching for one that fits your system... i Found asset with highest match score: sptlrx_1.0.0_linux_arm64.tar.gz i Downloading asset... i Installing 'sptlrx' i Running clean up...

But, im using raspberry pi 2, that is a 32bit.

what can i do?
Thanks.

Local lyrics source

As mentioned in #22 (comment), downloading lyrics is a bit out of scope for this application, but since it was mentioned there are other ways to do this, would it be reasonable to allow for this application to show downloaded lyrics, forgoing an API? I think it would provide a lot of peace of mind knowing that the lyrics will always be there for you. From the name I'm guessing this project started out only for Spotify, but for people who use MPD or other local players I think this is a not too uncommon concern.

[2024.04] Lyrics API stopped working

Well, it wasn't hard to expect, Spotify got a change on the server (over 2 years btw!) that broke our lyrics scraping. I'm currently looking into the problem, and thankfully it seems easily fixable.

But I'm very busy these days, so expect changes in the range of a day to a couple weeks.

Thanks for staying here ❤️

Web version

The idea is to run an HTTP server so that every device on the local network can open sptlrx in a browser and enjoy pleasant and smooth lyrics.

Pros:

  • Run on one device and connect easily from anywhere.
  • The absence of terminal limitations allows us to show beautiful animation.

Cons:

  • The app may seem "bloated" with features.
  • High network latency may possibly make it unusable.
  • We'll have to write a frontend on something other than Go.

In fact, the backend seems to be ready and is in the web branch. We only need to write a nice frontend.

Lyrics won't work for Mopidy-Spotify

I tried it with the spotify app and it worked perfectly. But for some reason it won't work with mopidy-spotify. Is there any way to make it work?

Wrong version number

Hey, I just noticed when running sptlrx --version the version displayed for 0.2.0 is still sptlrx version v0.1.0. This is in no way the most urgent issue, but may be confusing.

Browser extension

Le problem

  • MPRIS does not work with Firefox (the issue is open for 3 years).
  • Not possible to get the currently playing track from the Chromium browser on Windows/Mac.

Le solution

We can create a browser extension to pass the currently playing track to sptlrx. I see two ways to achieve this:

  1. The extension creates an HTTP server. sptlrx sends a GET request to it every X seconds to get the currently playing track. But I'm not sure if it's possible to create one.
  2. sptlrx creates an HTTP server. The extension sends the currently playing track every X seconds via a POST request.

Also, there is a thing called Native messaging, but this requires additional research.

Unable to find cookie

Hey I followed all the instructions and put the cookie in yaml file but it is not working I think I am entering the wrong data as cookie. Please help.

Bug: Typo in Config File

First of all I just wanted to say wow, this project is awesome!! I have been looking for a lyrics player in the terminal for a while now so this is great, thanks for your hard work 😄

Bug Description

I noticed there is a typo in the config file, and README.md where it says undeline instead of underline. The config seems to only work when you use the typo. The CLI args it work as expected, it is just in the config.yaml file.

Thanks!

Platform

NixOS 24.05 (Uakari)

Version

sptlrx version v1.1.0

Clear lyrics when Spotify client is closed

When I close my spotify client, sptlrx continues to go through the lyrics until it gets to the end of the song. Would it be possible to clear the output when the spotify client is no longer running?
I am using sptlrx pipe in polybar and it continues to update the lyrics for minutes after I closed Spotify.

Eye candies on lyrics displaying

Thanks for this great terminal app! I'd like to nitpick a bit regarding to the way the lyrics are displayed.

  • Currently the lines that have been played are also highlighted. I think it's more appealing to have only the current line highlighted with other lines (played and yet to be played) dimmed. If you are not interested, providing an option to change this behavior is greatly appreciated!
  • Is it possible to make the font size of the current line a bit bigger? It would be more immersive that way in my opinion.

Love!

Refactor to use lyricsapi package

It was an absolutely terrible idea to copy and paste all the spotify-related code from lyricsapi instead of using it as a package. I need to refactor it ASAP so it's not such a pain to maintain.

[Darwin] System-wide players support

Currently, only MPRIS on Linux allows you to use system-wide players to get the currently playing track and position. I bet there is something similar for Mac, but I don't have an Apple device for research, development and testing.

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.