Can't fetch or sync podcast episodes
Music server: Ampache Device: Forerunner 245 music App version: 0.2.3-lacedaemon
I have 5 different podcasts on my ampache server. From my watch, I can browse and see them. However, if I try to open the list of episodes, it doesn't work for any of them. I get the following error: ApiError:BADRESPONSE. Here's what I see in nginx' access logs:
192.168.1.50 - - [15/Aug/2022:21:47:55 +0200] "GET /server/json.server.php?limit=5&action=podcast_episodes&filter=10&offset=0&auth=0200081158ddea0d93bcf70beb6546e4 HTTP/1.1" 200 20683 "-" "Garmin Forerunner 245 Music/10.40"
And here's the server response -> https://pastebin.com/s8vun8P4
Sync appears to work but then I just get an empty podcast locally.
Not sure where to go from here, I'd be happy to provide more info but I'm not sure how to get any log from the watch.
Are you running the official Ampache server software? Which version are you using?
I just tested on my watch, it seems to work fine (although didn't test the sync) with Nextcloud music with Ampache enabled. The response you send seems to be malformed indeed. SubMusic expects a simple array [...] instead of an object { "podcast_episode": [...] } as response.
According to the Ampache docs, the response for V4 should look like this. Your response looks like Ampache V5, like this.
On handshake, SubMusic will announce the API version (440000 meaning V4) and the Ampache server should respond according to the requested API spec. If this is not the case, I should open an issue in the Ampache repository!
I'm using ampache 5.4.1 which is the latest version. That's interesting, I tried to disable "Allow Ampache API5 responses" in ampache settings and also to "force a specific API response no matter what version you send" to V4 but that doesn't seem to help.
The handshake response does specify V4.
pi@rpi:/var/log/nginx $ curl 'https://ampache.vroussel.me/server/json.server.php?auth=XXXX&action=handshake&version=440000&user=YYY×tamp=1660626260'
{
"auth": "XXX",
"api": "443000",
"session_expire": "2022-08-16T08:14:09+02:00",
"update": "1970-01-01T01:00:00+01:00",
"add": "2022-08-16T00:32:23+02:00",
"clean": "2022-08-16T00:30:03+02:00",
"songs": 66,
"albums": 3,
"artists": 17,
"playlists": 18,
"videos": 0,
"catalogs": 2,
"users": 1,
"tags": 8,
"podcasts": 7,
"podcast_episodes": 70,
"shares": 0,
"licenses": 14,
"live_streams": 0,
"labels": 0
}
But as you said, the podcast_episodes response doesn't look like a V4 response.
It should be fixed in the latest dev version of Ampache (see ampache/ampache#3317). Not sure when the following release will be, but the fix should be in there as well!
Thanks a lot for reporting the issue!
I will be releasing 5.5.0 in the next week probably. It's got a lot of fixes that need to go out
Thanks a lot for the quick fix! Will close this as I assume it is working now. Feel free to open again if it isn't fixed!