Unable to scan music library with RC3 on Raspberry Pi 2

I just installed OSMC RC3 on a Raspberry Pi 2. Scanning video libraries went well, but I am unable to scan a music library. With debugging on, it always says it is unable to find tags in the audio files. However, the audio files are all tagged and were scanned without any problems when I previously ran Raspbmc.

Whenever I try to post the full log to paste.osmc.io, it says “Something went wrong”, but here’s the first part of the log, which I think shows the problem. Has anyone experienced anything similar?

10:34:09 T:1786426400   DEBUG: Process - Starting scan
10:34:09 T:1736094752  NOTICE: Thread MusicFileCounter start, auto delete: false
10:34:09 T:1736094752   DEBUG: CurlFile::Open(0x677a8bb0) http://gumiho:80/media/music/
10:34:09 T:1786426400   DEBUG: CurlFile::Open(0x6a7a8a30) http://gumiho:80/media/music/
10:34:09 T:1786426400    INFO: easy_aquire - Created session to http://gumiho
10:34:09 T:1736094752   DEBUG: CurlFile::Open(0x677a89d8) http://gumiho:80/media/music/.btrfs/
10:34:10 T:1736094752   ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 403
10:34:10 T:1736094752  NOTICE: CCurlFile::FillBuffer - Reconnect, (re)try 1
10:34:10 T:1736094752   ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 403
10:34:10 T:1736094752   ERROR: CCurlFile::CReadState::Connect, didn't get any data from stream.
10:34:10 T:1736094752   ERROR: GetDirectory - Unable to get http directory
10:34:10 T:1736094752   ERROR: GetDirectory - Error getting http://gumiho:80/media/music/.btrfs/
10:34:10 T:1736094752   DEBUG: CurlFile::Open(0x677a89d8) http://gumiho:80/media/music/AKMU/
10:34:10 T:1736094752   DEBUG: CurlFile::Open(0x677a8800) http://gumiho:80/media/music/AKMU/PLAY/
10:34:10 T:1736094752   DEBUG: CurlFile::Open(0x677a89d8) http://gumiho:80/media/music/AOA/
10:34:10 T:1736094752   DEBUG: CurlFile::Open(0x677a8800) http://gumiho:80/media/music/AOA/Like%20A%20Cat/
10:34:10 T:1736094752   DEBUG: CurlFile::Open(0x677a89d8) http://gumiho:80/media/music/APink/
10:34:10 T:1736094752   DEBUG: CurlFile::Open(0x677a8800) http://gumiho:80/media/music/APink/Pink%20Blossom/
10:34:10 T:1736094752   DEBUG: CurlFile::Open(0x677a8800) http://gumiho:80/media/music/APink/Pink%20Luv/
10:34:10 T:1736094752   DEBUG: CurlFile::Open(0x677a8800) http://gumiho:80/media/music/APink/Secret%20Garden/
10:34:10 T:1736094752   DEBUG: CurlFile::Open(0x677a8800) http://gumiho:80/media/music/APink/Snow%20Pink/
10:34:10 T:1736094752   DEBUG: CurlFile::Open(0x677a8800) http://gumiho:80/media/music/APink/Une%20Ann%c3%a9e/
10:34:10 T:1736094752   DEBUG: CurlFile::Open(0x677a89d8) http://gumiho:80/media/music/Beef%20Terminal/
10:34:10 T:1786426400   DEBUG: DoScan Scanning dir 'http://gumiho:80/media/music/' as not in the database
10:34:10 T:1736094752   DEBUG: CurlFile::Open(0x677a8800) http://gumiho:80/media/music/Beef%20Terminal/Anger%20Do%20Not%20Enter/
10:34:10 T:1736094752   DEBUG: CurlFile::Open(0x677a89d8) http://gumiho:80/media/music/Benny%20Goodman/
10:34:10 T:1736094752   DEBUG: CurlFile::Open(0x677a8800) http://gumiho:80/media/music/Benny%20Goodman/28-29%20Benny%20Goodman/
10:34:11 T:1736094752   DEBUG: CurlFile::Open(0x677a8800) http://gumiho:80/media/music/Benny%20Goodman/31-34%20Benny%20Goodman/
10:34:12 T:1736094752   DEBUG: CurlFile::Open(0x677a8800) http://gumiho:80/media/music/Benny%20Goodman/34-36%20Benny%20Goodman/
10:34:12 T:1736094752   DEBUG: CurlFile::Open(0x677a8800) http://gumiho:80/media/music/Benny%20Goodman/35-39%20Benny%20Goodman%20Combos/
10:34:12 T:1786426400   DEBUG: CurlFile::Open(0x6a7a8858) http://gumiho:80/media/music/.btrfs/
10:34:12 T:1786426400   ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 403
10:34:12 T:1786426400  NOTICE: CCurlFile::FillBuffer - Reconnect, (re)try 1
10:34:12 T:1786426400   ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 403
10:34:12 T:1786426400   ERROR: CCurlFile::CReadState::Connect, didn't get any data from stream.
10:34:12 T:1786426400   ERROR: GetDirectory - Unable to get http directory
10:34:12 T:1786426400   ERROR: GetDirectory - Error getting http://gumiho:80/media/music/.btrfs/
10:34:12 T:1786426400   DEBUG: DoScan Scanning dir 'http://gumiho:80/media/music/.btrfs/' as not in the database
10:34:13 T:1736094752   DEBUG: CurlFile::Open(0x677a8800) http://gumiho:80/media/music/Benny%20Goodman/37-38%20BennyGoodman/
10:34:13 T:1786426400   DEBUG: CurlFile::Open(0x6a7a8858) http://gumiho:80/media/music/AKMU/
10:34:13 T:1786426400   DEBUG: DoScan Scanning dir 'http://gumiho:80/media/music/AKMU/' as not in the database
10:34:13 T:1736094752   DEBUG: CurlFile::Open(0x677a8800) http://gumiho:80/media/music/Benny%20Goodman/38-39%20BennyGoodman/
10:34:13 T:1736094752   DEBUG: CurlFile::Open(0x677a8800) http://gumiho:80/media/music/Benny%20Goodman/39-40%20BennyGoodman/
10:34:13 T:1736094752   DEBUG: CurlFile::Open(0x677a8800) http://gumiho:80/media/music/Benny%20Goodman/39-41%20Charlie%20Christian%20with%20B.G/
10:34:13 T:1786426400   DEBUG: CurlFile::Open(0x6a7a8680) http://gumiho:80/media/music/AKMU/PLAY/
10:34:13 T:1786426400   DEBUG: DoScan Scanning dir 'http://gumiho:80/media/music/AKMU/PLAY/' as not in the database
10:34:13 T:1786426400   DEBUG: ScanTags - No tag found for: http://gumiho:80/media/music/AKMU/PLAY/01%20Give%20Love.mp3
10:34:13 T:1786426400   DEBUG: ScanTags - No tag found for: http://gumiho:80/media/music/AKMU/PLAY/02%20200_.mp3
10:34:13 T:1786426400   DEBUG: ScanTags - No tag found for: http://gumiho:80/media/music/AKMU/PLAY/03%20%ec%96%bc%ec%9d%8c%eb%93%a4.mp3
10:34:13 T:1786426400   DEBUG: ScanTags - No tag found for: http://gumiho:80/media/music/AKMU/PLAY/04%20%ec%a7%80%ed%95%98%ec%b2%a0%ec%97%90%ec%84%9c.mp3
10:34:13 T:1786426400   DEBUG: ScanTags - No tag found for: http://gumiho:80/media/music/AKMU/PLAY/05%20%ea%b0%80%eb%a5%b4%eb%a7%88.mp3
10:34:13 T:1786426400   DEBUG: ScanTags - No tag found for: http://gumiho:80/media/music/AKMU/PLAY/06%20%ec%9d%b8%ea%b3%b5%ec%9e%94%eb%94%94.mp3
10:34:13 T:1786426400   DEBUG: ScanTags - No tag found for: http://gumiho:80/media/music/AKMU/PLAY/07%20%ec%95%88%eb%85%95.mp3
10:34:13 T:1786426400   DEBUG: ScanTags - No tag found for: http://gumiho:80/media/music/AKMU/PLAY/08%20%ec%9e%91%ec%9d%80%eb%b3%84.mp3
10:34:13 T:1786426400   DEBUG: ScanTags - No tag found for: http://gumiho:80/media/music/AKMU/PLAY/09%20%ea%b8%b8%ec%9d%b4%eb%82%98.mp3
10:34:13 T:1786426400   DEBUG: ScanTags - No tag found for: http://gumiho:80/media/music/AKMU/PLAY/10%20%ec%86%8c%ec%9e%ac.mp3

The curl failures and the failure of the log uploader would indicate a network connectivity issue. Writing the logs to a file and using another system to get then on a paste site would be helpful in determining the issue.

Okay I still wasn’t able to get paste.osmc.io working, but it did work with pastebin. Here’s the link: http://pastebin.com/U4K4da5h

Your webserver is not allowing Kodi to connect to the /media/music path, so check your webserver’s permissions.

Out of curiosity why are you using http (or webdav) to a local server ? Not a protocol really designed for this, you’re better off using NFS or SMB.

403 is only returned for the .btrfs directory, which is deliberate. Every other file returns 200 OK. I can play every file perfectly fine in file mode, just not in library mode. Also, when I try to play a file in file mode, while the song plays fine, none of the metadata tags are read in (Kodi displays the title, artist, etc. as “Unknown”)

I’m using HTTP because I’d already spent a couple hours trying to get NFS working and it was being stubborn (it seems Kodi does not do NFSv4). Setting up http took literally 5 seconds to configure and worked perfectly for video (and had much better performance than when I’d tried NFS under Raspbmc), so I thought I’d run with it and see if it works.

Alright, I gave up on http. It works now.

HTTP is not a good idea for a library source except as a last resort - the HTTP support in Kodi is designed more for addons to use to stream video from a website using individual, specific URL’s.

To do a library scan Kodi needs to retrieve directory listings from the server to know what files are present which means you need directory listings enabled on the HTTP server. The problem is there is no standardised format for directory listings to be displayed in over HTTP - it’s just an HTML page with a particular layout and design that the webserver programmer came up with.

Kodi knows how to parse the “default” apache directory listing style somewhat ok, but does not know how to parse IIS directory listings or any other custom format, in my experience. Writing a parser to handle every possible HTML directory listing page design is probably an impossible task.

Not being able to reliably parse and scan the directory listings (even of an apache server) will lead to problems with library scanning. That’s why switching to another protocol that properly supports directory listings has solved your problem.