owncloud / music

:notes: Music app for ownCloud
GNU Affero General Public License v3.0
567 stars 197 forks source link

Field "length" is NULL, when files on external storage #747

Closed DSG5TRDD closed 4 years ago

DSG5TRDD commented 4 years ago

Hello,

Table: oc_music_tracks

The column "length" is NULL if the files are on external storage. If the files are on the internal storage, the column is filled correctly.

issue

DSG5TRDD commented 4 years ago

Unfortunately, the error is still there.

Nextcloud 18.0.4 PHP version: 7.3.18 MariaDB 10.1.44

Unbenannt

paulijar commented 4 years ago

Okay, thanks for the report.

What kind of external storage are you using? I couldn't reproduce this with local remote storage which is the easiest to set up.

I find it quite weird that extracting the track year has succeeded while getting the length has not. One would expect that if you don't get the length, you wouldn't get any other metadata, either.

When you view the track details on the web UI, is the length missing also then? Can you find anything from the nextcloud.log after you have opened the details pane? When details are viewed, the file metadata is extracted from the file basically the same way as during the indexing.

DSG5TRDD commented 4 years ago

grafik I use WebDav. It works, i can play the mp3 music with the music app.

grafik Data in table...

grafik Metadata in music app. The title is playing.

{"reqId":"uQyPBkJDGgBejVXtWZym","level":3,"time":"2020-05-28T20:57:22+00:00","remoteAddr":"XXX.XXX.XXX.XXX","user":"DSG5TRDD","app":"PHP","method":"GET","url":"/nextcloud/remote.php/webdav/Musik/Musik/Interpreten/N/NSYNC/NSYNC%20-%20Bravo%20Hits%2030%20-%2001-11%20-%20I%27ll%20Never%20Stop.mp3?requesttoken=Z121vcfOcMlvbobYBjdbls9CRnuiwL8YhJbaTOmPvnU%3D%3AIAeG%2F%2BilBbM8A8W9aVUj7%2Fh7CkPK7%2FlNz86yIo366B8%3D","message":"fseek(): stream does not support seeking at /var/www/html/nextcloud/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#82","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0","version":"18.0.4.2","id":"5ed025b353900"}

Data in errorlog.

paulijar commented 4 years ago

Based on your log, it seems that Nextcloud does not support seeking within a file on WebDAV-backed remote storage. The getID3 library we use for metadata extraction relies heavily on seeking, and can't function properly without this. Hence, you will end up with partial metadata.

I know that Nextcloud has just recently implemented seeking for S3-backed remote storages (https://github.com/nextcloud/server/pull/20033). However, I couldn't find any info about similar support for WebDAV backends, i.e. is it supposed to work or not.

Apart from some metadata missing from the details pane, do you see any problems caused by this? I think that the song length stored to the database is not used for anything when using the web UI, but it is used when providing song info via the Ampache or Subsonic APIs.

DSG5TRDD commented 4 years ago

I only use the "length" field for my own purposes, like my own MP3 list on my website. The length was also output there. (with internal storage!)

After switching to external storage, I noticed that the field now remains empty.

The empty field has no influence on the function of the app. It works great! So it's not a big issue, it's just a perception.

paulijar commented 4 years ago

I think that this case can be closed, as there is basically nothing we can do on the Music app. If the Nextcloud external storage adapters someday become more intelligent, then this problem should get solved automatically.