milaq / YCast

Self hosted vTuner internet radio service emulation
Other
240 stars 93 forks source link

Icon feature not working in 1.1.0 ? #76

Closed tomtastic closed 3 years ago

tomtastic commented 3 years ago

I dont see icons for any stations, for example this station from radio-browsers popular list :

{'changeuuid': 'a2bd6961-077e-11e8-ae97-52543be04c81', 'stationuuid': '962cc6df-0601-11e8-ae97-52543be04c81', 'name': 'Dance Wave!', 'url': 'http://dancewave.online/dance.mp3.pls', 'url_resolved': 'http://stream.dancewave.online:8080/dance.mp3', 'homepage': 'http://dancewave.online/', 'favicon': 'http://dancewave.online/dw-logo_s.png', 'tags': 'house,trance,dance', 'country': 'Hungary', 'countrycode': 'HU', 'state': '', 'language': 'english', 'votes': 109068, 'lastchangetime': '2020-01-19 13:17:11', 'codec': 'MP3', 'bitrate': 128, 'hls': 0, 'lastcheckok': 1, 'lastchecktime': '2020-11-28 21:58:10', 'lastcheckoktime': '2020-11-28 21:58:10', 'lastlocalchecktime': '2020-11-28 15:11:13', 'clicktimestamp': '2020-11-29 10:23:23', 'clickcount': 3599, 'clicktrend': -16}

I dont see the ~/.ycast/cache path being mkdir'd, or any related error, so it seem the following codepath isn't being hit yet?

./ycast/station_icons.py:15:def get_icon(station):
./ycast/station_icons.py-16-    cache_path = generic.get_cache_path(CACHE_NAME)
./ycast/station_icons.py-17-    if not cache_path:
./ycast/station_icons.py-18-        return None

The Radio-browser API request seems to hit a 404 also ...


2020-11-29 10:55:19 INFO: YCast (1.1.0) server starting
2020-11-29 10:55:19 DEBUG: Debug logging enabled
 * Serving Flask app "ycast.server" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
2020-11-29 10:55:19 INFO:  * Running on http://0.0.0.0:80/ (Press CTRL+C to quit)

2020-11-29 10:55:49 DEBUG: Radiobrowser API request: stations/byid/962cc6df-0601-11e8-ae97-52543be04c81
2020-11-29 10:55:49 DEBUG: Starting new HTTP connection (1): all.api.radio-browser.info:80
2020-11-29 10:55:49 DEBUG: Radiobrowser API request: stations/byid/962cc6df-0601-11e8-ae97-52543be04c81
2020-11-29 10:55:49 DEBUG: Starting new HTTP connection (1): all.api.radio-browser.info:80
2020-11-29 10:55:49 DEBUG: http://all.api.radio-browser.info:80 "GET /json/stations/byid/962cc6df-0601-11e8-ae97-52543be04c81 HTTP/1.1" 404 0
2020-11-29 10:55:49 DEBUG: http://all.api.radio-browser.info:80 "GET /json/stations/byid/962cc6df-0601-11e8-ae97-52543be04c81 HTTP/1.1" 404 0
2020-11-29 10:55:49 ERROR: Could not fetch data from Radiobrowser API (HTML status 404)
2020-11-29 10:55:49 ERROR: Could not get station with id 'RB_962cc6df-0601-11e8-ae97-52543be04c81'
2020-11-29 10:55:49 ERROR: Could not fetch data from Radiobrowser API (HTML status 404)
2020-11-29 10:55:49 INFO: 172.27.0.12 - - [29/Nov/2020 10:55:49] "GET /ycast/icon?id=RB_962cc6df-0601-11e8-ae97-52543be04c81 HTTP/1.1" 404 -
2020-11-29 10:55:49 ERROR: Could not get station with id 'RB_962cc6df-0601-11e8-ae97-52543be04c81'
2020-11-29 10:55:49 INFO: 172.27.0.12 - - [29/Nov/2020 10:55:49] "GET /ycast/icon?id=RB_962cc6df-0601-11e8-ae97-52543be04c81 HTTP/1.1" 404 -
2020-11-29 10:55:49 DEBUG: Radiobrowser API request: stations/byid/962cc6df-0601-11e8-ae97-52543be04c81
2020-11-29 10:55:49 DEBUG: Starting new HTTP connection (1): all.api.radio-browser.info:80
2020-11-29 10:55:49 DEBUG: http://all.api.radio-browser.info:80 "GET /json/stations/byid/962cc6df-0601-11e8-ae97-52543be04c81 HTTP/1.1" 404 0
2020-11-29 10:55:49 ERROR: Could not fetch data from Radiobrowser API (HTML status 404)
2020-11-29 10:55:49 ERROR: Could not get station with id 'RB_962cc6df-0601-11e8-ae97-52543be04c81'
2020-11-29 10:55:49 INFO: 172.27.0.12 - - [29/Nov/2020 10:55:49] "GET /ycast/icon?id=RB_962cc6df-0601-11e8-ae97-52543be04c81 HTTP/1.1" 404 -```
tomtastic commented 3 years ago

This appears to be because the GET to http://all.api.radio-browser.info:80 is wrong.

GET /json/stations/byid/962cc6df-0601-11e8-ae97-52543be04c81

Should be :

GET /json/stations/byuuid/962cc6df-0601-11e8-ae97-52543be04c81