Skip to content

[Bug]: playlist web UI persists page/track range #3225

@alametti

Description

@alametti

I confirm that:

  • I have searched the existing open AND closed issues to see if an issue already exists for the bug I've encountered
  • I'm using the latest version (your issue may have been fixed already)

Version

0.52.5 (c556088)

Current Behavior

This is the same issue as reported in #1676. However, it was locked and marked as stale due to inactivity.

When navigating a playlist with more tracks than the tracks-per-page setting on a page above 1, the track range persists when navigating to another playlist. If that playlist has insufficient tracks to have a corresponding page, the web UI will simply report no results found. The page selector does not even appear at the bottom of the page.

For example, if I am on page 2 of a playlist with 100 tracks per page, and I navigate to a playlist with 25 tracks, the following request is sent:

GET https://…/api/playlist/…/tracks?_end=200&_order=ASC&_sort=id&_start=100&playlist_id=…

The reponse is obviously empty: [], and the following behaviour is observed:

image

Expected Behavior

Navidrome's API and/or web UI should handle cases where the track range requested is greater than the number of tracks in the playlist and return a more useful range, or the track range should be reset when switching between playlists.

Steps To Reproduce

  1. Assume tracks per page is 100
  2. Navigate to playlist with over 100 tracks
  3. Go to page 2
  4. Navigate to another playlist with fewer than 100 tracks
  5. No results found is served

Environment

- OS: Ubuntu 22.04.4 LTS
- Browser: 129.0.2 on Ubuntu 22.04.4 LTS
- Client: N/A

How Navidrome is installed?

Docker

Configuration

services:
  navidrome:
    image: deluan/navidrome:latest
    user: 998:998 # should be owner of volumes
    ports:
      - "4533:4533"
    restart: always
    environment:
      # Optional: put your config options customization here. Examples:
      ND_SCANSCHEDULE: "@every 24h"
      ND_LOGLEVEL: debug  
      ND_SESSIONTIMEOUT: 24h
        # ND_BASEURL: "https://…"
      ND_ENABLEGRAVATAR: "false"
        # ND_ENABLESHARING: "true"
      ND_ENABLESTARRATING: "false"
      ND_ENABLESHARING: "true"
        # ND_PORT: 80
        # ND_ADDRESS: 127.0.0.1
        # ND_ENABLETRANSCODINGCONFIG: "true"
      ND_TRANSCODINGCACHESIZE: 20GB
      ND_LASTFM_APIKEY: …
      ND_LASTFM_SECRET: …
      ND_SPOTIFY_ID: …
      ND_SPOTIFY_SECRET: …
      ND_UIWELCOMEMESSAGE: …'s music server
      ND_ENABLEDOWNLOADS: "false"
      ND_DEFAULTTHEME: "Spotify-ish"
      ND_REVERSEPROXYWHITELIST: "0.0.0.0/0"
      ND_REVERSEPROXYUSERHEADER: X-Authentik-Username
      ND_IMAGECACHESIZE: "10000MB"
    volumes:
      - "./data:/data"
      - "/home/…/Music:/music:ro"

Relevant log output

navidrome-1  | time="2024-09-01T04:19:59Z" level=debug msg="HTTP: GET http://navidrome/api/playlist/67f8a569-7e7d-40e1-bce4-18dfbc8bfd28/tracks?_end=200&_order=ASC&_sort=id&_start=100&playlist_id=67f8a569-7e7d-40e1-bce4-18dfbc8bfd28" elapsedTime=7.7ms httpStatus=200 remoteAddr="…:41320" requestId=8d66c90648ad/qlYisPn7X9-013132 responseSize=77449 userAgent="Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0"
navidrome-1  | time="2024-09-01T04:20:02Z" level=debug msg="HTTP: GET http://navidrome/api/playlist/208b5a5e-9391-4470-a469-4d3a4a2f8aa3" elapsedTime="673.005µs" httpStatus=200 remoteAddr="…:39984" requestId=8d66c90648ad/qlYisPn7X9-013133 responseSize=354 userAgent="Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0"
navidrome-1  | time="2024-09-01T04:20:02Z" level=debug msg="HTTP: GET http://navidrome/api/playlist/208b5a5e-9391-4470-a469-4d3a4a2f8aa3/tracks?_end=200&_order=ASC&_sort=id&_start=100&playlist_id=208b5a5e-9391-4470-a469-4d3a4a2f8aa3" elapsedTime=1ms httpStatus=200 remoteAddr="…:39998" requestId=8d66c90648ad/qlYisPn7X9-013134 responseSize=2 userAgent="Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0"

Anything else?

No response

Code of Conduct

  • I agree to follow Navidrome's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Released

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions