Rello / audioplayer

Audio Player for Nextcloud and ownCloud
https://rello.github.io/audioplayer
GNU Affero General Public License v3.0
220 stars 54 forks source link

[BUG] A song with title "0" cause scanner stopped to scan more music #601

Open dd-han opened 3 months ago

dd-han commented 3 months ago

Describe the bug A song with title "0" in ID3 Tag will cause music scanner stopped to scan more music.

To Reproduce Steps to reproduce the behavior:

  1. Download mp3tag.zip and unzip it
  2. Create folder on NextCloud and upload the audio which unzipped previously
  3. Go to /settings/user/audioplayer and set 'Search for audio files in' to previously created folder
  4. Go to /apps/audioplayer/ and expend Settings
  5. Click on 'Reset library' and 'Scan for audio files'. I also tired sudo -u www-data php occ audioplayer:scan admin -vv instead Scan on web but there is no error on console
  6. Nothing show up in Audio Player library
  7. Go to /settings/admin/logging and PDOException is there

Expected behavior My 30 seconds 440Hz tone should be added to library, or at least it should continue to scan more music not just stopped.

Screenshots ID3 Tag in Foobar2000 Created folder Search for audio files in setting Audio Library after scan for audio fiels

Versions:

Nextcloud log Error from /settings/admin/logging with some sensitive information removed (my IP address, my install folder)

Error on my test environment with NextCloud 28.0.7 and Audio 3.4.1

{"reqId":"yot0RPZ2UDJ8LebYfvvy","level":3,"time":"2024-06-25T13:15:07+00:00","remoteAddr":"removed","user":"dd-han","app":"audioplayer","method":"GET","url":"/apps/audioplayer/scanforaudiofiles?requesttoken=9otNrXmn%2B%2BfEvJGw980BpcNhs5TXTkZLVmKOFjgmxGg%3D%3AxbgV6y7vwqCM%2FsbKloBR7oo719KBIyJgHTG7V1BnqSE%3D","message":"Error while building library: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'title' cannot be null in /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php:130\nStack trace:\n#0 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php(130): PDOStatement->execute()\n#1 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/3rdparty/doctrine/dbal/src/Statement.php(190): Doctrine\\DBAL\\Driver\\PDO\\Statement->execute()\n#2 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/DB/PreparedStatement.php(86): Doctrine\\DBAL\\Statement->execute()\n#3 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/apps/audioplayer/lib/Controller/DbController.php(454): OC\\DB\\PreparedStatement->execute()\n#4 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/apps/audioplayer/lib/Controller/ScannerController.php(348): OCA\\audioplayer\\Controller\\DbController->writeTrackToDB()\n#5 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/apps/audioplayer/lib/Controller/ScannerController.php(184): OCA\\audioplayer\\Controller\\ScannerController->scanAudio()\n#6 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(230): OCA\\audioplayer\\Controller\\ScannerController->scanForAudios()\n#7 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(137): OC\\AppFramework\\Http\\Dispatcher->executeController()\n#8 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/AppFramework/App.php(184): OC\\AppFramework\\Http\\Dispatcher->dispatch()\n#9 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/Route/Router.php(315): OC\\AppFramework\\App::main()\n#10 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/base.php(1069): OC\\Route\\Router->match()\n#11 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/index.php(39): OC::handleRequest()\n#12 {main}\n\nNext Doctrine\\DBAL\\Driver\\PDO\\Exception: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'title' cannot be null in /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php:28\nStack trace:\n#0 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php(132): Doctrine\\DBAL\\Driver\\PDO\\Exception::new()\n#1 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/3rdparty/doctrine/dbal/src/Statement.php(190): Doctrine\\DBAL\\Driver\\PDO\\Statement->execute()\n#2 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/DB/PreparedStatement.php(86): Doctrine\\DBAL\\Statement->execute()\n#3 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/apps/audioplayer/lib/Controller/DbController.php(454): OC\\DB\\PreparedStatement->execute()\n#4 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/apps/audioplayer/lib/Controller/ScannerController.php(348): OCA\\audioplayer\\Controller\\DbController->writeTrackToDB()\n#5 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/apps/audioplayer/lib/Controller/ScannerController.php(184): OCA\\audioplayer\\Controller\\ScannerController->scanAudio()\n#6 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(230): OCA\\audioplayer\\Controller\\ScannerController->scanForAudios()\n#7 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(137): OC\\AppFramework\\Http\\Dispatcher->executeController()\n#8 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/AppFramework/App.php(184): OC\\AppFramework\\Http\\Dispatcher->dispatch()\n#9 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/Route/Router.php(315): OC\\AppFramework\\App::main()\n#10 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/base.php(1069): OC\\Route\\Router->match()\n#11 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/index.php(39): OC::handleRequest()\n#12 {main}\n\nNext Doctrine\\DBAL\\Exception\\NotNullConstraintViolationException: An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'title' cannot be null in /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:114\nStack trace:\n#0 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1938): Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter->convert()\n#1 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1880): Doctrine\\DBAL\\Connection->handleDriverException()\n#2 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/3rdparty/doctrine/dbal/src/Statement.php(194): Doctrine\\DBAL\\Connection->convertExceptionDuringQuery()\n#3 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/DB/PreparedStatement.php(86): Doctrine\\DBAL\\Statement->execute()\n#4 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/apps/audioplayer/lib/Controller/DbController.php(454): OC\\DB\\PreparedStatement->execute()\n#5 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/apps/audioplayer/lib/Controller/ScannerController.php(348): OCA\\audioplayer\\Controller\\DbController->writeTrackToDB()\n#6 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/apps/audioplayer/lib/Controller/ScannerController.php(184): OCA\\audioplayer\\Controller\\ScannerController->scanAudio()\n#7 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(230): OCA\\audioplayer\\Controller\\ScannerController->scanForAudios()\n#8 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(137): OC\\AppFramework\\Http\\Dispatcher->executeController()\n#9 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/AppFramework/App.php(184): OC\\AppFramework\\Http\\Dispatcher->dispatch()\n#10 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/Route/Router.php(315): OC\\AppFramework\\App::main()\n#11 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/base.php(1069): OC\\Route\\Router->match()\n#12 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/index.php(39): OC::handleRequest()\n#13 {main}","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0","version":"28.0.7.4","data":{"app":"audioplayer"},"id":"667ac306abb74"}

Error on my main environment with NextCloud 29.0.3 and Audio 3.4.1


{"reqId":"EQ0tiSq8t6wqYFJ4Xva4","level":3,"time":"2024-06-25T09:08:54+00:00","remoteAddr":"removed","user":"dd-han","app":"audioplayer","method":"GET","url":"/apps/audioplayer/scanforaudiofiles?requesttoken=X7LN611hgq6bxgW2cEI5Mn6nSBaOfqhRkTSLFvvo0Qs%3D%3ANsv4xDMC9%2BDxkknuOSpAByqQAnX7D%2FEQqHDZeMPD%2Blg%3D","message":"Error while building library: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'title' cannot be null in /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php:130\nStack trace:\n#0 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php(130): PDOStatement->execute()\n#1 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/3rdparty/doctrine/dbal/src/Statement.php(190): Doctrine\\DBAL\\Driver\\PDO\\Statement->execute()\n#2 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/DB/PreparedStatement.php(86): Doctrine\\DBAL\\Statement->execute()\n#3 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/apps/audioplayer/lib/Controller/DbController.php(454): OC\\DB\\PreparedStatement->execute()\n#4 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/apps/audioplayer/lib/Controller/ScannerController.php(348): OCA\\audioplayer\\Controller\\DbController->writeTrackToDB()\n#5 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/apps/audioplayer/lib/Controller/ScannerController.php(184): OCA\\audioplayer\\Controller\\ScannerController->scanAudio()\n#6 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(232): OCA\\audioplayer\\Controller\\ScannerController->scanForAudios()\n#7 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(138): OC\\AppFramework\\Http\\Dispatcher->executeController()\n#8 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/AppFramework/App.php(184): OC\\AppFramework\\Http\\Dispatcher->dispatch()\n#9 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/Route/Router.php(338): OC\\AppFramework\\App::main()\n#10 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/base.php(1050): OC\\Route\\Router->match()\n#11 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/index.php(49): OC::handleRequest()\n#12 {main}\n\nNext Doctrine\\DBAL\\Driver\\PDO\\Exception: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'title' cannot be null in /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php:28\nStack trace:\n#0 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php(132): Doctrine\\DBAL\\Driver\\PDO\\Exception::new()\n#1 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/3rdparty/doctrine/dbal/src/Statement.php(190): Doctrine\\DBAL\\Driver\\PDO\\Statement->execute()\n#2 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/DB/PreparedStatement.php(86): Doctrine\\DBAL\\Statement->execute()\n#3 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/apps/audioplayer/lib/Controller/DbController.php(454): OC\\DB\\PreparedStatement->execute()\n#4 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/apps/audioplayer/lib/Controller/ScannerController.php(348): OCA\\audioplayer\\Controller\\DbController->writeTrackToDB()\n#5 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/apps/audioplayer/lib/Controller/ScannerController.php(184): OCA\\audioplayer\\Controller\\ScannerController->scanAudio()\n#6 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(232): OCA\\audioplayer\\Controller\\ScannerController->scanForAudios()\n#7 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(138): OC\\AppFramework\\Http\\Dispatcher->executeController()\n#8 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/AppFramework/App.php(184): OC\\AppFramework\\Http\\Dispatcher->dispatch()\n#9 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/Route/Router.php(338): OC\\AppFramework\\App::main()\n#10 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/base.php(1050): OC\\Route\\Router->match()\n#11 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/index.php(49): OC::handleRequest()\n#12 {main}\n\nNext Doctrine\\DBAL\\Exception\\NotNullConstraintViolationException: An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'title' cannot be null in /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:114\nStack trace:\n#0 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1943): Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter->convert()\n#1 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1885): Doctrine\\DBAL\\Connection->handleDriverException()\n#2 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/3rdparty/doctrine/dbal/src/Statement.php(194): Doctrine\\DBAL\\Connection->convertExceptionDuringQuery()\n#3 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/DB/PreparedStatement.php(86): Doctrine\\DBAL\\Statement->execute()\n#4 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/apps/audioplayer/lib/Controller/DbController.php(454): OC\\DB\\PreparedStatement->execute()\n#5 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/apps/audioplayer/lib/Controller/ScannerController.php(348): OCA\\audioplayer\\Controller\\DbController->writeTrackToDB()\n#6 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/apps/audioplayer/lib/Controller/ScannerController.php(184): OCA\\audioplayer\\Controller\\ScannerController->scanAudio()\n#7 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(232): OCA\\audioplayer\\Controller\\ScannerController->scanForAudios()\n#8 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(138): OC\\AppFramework\\Http\\Dispatcher->executeController()\n#9 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/AppFramework/App.php(184): OC\\AppFramework\\Http\\Dispatcher->dispatch()\n#10 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/private/Route/Router.php(338): OC\\AppFramework\\App::main()\n#11 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/lib/base.php(1050): OC\\Route\\Router->match()\n#12 /srv/web/my-nextcloud-folder-with-data-and-program/nextcloud/index.php(49): OC::handleRequest()\n#13 {main}","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36","version":"29.0.2.2","data":{"app":"audioplayer"},"id":"667abba09c66b"}
Rello commented 3 months ago

Hello, thats strange. it should never have an empty title because even then there is a fallback with the filename. I will have a look