krateng / maloja

Self-hosted music scrobble database to create personal listening statistics and charts
https://maloja.krateng.ch
GNU General Public License v3.0
1.06k stars 63 forks source link

Cannot import last.fm scrobble history #359

Open jtd5048 opened 2 months ago

jtd5048 commented 2 months ago

I started with a compose file that calls for the image stored in Dockerhub:

maloja:
        image: krateng/maloja
        container_name: maloja
        restart: unless-stopped
        environment:
            - MALOJA_DATA_DIRECTORY=/mljdata
            - PUID=1000
            - PGID=1000
        ports:
            - 42010:42010
        volumes:
            - ./maloja/data:/mljdata

and then stopped container and used the import instructions to get into the container shell: docker run -it --entrypoint sh -v $PWD/maloja/data:/mljdata -e MALOJA_DATA_DIRECTORY=/mljdata -e PUID=1000 -e PGID=1000 krateng/maloja and attempted maloja import recenttrack-xyz.json, exported from ghan64 site. this returns: File could not be identified as a valid import source

I then noticed that the dockerhub image is 5 months old and the change for ghan's site looks like it's a week old

so I cloned the repo and built the image myself using docker build .

when I shell into this container, the command maloja import xyz.json is not recognized: sh: maloja: not found

so I am stuck on importing my listening history. Dockerhub seems to be too old and building the image locally also does not work correctly. I've exhausted my technical understanding at this point. What am I doing wrong? Help would be much appreciated

Bujiraso commented 2 months ago

I'm also facing this exact same scenario and I think we just need an updated docker image to help out.

a7dcf6d41d67fe9175a6b1f7d125b541e4a5ddd3 introduces a /venv encapsulation that's not currently taken account of in the resulting container. If you either source /venv/bin/activate or (theoretically) remove this line pair (at two separate locations)

-       python3 -m venv /venv && \
-    . /venv/bin/activate && \

Then you should be able to maloja again, the latter without the source work-around.

I was able to import tracks after this work-around.

jtd5048 commented 2 months ago

appreciate the digging. I used the first option (source /venv/bin/activate while in the shell for my built container) and was able to import all my listens