Giter Club home page Giter Club logo

jellyfin-plugin-lastfm's Introduction

jellyfin-plugin-lastfm

Enables audio scrobbling to Last.FM as well as a metadata fetcher source.

This plug-in was migrated from the original Emby repository and has been adapted to function within the Jellyfin ecosystem. This plugin cannot be distributed with Jellyfin due to a missing compatible license. I will attempt to keep this repo up-to-date and in-sync as the Jellyfin project matures.

๐Ÿ”ง Installation and Configuration

Install the plugin via the Jellyfin plugin repository (see: announcement). Navigate to plugins section of the admin dashboard, add the following repository to follow stable builds for this plugin.

plugins

โ“ Known Issues

When enabling the plugin, you receive Authentication Failed - You do not have permissions to access this service when authenticating using your last.fm credentials.

This error is returned from the last.fm API. If you're certain you have correctly entered your username and password. Try resetting your last.fm username and password (change the password and change it back) via the last.fm site. This may be due to stale credentials cached on the last.fm infastructure. See #51 for context.

3rd party Jellyfin applications (Gelli, Finamp) may not scrobble.

This appears to be due to the method in which these clients play media files. This plugin relies the invocation of the PlaybackStartEvent and PlaybackStopEvent events. Some details and references to upstream issues is located at #27 (comment)

(very) Poor matching of artist/album/track names in the LovedTracks flow.

Syncing of Loved tracks between LastFM and this plugin is subpar. This is due to the IsLike method that is used to compare track metadata. See #24

๐Ÿšง Developing

Developer: Build using Codespaces

GitHub Codespaces is the quickest solution to get started with development. Once your codespace is up and running, issue the following to build and start-up Jellyfin.

cd /workspaces/jellyfin-plugin-lastfm/.devcontainer && make

Port 8096 is exposed via the Codespace to allow a remote connection to your Jellyfin instance.

Developer: Local Builds

Install the .NET SDK on Linux or macOS, see the download page at https://dotnet.microsoft.com/download . Native package manager instructions can be found for Debian, RHEL, Ubuntu, Fedora, SLES, and CentOS.

Once the SDK is installed, run the following.

git clone https://github.com/jesseward/jellyfin-plugin-lastfm.git
cd jellyfin-plugin-lastfm
dotnet build

If the build is successful, the tool will report the path to your Plugin dll (Jellyfin.Plugin.Lastfm/bin/Debug/*/Jellyfin.Plugin.Lastfm.dll)

The plugin should then be copied into your Jellyfin ${CONFIG_DIR}/plugins/LastFM directory.

Running Jellyfin from Docker

CACHE_DIR=/path/to/cache
MEDIA_DIR=/path/to/media
CONFIG_DIR=/path/to/config

docker run -d \
    --name jelly \
    --volume ${CONFIG_DIR}:/config \
    --volume ${MEDIA_DIR}:/media \
    --volume ${CACHE_DIR}:/cache \
    --publish 8096:8096 \
    --rm \
jellyfin/jellyfin

jellyfin-plugin-lastfm's People

Contributors

hatharry avatar jesseward avatar lmaonator avatar lukepulverenti avatar majora2007 avatar uwx 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

jellyfin-plugin-lastfm's Issues

Scrobbling failing with "Invalid parameters - Your request is missing a required parameter"

Updated plugin version to head (9c80477) in order to get it working with latest version of Jellyfin again (10.3.7) with #10 now resolved.

Unfortunately scrobbling is still failing. Checked Jellyfin logs, related error pasted here:

[2019-08-25 01:41:01.581 +01:00] [INF] Setting range response values for "/mnt/sdc/music/[song here].flac". RangeRequest: "bytes=0-" Content-Length: "21645529", Content-Range: "bytes 0-21645528/21645529"
[2019-08-25 01:41:02.056 +01:00] [ERR] HTTP request failed with message: "{\"error\":6,\"message\":\"Invalid parameters - Your request is missing a required parameter\"}"
[2019-08-25 01:41:02.058 +01:00] [ERR] Failed to send now playing for track: ex="MediaBrowser.Model.Net.HttpException: Bad Request
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.EnsureSuccessStatusCode(HttpResponseMessage response, HttpRequestOptions options)
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.SendAsyncInternal(HttpRequestOptions options, HttpMethod httpMethod)
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.SendAsync(HttpRequestOptions options, HttpMethod httpMethod)
   at Jellyfin.Plugin.Lastfm.Api.BaseLastfmApiClient.Post[TRequest,TResponse](TRequest request)
   at Jellyfin.Plugin.Lastfm.Api.LastfmApiClient.NowPlaying(Audio item, LastfmUser user)", name="[song here]", track="[song here]", artist="[artist here]", album="[album here], mbid=null

Plugin crashes on startup due to incompatible shared libraries.

I'm trying to get v7.0.0.0 of the plugin running on Jellyfin, I'm running the jellyfin/jellyfin:latest container (ie 10.8.7) on a Synology NAS.

I've added https://jellyfin-repo.jesseward.com/manifest.json as a repo in Jellyfin and have installed the plugin and restarted the container. In Jellyfin's plugin page I see just "Status: NotSupported"; in the container's log I see the following:

[2022-11-18 21:56:34.084 +00:00] [ERR] [1] Emby.Server.Implementations.Plugins.PluginManager: Failed to load assembly "/config/plugins/LastFM_7.0.0.0/home/runner/work/jellyfin-plugin-lastfm/jellyfin-plugin-lastfm/Jellyfin.Plugin.Lastfm/bin/Debug/net5.0/Jellyfin.Plugin.Lastfm.dll". This error occurs when a plugin references an incompatible version of one of the shared libraries. Disabling plugin.
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Method 'ExecuteAsync' in type 'Jellyfin.Plugin.Lastfm.ScheduledTasks.ImportLastfmData' from assembly 'Jellyfin.Plugin.Lastfm, Version=7.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.Assembly.GetTypes()
at Emby.Server.Implementations.Plugins.PluginManager.LoadAssemblies()+MoveNext()
System.TypeLoadException: Method 'ExecuteAsync' in type 'Jellyfin.Plugin.Lastfm.ScheduledTasks.ImportLastfmData' from assembly 'Jellyfin.Plugin.Lastfm, Version=7.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.

Album artist tag and enforce HTTPS

Hello,

thank you kindly for this plugin. I installed it via the repo, version 7.0.0.0. I tried manual build but after copying to plugins directory, it wasn't picked up.

I have 2 questions: most players with scrobbler have the following behavior:
Album tag: Eternal Sunshine of the Spotless Mind
Album artist tag: Jon Brion
But there are tracks by others as well, say song # 9 is by Beck (Artist tag: Beck). So if I scrobble track number 9, the scrobble will be sent here last.fm/music/Beck/Eternal+Sunshine+of+the+Spotless+Mind - this is wrong. Beck doesn't have that album. The scrobble should be sent here last.fm/music/Jon+Brion/Eternal+Sunshine+of+the+Spotless+Mind, because even though Beck's the song's artist, the album artist tag should decide where the scrobble should go. Can this be done please? It gets even messier with various artists albums...

I'm looking at netstat and it seems it uses port 80 for communication:

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp6 0 0 LOCAL_IP:XXXX 130.211.19.189:80 ESTABLISHED xxxx/jellyfin
tcp6 0 0 LOCAL_IP:XXXX 130.211.19.189:80 ESTABLISHED xxxx/jellyfin

Now I don't know much about last.fm's API but shouldn't it be 443? It's kinda worrisome, especially behind a reverse proxy.

Use API key instead of signing in (OAuth)

Perhaps allow use of an API key (OAuth sign-in), rather then signing in directly to jellyfin?
This would also allow other users to sign in to last.fm without them giving me their password, etc

ILogger error while loading plugin

I am unable to use the plugin (4.0.0) while on Windows 10 due to the ILogger's service injection not being resolved, possibly because of missing assemblies (?).

[2020-07-23 13:54:51.384 +02:00] [INF] [1] Main: Arguments: ["C:\Program Files\Jellyfin\Server\jellyfin.dll", "--noautorunwebapp", "--datadir", "C:\ProgramData\Jellyfin\Server"]
[2020-07-23 13:54:51.389 +02:00] [INF] [1] Main: Operating system: "Windows"
[2020-07-23 13:54:51.391 +02:00] [INF] [1] Main: Architecture: X64
[2020-07-23 13:54:51.394 +02:00] [INF] [1] Main: 64-Bit Process: True
[2020-07-23 13:54:51.395 +02:00] [INF] [1] Main: User Interactive: True
[2020-07-23 13:54:51.397 +02:00] [INF] [1] Main: Processor count: 4
[2020-07-23 13:54:51.639 +02:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies
[2020-07-23 13:54:51.653 +02:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loaded assembly "Jellyfin.Plugin.Lastfm, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null" from "C:\ProgramData\Jellyfin\Server\plugins\Lastfm\Jellyfin.Plugin.Lastfm.dll"
[2020-07-23 13:54:55.398 +02:00] [ERR] [1] Emby.Server.Implementations.ApplicationHost: Error creating "Jellyfin.Plugin.Lastfm.Plugin"
System.InvalidOperationException: Unable to resolve service for type 'Microsoft.Extensions.Logging.ILogger' while attempting to activate 'Jellyfin.Plugin.Lastfm.Plugin'.
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters)
   at Emby.Server.Implementations.ApplicationHost.CreateInstanceSafe(Type type)
[2020-07-23 13:54:55.795 +02:00] [ERR] [1] Emby.Server.Implementations.ApplicationHost: Error creating "Jellyfin.Plugin.Lastfm.Providers.LastfmAlbumProvider"
System.InvalidOperationException: Unable to resolve service for type 'Microsoft.Extensions.Logging.ILogger' while attempting to activate 'Jellyfin.Plugin.Lastfm.Providers.LastfmAlbumProvider'.
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters)
   at Emby.Server.Implementations.ApplicationHost.CreateInstanceSafe(Type type)
[2020-07-23 13:54:55.802 +02:00] [ERR] [1] Emby.Server.Implementations.ApplicationHost: Error creating "Jellyfin.Plugin.Lastfm.Providers.LastfmArtistProvider"
System.InvalidOperationException: Unable to resolve service for type 'Microsoft.Extensions.Logging.ILogger' while attempting to activate 'Jellyfin.Plugin.Lastfm.Providers.LastfmArtistProvider'.
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters)
   at Emby.Server.Implementations.ApplicationHost.CreateInstanceSafe(Type type)

Does not scrobble album artist

Hello.

I've been having an issue on the default Jellyfin app where, when scrobbling songs that have two different different track and album artists, the album artist gets recorded as the track artist. This causes Last.fm to not recognize the album.

For example:

Track: We'll Get Home
Artist: The Wings
Album: Nigeria Soul Power 70
Album artist: Various artists

gets logged as:

Track: We'll Get Home
Artist: The Wings
Album: Nigeria Soul Power 70
Album artist: The Wings

Last.fm can't find an album called "Nigeria Soul Power 70" by The Wings (because such an album doesn't exist), so it scrobbles as an unknown album.

Is there any way to make sure the correct album artist is being scrobbled?

Scrobbles should happen earlier, not at the end of the song being played.

There are several bugs with third party apps (like finamp) that cause this plugin to not scrobble tracks, and while checking those I realized one thing that this plugin does not do correctly, and fixing that could incidentally fix those problems. If I understand correctly, the plugin is using the stop event to decide whether to send a scrobble. This is not correct, as scrobbles should happen earlier, not when the track ends/stops playing.

The last.fm specification ( https://www.last.fm/api/scrobbling#when-is-a-scrobble-a-scrobble ) states that a track has to be scrobbled when:

  • The track must be longer than 30 seconds.
  • And the track has been played for at least half its duration, or for 4 minutes (whichever occurs earlier.)

The plugin should schedule a scrobble using a timeout when the track starts, using for the timeout MIN(track.length/2, 4*60). If the track is stopped at any point, cancel the timeout call if it has not happened yet (as this means that it has not played long enough to be submitted).

Doing it like this will prevent any problems with apps reporting stopping time wrongly, as it will be done independently of it.

(fwiw, I implemented a last.fm scrobbler over ten years ago, that's how I did it back then)

Method not found: Void MediaBrowser.Common.Net.HttpRequestOptions.set_LogRequest(Boolean)

Thank you for this plugin! Been using it with Jellyfin 10.3.7, but after update to 10.4.0 it has stopped working. Here is the log from journalctl:

Oct 16 08:17:08 orangepipc docker[1441]: [05:17:08] [ERR] Error processing request
Oct 16 08:17:08 orangepipc docker[1441]: System.MissingMethodException: Method not found: 'Void MediaBrowser.Common.Net.HttpRequestOptions.set_LogRequest(Boolean)'.
Oct 16 08:17:08 orangepipc docker[1441]:    at Jellyfin.Plugin.Lastfm.Api.BaseLastfmApiClient.Post[TRequest,TResponse](TRequest request)
Oct 16 08:17:08 orangepipc docker[1441]:    at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
Oct 16 08:17:08 orangepipc docker[1441]:    at Jellyfin.Plugin.Lastfm.Api.BaseLastfmApiClient.Post[TRequest,TResponse](TRequest request)
Oct 16 08:17:08 orangepipc docker[1441]:    at Jellyfin.Plugin.Lastfm.Api.LastfmApiClient.RequestSession(String username, String password)

Jellyfin Last.fm Plugin version is 2.0.1.

Artist not found in last.fm by musicbrainz id

First of all thanks for taking the time to do this. I started using Jellyfin after years with Plex .. I used Emby for a while before sticking with Plex so I'm a bit familiar with the platform.
The first issue I had in terms of music was that the artist overview field was not being populated using musicbrainz or audiodb. After installing your plugin that apparently was fixed but after checking all the artists I found few that still had the overview section empty.
For what I see in the logs when I run a refresh metadata per artist is running:
http://ws.audioscrobbler.com/2.0/?method=artist.getInfo&mbid=e3d5b5ec-101a-4529-9f2d-01dca64cf44e
The issue is that it seems in last.fm few artists doesn't have the musicbrainz id registered so this fails with:
{"error":6,"message":"The artist you supplied could not be found","links":[]}
Is there a way to implement a second search like the one below when the first one fails or to choose which one to do:
http://ws.audioscrobbler.com/2.0/?method=artist.getInfo&artist=Anne-Marie
Using the name in this case it works. Not sure if this is something for the Jellyfin team or for your plugin but it's worth a try.
Thanks.

Jellyfin crashes when scrobbling

Jellyfin frequently crashes when playing music. This is the log:

[2021-05-31 14:26:12.060 +02:00] [DBG] [62] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: "CustomAuthentication" was successfully authenticated.
[2021-05-31 14:26:12.061 +02:00] [DBG] [62] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: "CustomAuthentication" was successfully authenticated.
[2021-05-31 14:26:12.082 +02:00] [DBG] [97] Jellyfin.Api.Auth.CustomAuthenticationHandler: Error authenticating with "CustomAuthenticationHandler"
MediaBrowser.Controller.Authentication.AuthenticationException: Request does not contain a token.
   at Emby.Server.Implementations.HttpServer.Security.AuthService.Authenticate(HttpRequest request)
   at Jellyfin.Api.Auth.CustomAuthenticationHandler.HandleAuthenticateAsync()
[2021-05-31 14:26:12.084 +02:00] [DBG] [97] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: "CustomAuthentication" was not authenticated.
[2021-05-31 14:26:12.085 +02:00] [DBG] [52] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: "CustomAuthentication" was successfully authenticated.
[2021-05-31 14:26:12.088 +02:00] [DBG] [52] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: "CustomAuthentication" was successfully authenticated.
[2021-05-31 14:26:12.137 +02:00] [FTL] [67] Main: Unhandled Exception
System.InvalidOperationException: Sequence contains no elements
   at System.Linq.ThrowHelper.ThrowNoElementsException()
   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   at Jellyfin.Plugin.Lastfm.ServerEntryPoint.PlaybackStart(Object sender, PlaybackProgressEventArgs e)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__140_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi)
   at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext executionContext, Action`1 callback, TState& state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
[2021-05-31 14:26:12.312 +02:00] [DBG] [10] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: "CustomAuthentication" was successfully authenticated.
[2021-05-31 14:26:12.314 +02:00] [DBG] [10] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: "CustomAuthentication" was successfully authenticated.
[2021-05-31 14:26:12.329 +02:00] [DBG] [96] Jellyfin.Api.Auth.CustomAuthenticationHandler: Error authenticating with "CustomAuthenticationHandler"
MediaBrowser.Controller.Authentication.AuthenticationException: Request does not contain a token.
   at Emby.Server.Implementations.HttpServer.Security.AuthService.Authenticate(HttpRequest request)
   at Jellyfin.Api.Auth.CustomAuthenticationHandler.HandleAuthenticateAsync()
[2021-05-31 14:26:12.330 +02:00] [DBG] [10] Jellyfin.Api.Helpers.TranscodingJobHelper: PingTranscodingJob PlaySessionId="1622463958313" isUsedPaused: False
[2021-05-31 14:26:12.331 +02:00] [DBG] [96] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: "CustomAuthentication" was not authenticated.
[2021-05-31 14:26:19.484 +02:00] [DBG] [97] Jellyfin.Api.Helpers.TranscodingJobHelper: PingTranscodingJob PlaySessionId="0f6809b23fc643bb884311521984a996" isUsedPaused: False
[2021-05-31 14:26:19.484 +02:00] [DBG] [56] Jellyfin.Api.Helpers.TranscodingJobHelper: PingTranscodingJob PlaySessionId="1622463958313" isUsedPaused: False
[2021-05-31 14:26:19.484 +02:00] [DBG] [95] Emby.Server.Implementations.HttpServer.WebSocketConnection: WS "88.163.38.102" received message: WebSocketMessage`1 { MessageType: KeepAlive, MessageId: 00000000-0000-0000-0000-000000000000, ServerId: null, Data: null }

Retrieved 0 lovedTracks s from LastFM for user

Hello! When attempting to sync my favorites from LastFM to my local client, the task returns:

[16:08:21] [INF] [30] Jellyfin.Plugin.Lastfm.ScheduledTasks.ImportLastfmData: Syncing LastFM favourties for <jellyfin-user>
[16:08:22] [INF] [21] Jellyfin.Plugin.Lastfm.ScheduledTasks.ImportLastfmData: Retrieved 0 lovedTracks from LastFM for user <lastfm-user>
[16:08:22] [INF] [21] Jellyfin.Plugin.Lastfm.ScheduledTasks.ImportLastfmData: User <jellyfin-user> has no loved tracks in last.fm

Scrobbling works, and if I favorite a track on the local client, that gets sync'd to Last.fm.

I'm just unable to sync my existing ~255 loved tracks on last.fm to my local client.

Any tips?

Thanks for this plugin either way!

[BUG REPORT] Scrobbles not going through using Feishin if "Sync favourites for this user?" is not checked

Experiencing an interesting issue here...
Initially was thought to be an issue with Feishin. Link to that issue here --> jeffvli/feishin#186

Was looking to get scrobbling working while using the Feishin desktop client, to see it not work. Did a little bit of troubleshooting and found out that scrobbles do not get submitted through Feishin when the "Sync favourites for this user?" is not checked. The Feishin client status within the web client did show music playing back with or without that box checked off. Scrobbling also seemed to work fine with the Jellyfin web client without that box checked.

Currently running plugin v8.0.0.3 and Jellyfin v10.8.10.

Plugin crashes Jellyfin when trying to sync favourited track that has no metadata

Hi there,

Thanks for your work in developing this plugin. I've encountered a bug that looks to be because I favourited a track that has no metadata in Jellyfin, which the plugin then tries to sync as a loved track to last.fm. The resulting error:

System.InvalidOperationException: Sequence contains no elements
   at System.Linq.ThrowHelper.ThrowNoElementsException()
   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   at Jellyfin.Plugin.Lastfm.Api.LastfmApiClient.LoveTrack(Audio item, LastfmUser user, Boolean love)
   at Jellyfin.Plugin.Lastfm.ServerEntryPoint.UserDataSaved(Object sender, UserDataSaveEventArgs e)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi)
   at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext executionContext, Action`1 callback, TState& state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()

Then crashes my Jellyfin instance entirely. There is functionality included to skip scrobbling a track when no artist or track metadata is detected, could that potentially also be applied to loved tracks? That may work to resolve this issue.

Plugin not working with Jellyfin 10.3.7

Error after upgrading Jellyfin Docker image.

I tried removing and reinstalling the plugin and same error. Worked great on previous Jellyfin version.

[09:00:54] [ERR] Error in last.fm
System.MissingMethodException: Method not found: 'Void MediaBrowser.Common.Net.HttpRequestOptions.set_EnableHttpCompression(Boolean)'.
   at Jellyfin.Plugin.Lastfm.Providers.LastfmAlbumProvider.GetAlbumResult(String artist, String album, CancellationToken cancellationToken)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at Jellyfin.Plugin.Lastfm.Providers.LastfmAlbumProvider.GetAlbumResult(String artist, String album, CancellationToken cancellationToken)
   at Jellyfin.Plugin.Lastfm.Providers.LastfmAlbumProvider.GetAlbumResult(AlbumInfo item, CancellationToken cancellationToken)
   at Jellyfin.Plugin.Lastfm.Providers.LastfmAlbumProvider.GetMetadata(AlbumInfo id, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.ExecuteRemoteProviders(MetadataResult`1 temp, String logName, TIdType id, IEnumerable`1 providers, CancellationToken cancellationToken)
[09:00:54] [ERR] Error in last.fm
System.MissingMethodException: Method not found: 'Void MediaBrowser.Common.Net.HttpRequestOptions.set_EnableHttpCompression(Boolean)'.
   at Jellyfin.Plugin.Lastfm.Providers.LastfmAlbumProvider.GetAlbumResult(String musicbraizId, CancellationToken cancellationToken)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at Jellyfin.Plugin.Lastfm.Providers.LastfmAlbumProvider.GetAlbumResult(String musicbraizId, CancellationToken cancellationToken)
   at Jellyfin.Plugin.Lastfm.Providers.LastfmAlbumProvider.GetAlbumResult(AlbumInfo item, CancellationToken cancellationToken)
   at Jellyfin.Plugin.Lastfm.Providers.LastfmAlbumProvider.GetMetadata(AlbumInfo id, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.ExecuteRemoteProviders(MetadataResult`1 temp, String logName, TIdType id, IEnumerable`1 providers, CancellationToken cancellationToken)
[09:00:55] [ERR] Error in last.fm
System.MissingMethodException: Method not found: 'Void MediaBrowser.Common.Net.HttpRequestOptions.set_EnableHttpCompression(Boolean)'.
   at Jellyfin.Plugin.Lastfm.Providers.LastfmAlbumProvider.GetAlbumResult(String artist, String album, CancellationToken cancellationToken)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at Jellyfin.Plugin.Lastfm.Providers.LastfmAlbumProvider.GetAlbumResult(String artist, String album, CancellationToken cancellationToken)
   at Jellyfin.Plugin.Lastfm.Providers.LastfmAlbumProvider.GetAlbumResult(AlbumInfo item, CancellationToken cancellationToken)
   at Jellyfin.Plugin.Lastfm.Providers.LastfmAlbumProvider.GetMetadata(AlbumInfo id, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.ExecuteRemoteProviders(MetadataResult`1 temp, String logName, TIdType id, IEnumerable`1 providers, CancellationToken cancellationToken)

System.MissingMethodException: Method not found GetProviderId

Nightly docker image (10.6 branch) changes API.

[2020-07-10 01:04:06.222 +00:00] [ERR] [25] MediaBrowser.Providers.Manager.ProviderManager: "LastfmImageProvider" failed in GetImageInfos for type "MusicAlbum"
System.MissingMethodException: Method not found: 'System.String MediaBrowser.Model.Entities.ProviderIdsExtensions.GetProviderId(MediaBrowser.Model.Entities.IHasProviderIds, MediaBrowser.Model.Entities.MetadataProviders)'.
   at Jellyfin.Plugin.Lastfm.Providers.LastfmImageProvider.GetImages(BaseItem item, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.ProviderManager.GetImages(BaseItem item, CancellationToken cancellationToken, IRemoteImageProvider provider, List`1 preferredLanguages, Nullable`1 type)

Some changes mentioned in jellyfin/jellyfin#3400

Scrobbles not submitted when cast to device.

The device in question is an instance of KGT1/jellyfin-discord-music-bot. I have raised an issue on that repo (KGT1/jellyfin-discord-music-bot#7) as well where this has not been solved yet. At this point I'm not sure if it's an issue with that repo or thisone.

Currently played information is successfully submitted and visible, but when playback ends no scrobble is submitted.

Here is what happens when the discord bot plays songs:

[20:48:34] [INF] [19] Jellyfin.Plugin.Lastfm.ServerEntryPoint: Odinoss is now playing artist=Chaos Face, track=Flatland, album=Doom Ride,
[20:44:05] [INF] [40] Jellyfin.Plugin.Lastfm.ServerEntryPoint: Odinoss is now playing artist=Chaos Face, track=Body Hammer, album=Doom Ride,
[20:38:45] [INF] [19] Jellyfin.Plugin.Lastfm.ServerEntryPoint: Odinoss is now playing artist=Chaos Face, track=Scanner, album=Doom Ride,
[20:29:29] [INF] [129] Jellyfin.Plugin.Lastfm.ServerEntryPoint: Odinoss is now playing artist=Chaos Face, track=Crash, album=Doom Ride,
[20:17:47] [INF] [129] Jellyfin.Plugin.Lastfm.ServerEntryPoint: Odinoss is now playing artist=Chaos Face, track=Subhuman, album=Doom Ride

This is what happens when the web client plays songs:

[20:57:15] [INF] [129] Jellyfin.Plugin.Lastfm.ServerEntryPoint: Odinoss is now playing artist=ZelooperZ, track=Paint Ain't Mine, album=Gremlin,
[20:59:14] [INF] [89] Jellyfin.Plugin.Lastfm.ServerEntryPoint: Odinoss played artist=ZelooperZ, track=Paint Ain't Mine, album=Gremlin,
[20:59:15] [INF] [90] Jellyfin.Plugin.Lastfm.ServerEntryPoint: Odinoss is now playing artist=ZelooperZ, track=Extravaganza Live, album=Gremlin,
[21:00:28] [INF] [25] Jellyfin.Plugin.Lastfm.ServerEntryPoint: Odinoss played artist=ZelooperZ, track=Extravaganza Live, album=Gremlin,
[21:00:28] [INF] [52] Jellyfin.Plugin.Lastfm.ServerEntryPoint: Odinoss is now playing artist=ZelooperZ, track=Style for Sale, album=Gremlin,
[21:01:36] [INF] [68] Jellyfin.Plugin.Lastfm.ServerEntryPoint: Odinoss played artist=ZelooperZ, track=Style for Sale, album=Gremlin,
[21:01:36] [INF] [22] Jellyfin.Plugin.Lastfm.ServerEntryPoint: Odinoss is now playing artist=ZelooperZ, track=Dj Freaky Zhit, album=Gremlin,
[21:03:45] [INF] [12] Jellyfin.Plugin.Lastfm.ServerEntryPoint: Odinoss played artist=ZelooperZ, track=Dj Freaky Zhit, album=Gremlin,
[21:03:46] [INF] [109] Jellyfin.Plugin.Lastfm.ServerEntryPoint: Odinoss is now playing artist=ZelooperZ, track=Bounce, album=Gremlin,
[21:04:48] [INF] [38] Jellyfin.Plugin.Lastfm.ServerEntryPoint: Odinoss played artist=ZelooperZ, track=Bounce, album=Gremlin,
[21:04:49] [INF] [38] Jellyfin.Plugin.Lastfm.ServerEntryPoint: Odinoss is now playing artist=ZelooperZ, track=Hyphen, album=Gremlin,
[21:07:06] [INF] [40] Jellyfin.Plugin.Lastfm.ServerEntryPoint: Odinoss played artist=ZelooperZ, track=Hyphen, album=Gremlin,
[21:07:07] [INF] [60] Jellyfin.Plugin.Lastfm.ServerEntryPoint: Odinoss is now playing artist=ZelooperZ, track=Lost Me, album=Gremlin

Unable to install plugin from repo

When adding repository to Jellyfin using the information provided in README, Jellyfin does not locate the plugin for usage. The following is a screenshot of the repository URL when followed.

image

no update for the favorites

hi,
seems that the favorites track on last-fm don't update on jellyfin.
has anybody got the same problem ?
Thanks,

Add loved tracks import/synchronize

I already have over 2000 loved songs in my lastfm account, it would be nice if this plugin could import those and apply favorite status in the jellyfin library with some clever matching ;)

New release question

The release I have at the moment is 10.2.2.0 .. the last release 1.0.0 is it similar or do I need to re-install/upgrade?

Exception when trying to scrobble

I get the following exception when trying to scrobble recentsly, it was working fine previously im not sure what might have changed. Its in a docker containe, Im not sure what may have changed that broke it. Restarting didnt change anything.

[2019-03-13 14:39:24.708 +00:00] [ERR] Error ProtocolError getting response from "http://ws.audioscrobbler.com/2.0/?format=json"

System.Net.WebException: The remote server returned an error: (400) Bad Request.
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
[2019-03-13 14:39:24.710 +00:00] [ERR] Failed to Scrobble track: "MediaBrowser.Model.Net.HttpException: The remote server returned an error: (400) Bad Request. ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
   --- End of inner exception stack trace ---
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod)
   at Jellyfin.Plugin.Lastfm.Api.BaseLastfmApiClient.Post[TRequest,TResponse](TRequest request)
   at Jellyfin.Plugin.Lastfm.Api.LastfmApiClient.Scrobble(Audio item, LastfmUser user)"

Question about how to update

I see a couple of new releases (thanks). I'm running the docker version of Jellyfin, do I need to compile the dll or can I just grab the dll from the release section? I know I could try to do that either way but wanted to know the "official" way to do it.

Can't find the option to add metadata

Hey guys,

I recently installed this plugin but can't see the option to use last.fm as my metadata source. Scrobble is working fine and I added last.fm in the music library, but when I want to edit the metadata of a song, it won't show up. Only musicbrainz and audiodb are visible. Any ideas?

Not able to scobble when Playing through 3rd Party Apps

I am unable to scrobble to lastfm when using, Symfonium to listen to music.
Live music shows up as "Scrobbling Now" on LastFm, but as soon as the song ends, it doesn't get saved on Lastfm.
It saves when I play songs on Jellyfin Official client.

Edit: It saves likes even through 3rd Party apps like Symfonium

Fails to load under 10.6.0 nightlies

[2020-05-28 10:57:28.745 +03:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loaded assembly "Jellyfin.Plugin.Lastfm, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/data/plugins/Lastfm/Jellyfin.Plugin.Lastfm.dll"
[2020-05-28 10:57:28.746 +03:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loaded assembly "Jellyfin.Plugin.PlaybackReporting, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/data/plugins/Playback Reporting/Jellyfin.Plugin.PlaybackReporting.dll"
[2020-05-28 10:57:28.747 +03:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loaded assembly "LiteDB, Version=4.1.4.0, Culture=neutral, PublicKeyToken=4ee40123013c9f27" from "/config/data/plugins/Kodi Sync Queue/LiteDB.dll"
[2020-05-28 10:57:28.748 +03:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loaded assembly "Jellyfin.Plugin.KodiSyncQueue, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/data/plugins/Kodi Sync Queue/Jellyfin.Plugin.KodiSyncQueue.dll"
[2020-05-28 10:57:28.749 +03:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loaded assembly "Trakt, Version=9.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/data/plugins/Trakt/Trakt.dll"
[2020-05-28 10:57:30.812 +03:00] [ERR] [1] Emby.Server.Implementations.ApplicationHost: Error creating "Jellyfin.Plugin.Lastfm.Plugin"
System.InvalidOperationException: Unable to resolve service for type 'Microsoft.Extensions.Logging.ILogger' while attempting to activate 'Jellyfin.Plugin.Lastfm.Plugin'.
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters)
   at Emby.Server.Implementations.ApplicationHost.CreateInstanceSafe(Type type)
[2020-05-28 10:57:30.821 +03:00] [ERR] [1] Emby.Server.Implementations.ApplicationHost: Error creating "Jellyfin.Plugin.KodiSyncQueue.Plugin"
System.InvalidOperationException: Unable to resolve service for type 'Microsoft.Extensions.Logging.ILogger' while attempting to activate 'Jellyfin.Plugin.KodiSyncQueue.Plugin'.
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters)
   at Emby.Server.Implementations.ApplicationHost.CreateInstanceSafe(Type type)
[2020-05-28 10:57:31.170 +03:00] [WRN] [1] Microsoft.EntityFrameworkCore.Model.Validation: The entity type '"ActivityLog"' is configured to use schema '"jellyfin"'. SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[2020-05-28 10:57:31.749 +03:00] [ERR] [1] Emby.Server.Implementations.ApplicationHost: Error creating "Jellyfin.Plugin.Lastfm.Providers.LastfmAlbumProvider"
System.InvalidOperationException: Unable to resolve service for type 'Microsoft.Extensions.Logging.ILogger' while attempting to activate 'Jellyfin.Plugin.Lastfm.Providers.LastfmAlbumProvider'.
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters)
   at Emby.Server.Implementations.ApplicationHost.CreateInstanceSafe(Type type)
[2020-05-28 10:57:31.749 +03:00] [ERR] [1] Emby.Server.Implementations.ApplicationHost: Error creating "Jellyfin.Plugin.Lastfm.Providers.LastfmArtistProvider"
System.InvalidOperationException: Unable to resolve service for type 'Microsoft.Extensions.Logging.ILogger' while attempting to activate 'Jellyfin.Plugin.Lastfm.Providers.LastfmArtistProvider'.
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters)
   at Emby.Server.Implementations.ApplicationHost.CreateInstanceSafe(Type type)

10.8.0 support

The plugin says it is malfunctioning on the 10.8.0 unstable releases on debian.

Log info:

[2022-01-10 12:52:59.318 +00:00] [ERR] Failed to deserialize the plugin manifest retrieved from "https://github.com/jesseward/jellyfin-plugin-lastfm"
System.Text.Json.JsonException: '<' is an invalid start of a value. Path: $ | LineNumber: 6 | BytePositionInLine: 0.
 ---> System.Text.Json.JsonReaderException: '<' is an invalid start of a value. LineNumber: 6 | BytePositionInLine: 0.
   at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
   at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker)
   at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first)
   at System.Text.Json.Utf8JsonReader.ReadSingleSegment()
   at System.Text.Json.Utf8JsonReader.Read()
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   --- End of inner exception stack trace ---
   at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadCore[TValue](JsonReaderState& readerState, Boolean isFinalBlock, ReadOnlySpan`1 buffer, JsonSerializerOptions options, ReadStack& state, JsonConverter converterBase)
   at System.Text.Json.JsonSerializer.ContinueDeserialize[TValue](ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack, JsonConverter converter, JsonSerializerOptions options)
   at System.Text.Json.JsonSerializer.ReadAllAsync[TValue](Stream utf8Json, JsonTypeInfo jsonTypeInfo, CancellationToken cancellationToken)
   at System.Net.Http.Json.HttpContentJsonExtensions.ReadFromJsonAsyncCore[T](HttpContent content, Encoding sourceEncoding, JsonSerializerOptions options, CancellationToken cancellationToken)
   at System.Net.Http.Json.HttpClientJsonExtensions.GetFromJsonAsyncCore[T](Task`1 taskResponse, JsonSerializerOptions options, CancellationToken cancellationToken)
   at Emby.Server.Implementations.Updates.InstallationManager.GetPackages(String manifestName, String manifest, Boolean filterIncompatible, CancellationToken cancellationToken)

Let me know if you need any more info.

10.7.0.0 release readiness

Client/Plugin (API/ABI) Developer Notes for RC1

  • We have migrated from ServiceStack to ASP.NET. Web API endpoints no longer accept HTTP Form requests; everything must be application/json. NOTE: Plugins that implement endpoints will also have to migrate.
  • Plugins must now target net5.0.
  • IHttpClient removal: Now inject IHttpClientFactory instead.
  • HttpException removal: Now catch HttpResponseException instead.
  • Services can be registered to the DI pipeline.

Unable to install from repository

Steps:

  • Add repository link from readme file
  • In catalog select LastFM
  • Select version 7.0.0.0 and click install
  • Accept jellyfin plugin warning
  • Observe infinite spinner

Log

[13:35:53] [ERR] [171] Emby.Server.Implementations.HttpServer.HttpListenerHost: Error processing request. URL: http://mydomain/Packages/Installed/LastFM?AssemblyGuid=5e7fe7f0-b048-429e-a431-b1a7e69c930d&version=7.0.0.0
MediaBrowser.Common.Extensions.ResourceNotFoundException: Package not found: LastFM
   at MediaBrowser.Api.PackageService.Post(InstallPackage request)
   at Emby.Server.Implementations.Services.ServiceExecGeneral.GetTaskResult(Task task)
   at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost httpHost, IRequest httpReq, HttpResponse httpRes, ILogger logger, CancellationToken cancellationToken)
   at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IHttpRequest httpReq, String urlString, String host, String localPath, CancellationToken cancellationToken)

Using jellyfin 10.6.4

Every primary artist image search is returning the same placeholder image.

The search result for every returned lastfm artist primary image query is the same. (https://lastfm.freetls.fastly.net/i/u/300x300/2a96cbd8b46e442fc41c2b86b821562f.png)

palceholder

[DBG] [6] MediaBrowser.Providers.Music.ArtistMetadataService: Running "ArtistNfoProvider" for "/config/metadata/artists/A. G. Cook"
[DBG] [6] MediaBrowser.Providers.Music.ArtistMetadataService: Running "LastfmArtistProvider" for "/config/metadata/artists/A. G. Cook"
[DBG] [69] MediaBrowser.Providers.Music.ArtistMetadataService: Running "ArtistImageProvider" for "/config/metadata/artists/A. G. Cook"
[DBG] [69] MediaBrowser.Providers.Music.ArtistMetadataService: Running "ArtistProvider" for "/config/metadata/artists/A. G. Cook"
[DBG] [69] MediaBrowser.Providers.Music.ArtistMetadataService: Running "LastfmImageProvider" for "/config/metadata/artists/A. G. Cook"
[DBG] [69] Emby.Server.Implementations.Data.SqliteItemRepository: "GetItemList" query time (slow): 23.4366ms. Query: "select type,data,EndDate,ChannelId,CommunityRating,CustomRating,IndexNumber,IsLocked,PreferredMetadataLanguage,PreferredMetadataCountryCode,Width,Height,DateLastRefreshed,Name,Path,PremiereDate,Overview,ParentIndexNumber,ProductionYear,OfficialRating,ForcedSortName,RunTimeTicks,Size,DateCreated,DateModified,guid,Genres,ParentId,Audio,IsInMixedFolder,DateLastSaved,LockedFields,Studios,Tags,OriginalTitle,PrimaryVersionId,DateLastMediaAdded,Album,CriticRating,IsVirtualItem,SeriesName,PresentationUniqueKey,InheritedParentalRatingValue,ExternalSeriesId,Tagline,ProviderIds,Images,ProductionLocations,ExtraIds,TotalBitrate,ExtraType,Artists,AlbumArtists,ExternalId,SeriesPresentationUniqueKey,OwnerId from TypedBaseItems A where IsFolder=@IsFolder AND type in ('MediaBrowser.Controller.Entities.Audio.Audio','MediaBrowser.Controller.Entities.MusicVideo','MediaBrowser.Controller.Entities.Audio.MusicAlbum') AND ((guid in (select itemid from itemvalues where CleanValue = (select CleanName from TypedBaseItems where guid=@ArtistIds0) and Type<=1)))"
[DBG] [69] MediaBrowser.Providers.Manager.ProviderManager: Saving "/config/metadata/artists/A. G. Cook" to "Nfo".
[DBG] [69] Emby.Server.Implementations.Library.LibraryManager: ConvertImageToLocal item 836e7c83-0b98-4685-e591-f9b3222d8123 - image url: "https://lastfm.freetls.fastly.net/i/u/300x300/2a96cbd8b46e442fc41c2b86b821562f.png"
[DBG] [25] MediaBrowser.Providers.Manager.ProviderManager: Saving image to "/config/metadata/artists/A. G. Cook/folder.png"
[DBG] [6] MediaBrowser.Providers.Manager.ProviderManager: Saving "/config/metadata/artists/A. G. Cook" to "Nfo".
[DBG] [6] Emby.Drawing.ImageProcessor: Getting image size for item "MusicArtist" "/config/metadata/artists/A. G. Cook/folder.png"

Log is the same for any artist name, artist descriptions are pulled fine.

Can't select user to configure for

When I try to configure the plugin it doesn't let me select a user to configure it for, I've tried deleting the old config, I've tried reinstalling the plugin, but nothing works anymore.

screenshot

Only the last-played track is scrobbled

The plugin seems only to scrobble the last track that's played, even though it updates the 'now playing' track on last.fm. For example, if I play a full album, each track will appear as 'now playing' but only the last track will actually scrobble when playback is finished.

Present a list of LovedTracks that were not able to match (in the log or somewhere else).

This is just nitpicky, but it would be nice to get a list of the songs that were not able to match (in the log or somewhere else).

[04:39:00] [INF] [21] Jellyfin.Plugin.Lastfm.ScheduledTasks.ImportLastfmData: Retrieved 2584 lovedTracks from LastFM for user Odinoss,
[04:38:42] [INF] [26] Jellyfin.Plugin.Lastfm.ScheduledTasks.ImportLastfmData: Syncing LastFM favourties for Odin,
[06:37:37] [INF] [21] Jellyfin.Plugin.Lastfm.ScheduledTasks.ImportLastfmData: Finished Last.fm lovedTracks sync for Odin. Matched Songs: 1932

I'm saying this because I know for a fact that all my lovedtracks are present in my library, but it was unable to match ~600 of them. Would be easier to debug the songs matching if there was a list of unmatched songs.

Originally posted by @OdinGitDat in #23 (comment)

Japanese characters cause plugin to throw Bad Request

The plugin seems to crash whenever japanese characters are supplied in any tag. To replicate just get a song with foreign characters and the app will throw a bad request error as seen here: https://pastebin.com/ZdDw2umq. Tracks with normal english letters work fine however. My terminal and jellyfin both display japanese characters correctly. I am running the services on Ubuntu 19.04.

Updating

Will you be updating this as needed?

Scrobble request should use time the track started playing, not the current time

From the spec (https://www.last.fm/api/show/track.scrobble):

timestamp[i] (Required) : The time the track started playing, in UNIX timestamp format (integer number of seconds since 00:00:00, January 1st 1970 UTC). This must be in the UTC time zone.

However the plugin is just using the current time, instead, see

Timestamp = Helpers.CurrentTimestamp(),

3rd-party app not srobbling

Hello !
When I listen to music on my phone it is displayed on last.fm on I listen to it but once the music is finished the scorbbling is not validated, the music simply disappears from lastfm, which is annoying.

Document build process

Im not at all familiar with .net, visual studio, mono, ....
Any chance you could document the build process on linux ?

With my minimal knowledge and some googling i came to
`waldo@vm-nas-p2p:~/jellyfin-plugin-lastfm$ xbuild Jellyfin.Plugin.Lastfm.sln
XBuild Engine Version 12.0
Mono, Version 4.2.1.0
Copyright (C) 2005-2013 Various Mono authors

Build started 28/02/2019 11:23:45.


/home/waldo/jellyfin-plugin-lastfm/Jellyfin.Plugin.Lastfm.sln: warning : /home/waldo/jellyfin-plugin-lastfm/Jellyfin.Plugin.Lastfm/Jellyfin.Plugin.Lastfm.csproj: The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.
/home/waldo/jellyfin-plugin-lastfm/Jellyfin.Plugin.Lastfm.sln: warning : Don't know how to handle GlobalSection ExtensibilityGlobals, Ignoring.
Project "/home/waldo/jellyfin-plugin-lastfm/Jellyfin.Plugin.Lastfm.sln" (default target(s)):
Target ValidateSolutionConfiguration:
Building solution configuration "Debug|Any CPU".
Target Build:
/home/waldo/jellyfin-plugin-lastfm/Jellyfin.Plugin.Lastfm/Jellyfin.Plugin.Lastfm.csproj: error : /home/waldo/jellyfin-plugin-lastfm/Jellyfin.Plugin.Lastfm/Jellyfin.Plugin.Lastfm.csproj: The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.
Task "MSBuild" execution -- FAILED
Done building target "Build" in project "/home/waldo/jellyfin-plugin-lastfm/Jellyfin.Plugin.Lastfm.sln".-- FAILED
Done building project "/home/waldo/jellyfin-plugin-lastfm/Jellyfin.Plugin.Lastfm.sln".-- FAILED

Build FAILED.`

Repeated scrobbles if jellyfin is left idle without stopping playback

I've noticed an issue with duplicated scrobbles when my jellyfin client is left idle without explicitly stopping the playback, just pausing.

Repeated scrobbles seem to happen every 1 to 2 hours.

My reproduction steps so far are:

  1. begin music playback
  2. pause playback at greater than halfway through the track, but before completion (not sure if this is strictly required yet)
  3. wait for duplicate scrobbles to occur

image

I would be interested in pinpointing and fixing this issue myself, but I wanted to solicit comments first, if anyone had insight into how this could be happening.

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.