jeffvli / feishin

A modern self-hosted music player.
https://feishin.vercel.app
GNU General Public License v3.0
2k stars 79 forks source link

Duplicate items in playlist sidebar #568

Closed kgarner7 closed 3 months ago

kgarner7 commented 3 months ago
          @kgarner7 Not the songs anymore but my Playlists are duplicated now instead:

image

And clearing the cache + relogin did not help.

Originally posted by @YourSandwich in https://github.com/jeffvli/feishin/issues/53#issuecomment-2028596492

kgarner7 commented 3 months ago

@YourSandwich If you inspect element (control or command + shift + i) and open the network tab, what is returned from playlist?_end=0&_order=ASC&_sort=name&_start=0? Is the response there already doubled? What about on the playlist page

YourSandwich commented 3 months ago

@kgarner7 I cannot find this element, typing playlist?_end=0&_order=ASC&_sort=name&_start=0 in the console throws the error: Uncaught SyntaxError: Invalid left-hand side in assignment

In the network section, there is nothing about the Playlist. When I click on the Playlist, it is still duplicated: image

And I see a lot of albumID errors in the console:

renderer.js:2 Error: Missing ":albumId" param
    at s (renderer.js:2:1814968)
    at renderer.js:2:1820673
    at Array.map (<anonymous>)
    at A (renderer.js:2:1820542)
    at a.PosterCard (renderer.js:282:96)
    at yi (renderer.js:2:2409563)
    at yc (renderer.js:2:2466418)
    at Cs (renderer.js:2:2455570)
    at Ms (renderer.js:2:2455498)
    at ms (renderer.js:2:2455361)

renderer.js:2 React Router caught the following error during render Error: Missing ":albumId" param
    at s (renderer.js:2:1814968)
    at renderer.js:2:1820673
    at Array.map (<anonymous>)
    at A (renderer.js:2:1820542)
    at a.PosterCard (renderer.js:282:96)
    at yi (renderer.js:2:2409563)
    at yc (renderer.js:2:2466418)
    at Cs (renderer.js:2:2455570)
    at Ms (renderer.js:2:2455498)
    at ms (renderer.js:2:2455361) 

Also, my Jellyfin Server does not have any write permission to the storage if this matters.

kgarner7 commented 3 months ago

You don't type that in the console, you'd look at it in the network tab (but that's irrelevant anyway because this is Jellyfin, not Navidrome).

kgarner7 commented 3 months ago

You would want to look for the request in the network tab that is something of the form items?Fields=ChildCount%2C%20Genres%2C%20DateCreated%2C%20ParentId%2C%20Overview&IncludeItemTypes=Playlist&MediaTypes=Audio&Recursive=true&SortBy=SortName&SortOrder=Ascending&StartIndex=0. Consider using the web version (https://feishin.vercel.app) for testing your Jellyfin server

YourSandwich commented 3 months ago

Yes, it is duplicated as well items?Fields=ChildCount, Genres, DateCreated, ParentId, Overview&IncludeItemTypes=Playlist&MediaTypes=Audio&Recursive=true&SortBy=SortName&SortOrder=Ascending&StartIndex=0

Il attach the response, not everything is duplicated, maybe you can find a pattern there.

For example, Play This is duplicated. response.json

kgarner7 commented 3 months ago

I do see that Jellyfin is returning duplicate playlists (by name, not id). As an example (most content snipped):

{
  "Items": [
    {
      "Name": "Melodic Hard",
      "Id": "edabe00ad3fc0fbcda576bf00038adba"
    },
    {
      "Name": "Melodic Metal",
      "Id": "c427782325e65964a8341033ca7c2f53"

    }
  ]
}

Every instance that is duplicated is duplicated because the name is returned twice by Jellyfin. I would check to see if the playlists are being duplicated there, because from Feishin's point of view these duplicates are distinctly different.

YourSandwich commented 3 months ago

Hello, I am sorry. You are right, Jellyfin itself duplicates it as well. Please close the issue, it's not a Feishin problem.

kgarner7 commented 3 months ago

No worries! Glad you've at least found the culprit.