Skip to content

[BUG] Serving media files via Web UI #108

Description

@PBXg33k

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I'm getting 500 error whenever i try to download/stream media files using the web ui.

I would expect that i would be served the media file, but instead there seems to occur a TypeError somewhere in beets.

I've looked at the Beets repository and it looks like they have updated their code, but i'm not sure if this has been picked up in these images as the error does still refer to attachment_filename in the error.

https://github.com/beetbox/beets/blob/master/beetsplug/web/__init__.py#L330

Expected Behavior

Download or be able to stream media files

Steps To Reproduce

  1. Create new docker container (or compose) from the template provided by LSIO
  2. Ingest a working media file
  3. Open the web-ui
  4. Play or download media from browser

Environment

- OS: Debian 11
- How docker service was installed: `piping https://get.docker.com/ through bash`


- OS: MacOS
- How docker service was installed: Official Docker package

CPU architecture

x86-64

Docker creation

---
version: "2.1"
services:
  beets:
    image: lscr.io/linuxserver/beets:latest
    container_name: beets
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Amsterdam
    volumes:
      - ./config:/config
      - ./library:/music
      - ./ingest:/downloads
    ports:
      - 8337:8337
    restart: unless-stopped

Container logs

10.1.100.167 - - [31/Aug/2023 16:03:36] "GET / HTTP/1.1" 200 -
10.1.100.167 - - [31/Aug/2023 16:03:36] "GET /static/beets.css HTTP/1.1" 304 -
10.1.100.167 - - [31/Aug/2023 16:03:36] "GET /static/jquery.js HTTP/1.1" 304 -
10.1.100.167 - - [31/Aug/2023 16:03:36] "GET /static/underscore.js HTTP/1.1" 304 -
10.1.100.167 - - [31/Aug/2023 16:03:36] "GET /static/beets.js HTTP/1.1" 304 -
10.1.100.167 - - [31/Aug/2023 16:03:36] "GET /static/backbone.js HTTP/1.1" 304 -
10.1.100.167 - - [31/Aug/2023 16:03:36] "GET /page/2 HTTP/1.1" 404 -
10.1.100.167 - - [31/Aug/2023 16:03:42] "GET /item/query/a HTTP/1.1" 200 -
[2023-08-31 16:03:49,615] ERROR in app: Exception on /item/331/file [GET]
Traceback (most recent call last):
  File "/lsiopy/lib/python3.11/site-packages/flask/app.py", line 2190, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.11/site-packages/flask/app.py", line 1486, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.11/site-packages/beetsplug/web/__init__.py", line 324, in item_file
    response = flask.send_file(
               ^^^^^^^^^^^^^^^^
TypeError: send_file() got an unexpected keyword argument 'attachment_filename'
10.1.100.167 - - [31/Aug/2023 16:03:49] "GET /item/331/file HTTP/1.1" 500 -

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions