icefields / Power-Ampache-2

second version of my popular ampache Android app
GNU General Public License v3.0
44 stars 2 forks source link

No covers displayed #136

Open pled opened 2 days ago

pled commented 2 days ago

Hi,

Using Nextcloud Music 2.0.0 and PowerAmpache2-1.00-61-fdroid.

When using a large music collection (not sure if this is linked) from Nextcloud Music app (13820 tracks :sunglasses: ), I got no covers in Power Ampache 2. Covers were there initially, but disappear after a disconnection/re-connection.

power-amapache

Is there a way to reset of force to read music collection again ?

Thank you for that beautiful application.

pled commented 1 day ago

Here are the logs I can collect on Netcloud server when connecting Power Ampache 2 :

{"reqId":"6sTdNEFOkm7QZCpXTMdF","level":0,"time":"2024-07-04T08:01:57+00:00","remoteAddr":"192.168.1.20","user":"pascal","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"dirty table reads: SELECT `name` FROM `*PREFIX*authtoken` WHERE (`uid` = :dcValue1) AND (`last_activity` >= :dcValue2)","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0","version":"29.0.3.4","exception":{"Exception":"Exception","Message":"dirty table reads: SELECT `name` FROM `*PREFIX*authtoken` WHERE (`uid` = :dcValue1) AND (`last_activity` >= :dcValue2)","Code":0,"Trace":[{"file":"/config/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":348,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/config/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":384,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/config/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/config/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":293,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/config/www/nextcloud/apps/notifications/lib/Service/ClientService.php","line":54,"function":"executeQuery","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/config/www/nextcloud/apps/notifications/lib/Controller/EndpointController.php","line":109,"function":"hasTalkDesktop","class":"OCA\\Notifications\\Service\\ClientService","type":"->"},{"file":"/config/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"listNotifications","class":"OCA\\Notifications\\Controller\\EndpointController","type":"->"},{"file":"/config/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/config/www/nextcloud/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/config/www/nextcloud/lib/private/Route/Router.php","line":338,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/config/www/nextcloud/ocs/v1.php","line":66,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/config/www/nextcloud/ocs/v2.php","line":23,"args":["/config/www/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/config/www/nextcloud/lib/private/DB/Connection.php","Line":316,"message":"dirty table reads: SELECT `name` FROM `*PREFIX*authtoken` WHERE (`uid` = :dcValue1) AND (`last_activity` >= :dcValue2)","tables":["oc_authtoken"],"reads":["oc_authtoken"],"exception":{},"CustomMessage":"dirty table reads: SELECT `name` FROM `*PREFIX*authtoken` WHERE (`uid` = :dcValue1) AND (`last_activity` >= :dcValue2)"}}
{"reqId":"1pZgJ34txO23TnICOvqL","level":0,"time":"2024-07-04T08:02:33+00:00","remoteAddr":"192.168.1.126","user":"--","app":"music","method":"GET","url":"/apps/music/ampache/server/json.server.php?action=handshake&auth=6cdbcd7734572fc4423884d84ced5660781789e923e32c043fda15e78ef52150&user=pascal&timestamp=1720080153","message":"Ampache action 'handshake' requested","userAgent":"PowerAmpache2-1.00-61-fdroid","version":"29.0.3.4","data":{"app":"music"}}
{"reqId":"WlXD1Qk7Jetg72S5FQJW","level":0,"time":"2024-07-04T08:02:33+00:00","remoteAddr":"192.168.1.126","user":"--","app":"music","method":"GET","url":"/apps/music/ampache/server/json.server.php?action=user&auth=5577f70e9eed2ba5d14a45dc5aac4328&username=pascal","message":"Ampache action 'user' requested","userAgent":"PowerAmpache2-1.00-61-fdroid","version":"29.0.3.4","data":{"app":"music"}}
{"reqId":"P3J7DjqvOYM6KHsouUY8","level":0,"time":"2024-07-04T08:02:33+00:00","remoteAddr":"192.168.1.126","user":"--","app":"music","method":"GET","url":"/apps/music/ampache/server/json.server.php?action=ping&auth=5577f70e9eed2ba5d14a45dc5aac4328","message":"Ampache action 'ping' requested","userAgent":"PowerAmpache2-1.00-61-fdroid","version":"29.0.3.4","data":{"app":"music"}}
{"reqId":"7WsGG6d5r9R8EZwd4pbG","level":0,"time":"2024-07-04T08:02:34+00:00","remoteAddr":"192.168.1.126","user":"--","app":"music","method":"GET","url":"/apps/music/ampache/server/json.server.php?action=genres&auth=5577f70e9eed2ba5d14a45dc5aac4328&exact=0&offset=0&limit=0","message":"Ampache action 'genres' requested","userAgent":"PowerAmpache2-1.00-61-fdroid","version":"29.0.3.4","data":{"app":"music"}}
{"reqId":"zFJCMhd0460T2svhKzee","level":0,"time":"2024-07-04T08:02:34+00:00","remoteAddr":"192.168.1.126","user":"--","app":"music","method":"GET","url":"/apps/music/ampache/server/json.server.php?action=stats&auth=5577f70e9eed2ba5d14a45dc5aac4328&limit=40&username=pascal&type=album&filter=highest&offset=0","message":"Ampache action 'stats' requested","userAgent":"PowerAmpache2-1.00-61-fdroid","version":"29.0.3.4","data":{"app":"music"}}
{"reqId":"OHFqao3CygrIHxhlblBK","level":0,"time":"2024-07-04T08:02:34+00:00","remoteAddr":"192.168.1.126","user":"--","app":"music","method":"GET","url":"/apps/music/ampache/server/json.server.php?action=stats&auth=5577f70e9eed2ba5d14a45dc5aac4328&limit=40&username=pascal&type=album&filter=recent&offset=0","message":"Ampache action 'stats' requested","userAgent":"PowerAmpache2-1.00-61-fdroid","version":"29.0.3.4","data":{"app":"music"}}
{"reqId":"txFZLZTVNY0rYm1RVO6E","level":0,"time":"2024-07-04T08:02:34+00:00","remoteAddr":"192.168.1.126","user":"--","app":"music","method":"GET","url":"/apps/music/ampache/server/json.server.php?action=stats&auth=5577f70e9eed2ba5d14a45dc5aac4328&limit=40&username=pascal&type=album&filter=flagged&offset=0","message":"Ampache action 'stats' requested","userAgent":"PowerAmpache2-1.00-61-fdroid","version":"29.0.3.4","data":{"app":"music"}}
{"reqId":"bWkY8tEUlDgQENrJa38X","level":0,"time":"2024-07-04T08:02:34+00:00","remoteAddr":"192.168.1.126","user":"--","app":"music","method":"GET","url":"/apps/music/ampache/server/json.server.php?action=stats&auth=5577f70e9eed2ba5d14a45dc5aac4328&limit=40&username=pascal&type=album&filter=frequent&offset=0","message":"Ampache action 'stats' requested","userAgent":"PowerAmpache2-1.00-61-fdroid","version":"29.0.3.4","data":{"app":"music"}}
{"reqId":"ALsKnBVMUrsp7GmA966L","level":0,"time":"2024-07-04T08:02:34+00:00","remoteAddr":"192.168.1.126","user":"--","app":"music","method":"GET","url":"/apps/music/ampache/server/json.server.php?action=playlists&auth=5577f70e9eed2ba5d14a45dc5aac4328&limit=0&filter=&exact=0&offset=0&hide_search=0&show_dupes=1","message":"Ampache action 'playlists' requested","userAgent":"PowerAmpache2-1.00-61-fdroid","version":"29.0.3.4","data":{"app":"music"}}
{"reqId":"3rrM8XW5e4LCJOSxfg1x","level":0,"time":"2024-07-04T08:02:34+00:00","remoteAddr":"192.168.1.126","user":"--","app":"music","method":"GET","url":"/apps/music/ampache/server/json.server.php?action=stats&auth=5577f70e9eed2ba5d14a45dc5aac4328&limit=40&username=pascal&type=album&filter=random&offset=0","message":"Ampache action 'stats' requested","userAgent":"PowerAmpache2-1.00-61-fdroid","version":"29.0.3.4","data":{"app":"music"}}
{"reqId":"JW0mss0o9UHAm0WO0FY2","level":0,"time":"2024-07-04T08:02:34+00:00","remoteAddr":"192.168.1.126","user":"--","app":"music","method":"GET","url":"/apps/music/ampache/server/json.server.php?action=stats&auth=5577f70e9eed2ba5d14a45dc5aac4328&limit=40&username=pascal&type=album&filter=newest&offset=0","message":"Ampache action 'stats' requested","userAgent":"PowerAmpache2-1.00-61-fdroid","version":"29.0.3.4","data":{"app":"music"}}
{"reqId":"3F5NES0PglNo3O8UO8Cr","level":0,"time":"2024-07-04T08:02:34+00:00","remoteAddr":"192.168.1.126","user":"--","app":"music","method":"GET","url":"/apps/music/ampache/server/json.server.php?action=playlists&auth=5577f70e9eed2ba5d14a45dc5aac4328&limit=0&filter=&exact=0&offset=1&hide_search=0&show_dupes=1","message":"Ampache action 'playlists' requested","userAgent":"PowerAmpache2-1.00-61-fdroid","version":"29.0.3.4","data":{"app":"music"}}

Does that mean server does not send covers information ?

icefields commented 1 day ago

Thanks for the report. I'm not an expert on Nextcloud Music, but you can try setting the logging level on Nextcloud temporarily to debug. Edit the file config/config.php and add the key-value line 'loglevel' => 0,. Then use the app and check the file nextcloud.log. If you server is providing the cover urls in its responses maybe it's slow and the connection is timing out, in that case I can try to increase the timeout for getting the cover images

pled commented 11 hours ago

Thanks, I will check on Nextcloud server side then. Need to learn more about how and when cover art is transfered to Ampache client.

icefields commented 8 hours ago

perfect. If you see that the image urls are being passed to the client, try to open some of those urls from a browser, if everything works fine and the images load without any issue, I will increase the timeout for image-loading in PA2 (for now, without any other data, I'm assuming that would be the issue).