Code Monkey home page Code Monkey logo

Comments (18)

llessi06 avatar llessi06 commented on August 27, 2024 1

Can't say what's not working, but after running the Import Task with Creating Files with Missing Songs the Debug Files appeared.
MissingTracksFile.json

from jellyfin-plugin-spotify-import.

Viperinius avatar Viperinius commented on August 27, 2024

Could you please tell me what settings you use under Playlist Track Matching?

  • Match Type
  • Match Criteria

Additionally, could you paste (or screenshot) the metadata of the track seen in the log from your Jellyfin server? I would be interested in the fields:

  • Title
  • Album
  • Artists
  • Album artists

Especially Album since that seems to be the reason this track is not accepted as match.

from jellyfin-plugin-spotify-import.

llessi06 avatar llessi06 commented on August 27, 2024

Match Criteria:
All

Match Type:
Default / Equality Check

image

from jellyfin-plugin-spotify-import.

Viperinius avatar Viperinius commented on August 27, 2024

Hm okay, this seems to be a bit tricky, so some follow-up questions:

  1. Did the problem start around a week ago, i.e. when your server probably auto-updated to 1.7.0.0?
  2. Did matching stop completely or only for some songs?
  3. Do "old" tracks already imported still work or does the log show them as not matched as well?

from jellyfin-plugin-spotify-import.

llessi06 avatar llessi06 commented on August 27, 2024

I can't say exactly when, because I only noticed it when I added songs to a playlist and couldn't find the song in the playlist the next day.

It stopped completely.

Old songs no longer work either.

from jellyfin-plugin-spotify-import.

Viperinius avatar Viperinius commented on August 27, 2024

Ok thanks for the info.
I created a debug version (1.7.0.1): You can access it by adding this url as a new plugin repository in Jellyfin...

https://raw.githubusercontent.com/Viperinius/jellyfin-plugins/test/spotify-import/manifest.json

...and then installing version 1.7.0.1.

With this installed, please

1.

  • go to the plugin settings page and you should see a debug section at the top (Enable verbose logging needs to be enabled)
  • put a track name like Another Love in the Track name to dump refs for textfield and click on Dump Music Track References To File
  • after refreshing the page, you should see a file link at the bottom like DEBUG_REF_*.json that contains a list of item IDs and some extra info
  • please add the file or its contents to this issue

2.

  • run the import task again and paste the new log snippet here as you did before

Bit of background info: I suspect that for some reason your Jellyfin server references tracks and their artists in a different way than the plugin expects... Apparently there are at least like 4 possible variants how to get albums from an artist for example, each returning slightly different things.

from jellyfin-plugin-spotify-import.

llessi06 avatar llessi06 commented on August 27, 2024

The dump file is not exisiting and the Browser Console shows an error.
image

I think I have found the problem why the dump does not exist. The post request does not work.
image

Error in the log file, which is probably part of the problem

[2024-03-17 16:29:42.721 +00:00] [ERR] [16] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL "POST" "/Viperinius.Plugin.SpotifyImport/Debug/DumpTrackRefs".
System.ArgumentException: An item with the same key has already been added. Key: Artist1/1/1
at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at System.Collections.Generic.Dictionary2.Add(TKey key, TValue value)
at Viperinius.Plugin.SpotifyImport.Api.DebugController.DumpRefsToFile(String name, CancellationToken cancellationToken)
at lambda_method825(Closure , Object )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Jellyfin.Server.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
at Jellyfin.Server.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
at Jellyfin.Server.Middleware.IpBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
at Jellyfin.Server.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Jellyfin.Server.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Jellyfin.Server.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
at Jellyfin.Server.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
at Jellyfin.Server.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
at Jellyfin.Server.Middleware.ExceptionMiddleware.Invoke(HttpContext context)

Log Snippet:

iperinius.Plugin.SpotifyImport.PlaylistSync: Now processing provider track "Another Love" ["Another Love"]["OsTEKKe"]["OsTEKKe"]
[2024-03-17 16:30:41.292 +00:00] [DBG] [8] Viperinius.Plugin.SpotifyImport.PlaylistSync: > Found matching artist "OsTEKKe" 1ffe1f52-f862-f18b-c971-07fff8f6a406
[2024-03-17 16:30:41.294 +00:00] [INF] [8] Viperinius.Plugin.SpotifyImport.PlaylistSync: > Reached end of album list (has 0 entries)
[2024-03-17 16:30:41.294 +00:00] [INF] [8] Viperinius.Plugin.SpotifyImport.PlaylistSync: > Reached end of artist list
[2024-03-17 16:30:41.294 +00:00] [INF] [8] Viperinius.Plugin.SpotifyImport.PlaylistSync: AlbumName, Artists did not match for track "Another Love" ["Another Love"]["OsTEKKe"]

from jellyfin-plugin-spotify-import.

Viperinius avatar Viperinius commented on August 27, 2024

Whoops, my bad. With 1.7.0.2 this should be fixed.

from jellyfin-plugin-spotify-import.

llessi06 avatar llessi06 commented on August 27, 2024

Now no Browser Console Entry for the POST Request appears and the File is not showing.

from jellyfin-plugin-spotify-import.

Viperinius avatar Viperinius commented on August 27, 2024

That is odd, does the other dump button create any files? (So same thing, click the button, wait a few seconds, then reload page and check for files)

Do you use the missing tracks file feature normally? If not, maybe the plugin has no access to the filesystem to create a directory in the system temp folder
(the files get created in in a subfolder of the system-temp, so e.g. /tmp/jfplugin_spotify_import in Linux and C:\Users\<User>\AppData\Local\Temp\jfplugin_spotify_import in WIndows)

from jellyfin-plugin-spotify-import.

Viperinius avatar Viperinius commented on August 27, 2024

Ok, I think I know where the problem stems from. Do you happen to have a flat file structure within your music library? So something like

.../whatever/
└── music-lib/
    ├── track1.mp3
    └── track2.mp3

Because apparently the internal Jellyfin structuring of tracks <-> albums <-> artists varies wildly depending on the folder structure of the library.
At least when I added a test library in that format, I got the same result as in your json file.

from jellyfin-plugin-spotify-import.

llessi06 avatar llessi06 commented on August 27, 2024

Yes, I have such a flat file structure.
All my songs are in one folder

from jellyfin-plugin-spotify-import.

Viperinius avatar Viperinius commented on August 27, 2024

Alright, then I will add a configuration switch whether or not to do the track matching hierarchically. The new track matching that I introduced recently will not work with your file structure, so the old method would be available via this switch.

But as a small sidenote, I would recommend to use the structure described in the Jellyfin docs because with your current way you miss out some Jellyfin features. For example, I noticed that at least in my flat test lib, Jellyfin did not create an album entry when adding multiple tracks of one album as it would normally.

from jellyfin-plugin-spotify-import.

llessi06 avatar llessi06 commented on August 27, 2024

Thanks for your sidenote, but I already know that. The only reason I don't do it that way is because I download my songs with Spotdl. https://github.com/spotDL/spotify-downloader Spotdl only checks if the song already exists in the current folder, so the folder structure recommended by Jellyfin is not useful for me at the moment.

Thank you for your work in finding the problem and for the great plugin as such.

Should I close the issue immediately or wait until you have added that configuration switch?

from jellyfin-plugin-spotify-import.

Viperinius avatar Viperinius commented on August 27, 2024

Should I close the issue immediately or wait until you have added that configuration switch?

I am working on it right now, so this can stay open until you were able to test that switch ;)

Spotdl only checks if the song already exists in the current folder

I see, I have never used that before but I have just seen this config entry for it which might suggest you can kind of hack the folder structure:

"output": "{artist}/{album}/{artists} - {title}.{output-ext}",

(seen here)

from jellyfin-plugin-spotify-import.

llessi06 avatar llessi06 commented on August 27, 2024

This config entry must be new.
I was looking for it a few months ago.
Thanks for letting me know.

from jellyfin-plugin-spotify-import.

Viperinius avatar Viperinius commented on August 27, 2024

Version 1.7.0.3 contains the checkbox to enable the legacy matching mode and is available now.
Please check if this mode works with your setup. I will create a full release once it is confirmed to work on your end.

from jellyfin-plugin-spotify-import.

llessi06 avatar llessi06 commented on August 27, 2024

The checkbox with the legacy matching is working.
Great work.
You can make a release version.
Thank you for your work in fixing the problem and for the great plugin.

I will close the issue.

from jellyfin-plugin-spotify-import.

Related Issues (20)

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.