crobibero / jellyfin-plugin-lrclib

GNU General Public License v3.0
29 stars 6 forks source link

Lyrics not being downloaded / no manual download option #3

Open pbogre opened 4 months ago

pbogre commented 4 months ago

I just installed this plugin on my Jellyfin 10.9 server. First of all I see in the code that the settings should show 3 checkboxes, however in my settings I can only see the checkbox for strict search (the other 2 are briefly visible before disappearing).

I'm also not sure how this plugin is meant to be used. Is it supposed to automatically fetch lyrics for my music library? Because it's not doing that, and I also see no option to fetch lyrics manually for a given artist/album/track. Any help?

crobibero commented 4 months ago

I only tested with manual searching using Jellyfin's api, and forgot to hook lyrics into the rest of the functionality.

As of right now Jellyfin only fully supports lyrics that are already available either embedded or next to the audio file.

I may add a scheduled task to automatically download lyrics into the plugin as a temporary fix.

pbogre commented 4 months ago

Do you mean that you tested by finding lyrics that are already present in the tracks?

I can see in the code for this plugin that there is functionality to fetch lyrics, however it's not being called anywhere. Is this plugin something that is still WIP, or is there already a way to use it to fetch lyrics?

crobibero commented 4 months ago

The only way to search for remote lyrics right now is to manually hit Jellyfin's API.

thomasdalberto commented 4 months ago

Can you please explain better what do you mean by "manually hit Jellyfin's API"? how should it be done?

Klar commented 3 months ago

any update on this on how to search for lyrics and generate files?

rom4nik commented 3 months ago

Can you please explain better what do you mean by "manually hit Jellyfin's API"? how should it be done?

You can do this with 2 requests per song, e.g. via curl or browser devtools (I used "edit and resend" in Firefox to quickly borrow Authentication header from one of other requests frontend sends to backend).

  1. https://api.jellyfin.org/#tag/Lyrics/operation/SearchRemoteLyrics

GET /Audio/{itemId}/RemoteSearch/Lyrics

This will return available lyrics from all enabled lyrics providers (which in my case was only LrcLib), for example:

[
  {
    "Id": "a1da397dd09c89a18bacecb3a5d45d37_984710_synced",
    "ProviderName": "LrcLib",
    "Lyrics": {
      "Metadata": {
        "Artist": "Two Feet",
        "Album": "A 20 Something Fuck",
        "Title": "I Feel Like I'm Drowning",
        "Length": 1860000000,
        "IsSynced": true
      },
      "Lyrics": [
        {
          "Text": "You keep dreamin' and dark schemin'",
          "Start": 132000000
        },
        {
          "Text": "Yeah, you do",
          "Start": 166800000
        },
[...]
      ]
    }
  },
  {
    "Id": "a1da397dd09c89a18bacecb3a5d45d37_984710_plain",
    "ProviderName": "LrcLib",
    "Lyrics": {
      "Metadata": {
        "Artist": "Two Feet",
        "Album": "A 20 Something Fuck",
        "Title": "I Feel Like I'm Drowning",
        "Length": 1860000000,
        "IsSynced": false
      },
      "Lyrics": [
        {
          "Text": "You keep dreamin' and dark schemin'"
        },
        {
          "Text": "Yeah, you do"
        },
[...]
      ]
    }
  }
]
  1. https://api.jellyfin.org/#tag/Lyrics/operation/DownloadRemoteLyrics

POST /Audio/{itemId}/RemoteSearch/Lyrics/{lyricId}

This downloads lyrics, saves them to server and also returns them in HTTP response.

GlassedSilver commented 3 months ago

Yeah, I think I'm waiting for the plugin to get a scheduled task. 😅

crobibero commented 3 months ago

Adding the scheduled task in https://github.com/crobibero/jellyfin-plugin-lrclib/pull/4

Feel free to test, it is pretty basic and not really configurable.

Krafting commented 3 months ago

Adding the scheduled task in #4

Feel free to test, it is pretty basic and not really configurable.

Thank you reaally much for your work !

Do you think it will be possible, in the future, to add a button to fetch lyrics for a specific song only (for example in the right click menu, and also something for Apps like Finamp to be able to fetch lyrics using this plugin), and not only get all the lyrics of all the tracks in your library ?

crobibero commented 3 months ago

Do you think it will be possible, in the future, to add a button to fetch lyrics for a specific song only

Yes, but that would be built into the server and not this plugin.

ShakedBaws commented 2 months ago

Adding the scheduled task in #4

Feel free to test, it is pretty basic and not really configurable.

thank you for this plugin . can you please explain how to use it on the github page? also would be really appreciated if you can add a button to fetch lyrics for current song or fetch lyrics for all liked songs. thank you in advanced.

crobibero commented 2 months ago
  1. Build and install the plugin
  2. Run the scheduled task
  3. Perform library scan
ShakedBaws commented 2 months ago

im sorry I never had to run scheduled task before I went to the " scheduled task" section in jellyfin but I don't see anything related to lyrics . maybe I missed it or am I doing something wrong?

GlassedSilver commented 2 months ago

im sorry I never had to run scheduled task before I went to the " scheduled task" section in jellyfin but I don't see anything related to lyrics . maybe I missed it or am I doing something wrong?

I'm gonna take a wild guess here and respectfully assume you're probably not a developer and hence didn't build the plugin yourself and installed it manually instead of the current release available through the standard procedure.

If that's the case it's probably best for you to just wait a little bit for the new version with the added functionality to release, probably not too far away now.

peter9teufel commented 2 months ago

Hi, is there an ETA for the next release that includes the scheduled job? Setting everything up to build the plugin myself would not be a great hassle as I am a developer but won't be worth the effort if the next release is around the corner 😄

Thanks for your work and best regards, Peter

Felitendo commented 1 month ago

Any updates? @crobibero

crobibero commented 1 month ago

I am not planning on releasing the plugin with the scheduled task built in. If you want it you will need to build it yourself. The task will exist for Jellyfin 10.10

Felitendo commented 1 month ago

Hey everyone. I got it working :D

You can add my repository here: https://raw.githubusercontent.com/Felitendo/jellyfin-plugin-lrclib/master/manifest.json

Then you need to do the following:

  1. Update your Jellyfin to 10.9.10 or above
  2. Go into your Plugin Catalog and install "LrcLib", it should be under "Notifications"
  3. Go into Sceduled Tasks and run "Download missing lyrics"
  4. Go into Librarys and then press "Scan all Librarys"
  5. Now the Lyrics should work. If they don't then you need to go to your Album -> Right click -> "Refresh metadata"

You can find the source code and ask for help here: https://github.com/Felitendo/jellyfin-plugin-lrclib

Hope this helps :)

TechnicallyMay commented 1 month ago

@Felitendo thank you so much! I'll give this a try soon.

thecodygriffin commented 1 month ago

For anyone else who may be installing from @Felitendo's repository, make sure you have upgraded to 10.9.10. The plug-in was initially unsupported for me as I was still on 10.9.7.

zidgeZ commented 1 month ago

@Felitendo Thank you very much, it works very well on my end! As what @thecodygriffin said, Jellyfin should definitely be upgraded to 10.9.10 as I've tried it on 10.9.9 and it didn't work.

TannerNelson16 commented 2 weeks ago

I tried both manually building the plugin and using @Felitendo 's repository and I can't get scheduled task to show up. I am on Jellyfin 10.9.11 if that affects anything. Any advice?

pollocluck commented 1 week ago

I tried both manually building the plugin and using @Felitendo 's repository and I can't get scheduled task to show up. I am on Jellyfin 10.9.11 if that affects anything. Any advice?

I second this. Any updates on this, @Felitendo?

Felitendo commented 2 hours ago

I tried both manually building the plugin and using @Felitendo 's repository and I can't get scheduled task to show up. I am on Jellyfin 10.9.11 if that affects anything. Any advice?

I second this. Any updates on this, @Felitendo?

I'm sorry that it doesn't work right now. I would need to test that and figure out how to update it to 10.9.11. I will try to fix it on Sunday (04.10.2024). If anyone knows what the issue could be or knows how to update it to 10.9.11, a pull request would be greatly appreciated :)