Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graphs showing stale data #442

Open
NevetsCJ opened this issue Oct 28, 2024 · 2 comments
Open

Graphs showing stale data #442

NevetsCJ opened this issue Oct 28, 2024 · 2 comments

Comments

@NevetsCJ
Copy link

NevetsCJ commented Oct 28, 2024

Describe the bug

I found this project a couple of days ago, and I absolutely love it. I've came across an issue today where the graphs showing in the UI are outdated.

At 12pm today I noticed that graphs had stopped updating themselves at 11pm last night. However, at 2pm today some graphs are correct, while others are still outdated. Listening distribution over day and Best artists for hour of day are both stuck at 11pm last night. Average album release date is also at 1pm today rather than 2pm.

Apologies if I haven't explained this very well. If there's further info or clarification needed just let me know :)

Expected behavior

Graphs shown in the UI should be up to date.

Additional context

Adding the time zone environment did not make a difference.
I have Your-Spotify running in Docker, this is my config:

services:
  server:
    image: yooooomi/your_spotify_server
    container_name: your-spotify-server
    links:
      - mongo
    depends_on:
      - mongo
    environment:
      API_ENDPOINT: https://your-spotify-server.gcw.net
      CLIENT_ENDPOINT: https://your-spotify.gcw.net
      # CORS: your-spotify.gcw.net,your-spotify-server.gcw.net
      SPOTIFY_PUBLIC: REMOVED
      SPOTIFY_SECRET: REMOVED
    restart: always
    networks:
      - big-network
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.your-spotify-server.entrypoints=websecure"
      - "traefik.http.routers.your-spotify-server.tls=true"
      - "traefik.http.routers.your-spotify-server.rule=Host(`your-spotify-server.gcw.net`)"
      - "traefik.http.services.your-spotify-server.loadbalancer.server.port=8080"
      - "traefik.docker.network=your-spotify-server_ingress"
  
  mongo:
    container_name: your-spotify-database
    image: mongo:4.4.0
    volumes:
      - ./your-spotify/db:/data/db
    networks:
      - big-network

  web:
    image: yooooomi/your_spotify_client
    container_name: your-spotify-client
    links:
      - server
    depends_on:
      - server
    environment:
      API_ENDPOINT: https://your-spotify-server.gcw.net
    restart: always
    networks:
      - big-network
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.your-spotify.entrypoints=websecure"
      - "traefik.http.routers.your-spotify.tls=true"
      - "traefik.http.routers.your-spotify.rule=Host(`your-spotify.gcw.net`)"
      - "traefik.http.services.your-spotify.loadbalancer.server.port=3000"
      - "traefik.docker.network=your-spotify_ingress"
    
networks:
    big-network:
        external: true

In the console I can see it requesting up to date information

your-spotify-client    |  HTTP  10/28/2024 2:35:23 PM 172.19.0.2 GET /all
your-spotify-client    |  HTTP  10/28/2024 2:35:23 PM 172.19.0.2 Returned 200 in 3 ms
your-spotify-client    |  HTTP  10/28/2024 2:35:23 PM 172.19.0.2 GET /variables.js
your-spotify-client    |  HTTP  10/28/2024 2:35:23 PM 172.19.0.2 Returned 200 in 8 ms
your-spotify-client    |  HTTP  10/28/2024 2:35:23 PM 172.19.0.2 GET /static/js/main.4ee1a6ce.js
your-spotify-client    |  HTTP  10/28/2024 2:35:23 PM 172.19.0.2 Returned 200 in 4 ms
your-spotify-client    |  HTTP  10/28/2024 2:35:23 PM 172.19.0.2 GET /static/css/main.fa34713a.css
your-spotify-client    |  HTTP  10/28/2024 2:35:23 PM 172.19.0.2 Returned 200 in 3 ms
your-spotify-client    |  HTTP  10/28/2024 2:35:23 PM 172.19.0.2 GET /favicon.ico
your-spotify-client    |  HTTP  10/28/2024 2:35:23 PM 172.19.0.2 Returned 200 in 5 ms
your-spotify-server    | GET /me 200 16.050 ms - 475
your-spotify-server    | GET /accounts 200 35.719 ms - 113
your-spotify-server    | GET /global/preferences 200 12.130 ms - 68
your-spotify-server    | GET /spotify/top/artists?start=2024-10-27T14:35:21.870Z&end=2024-10-28T14:35:21.870Z&nb=20&offset=0 200 125.250 ms - 28370
your-spotify-server    | GET /spotify/top/hour-repartition/artists?start=2024-10-27T14:35:21.870Z&end=2024-10-28T14:35:21.870Z 200 131.977 ms - 95866
your-spotify-server    | GET /spotify/most_listened_artist?start=2024-10-27T14:35:21.870Z&end=2024-10-28T14:35:21.870Z&timeSplit=hour 200 202.706 ms - 63087
your-spotify-server    | GET /spotify/time_per?start=2024-10-27T14:35:21.870Z&end=2024-10-28T14:35:21.870Z&timeSplit=hour 200 163.415 ms - 680
your-spotify-server    | GET /spotify/songs_per?start=2024-10-27T14:35:21.870Z&end=2024-10-28T14:35:21.870Z&timeSplit=hour 200 141.822 ms - 785
your-spotify-server    | GET /spotify/different_artists_per?start=2024-10-27T14:35:21.870Z&end=2024-10-28T14:35:21.870Z&timeSplit=hour 200 250.997 ms - 87926
your-spotify-server    | GET /spotify/time_per_hour_of_day?start=2024-10-27T14:35:21.870Z&end=2024-10-28T14:35:21.870Z 200 95.449 ms - 218
your-spotify-server    | GET /spotify/feat_ratio?start=2024-10-27T14:35:21.870Z&end=2024-10-28T14:35:21.870Z&timeSplit=hour 200 126.143 ms - 1331
your-spotify-server    | GET /spotify/album_date_ratio?start=2024-10-27T14:35:21.870Z&end=2024-10-28T14:35:21.870Z&timeSplit=hour 200 167.689 ms - 900
your-spotify-server    | GET /version 200 453.995 ms - 35
your-spotify-server    | GET /spotify/popularity_per?start=2024-10-27T14:35:21.870Z&end=2024-10-28T14:35:21.870Z&timeSplit=hour 200 139.426 ms - 949

Screenshots

2pm All Stats

Shared link

Unable to access my instance externally.

@M2K3K5
Copy link
Contributor

M2K3K5 commented Nov 6, 2024

@NevetsCJ
the graph which shows the distribution of listeners over the day and the best artists for the hour of the day always shows the time from 1am to 11pm, so that it is always in relation to the whole day. if you look in at 2pm, for example, your music is shown from the evening at 7pm and from the morning at 9am, but both are shown in this one graph, even if the songs were played on different days.
the graph average release date of an album only shows the times when you listened to the songs. gaps are skipped. for example, if you listen from 8 am to 8:30 am and then listen again at 10 am, the graph goes from 8 am directly to 10 am and skips the data from 9 am (because there are none).

as i understand it, the graphs work correctly. if you have any further questions, please get in touch.

@NevetsCJ
Copy link
Author

NevetsCJ commented Nov 6, 2024

Hi @M2K3K5 the problem I have is that the graphs are stuck on this time frame, while the other graphs change. The data shown in these graphs is also incorrect - I tried figuring out what data it was showing but I couldn’t figure it out.

For example, I had been listening to Spotify between 12pm and 2pm however this isn’t shown in the graph, it only shows data from 1pm. It also shows data from 3pm onwards and I took the screenshot between 2 and 3pm?

You can also see that the graph shows 12am to 11pm, whereas the other graphs show the past 24 hours of listening data from the time you’re looking at it (for example if you look at it at 5pm today it will show data between 5pm yesterday and 5pm today).

Sorry if I’m explaining it poorly - I can’t quite word what I mean

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants