How do I scan music on a USB drive?


#1

Hello,

I have recently installed Mopidy and IRIS front end on my Raspberry Pi 2b.

Can some one help me by telling me how to scan the music that is on my USB drive so that it shows up in IRIS.

Thanks in advance! :slight_smile:


#2
  1. Mount the USB drive.
  2. Set the Local extension’s media_dir setting in your mopidy.conf to the path you mounted the drive at in #1.
  3. Run sudo mopidyctl local scan (or mopidy local scan).

#3

Hi @kingosticks

I just ran df -h

and i can see my usb has the following values

File system: /dev/sda1

Mounted on: /media/pi/F54D-CFFB

  • Do i update media_dir = $XDG_MUSIC_DIR to one of those values above?

  • Which value should I use?

Thank you for your help


#4

Since it is mounted at /media/pi/F54D-CFFB you update media_dir = /media/pi/F54D-CFFB.


#5

Hello @kingosticks

Here is an update for you.

My config file with the [local] part updated now looks like this

Here is the output from Mopidy local scan

Don’t know if it’s worth mentioning but when I was doing the last part of the IRIS install I got this message

  • Can you advise me on what to do next. I’m not seeing any media pulled in to IRIS yet.

Thank you


#6

Your pi user must have read access to the USB drive.

The output of the scan should look more like this:

INFO     Starting Mopidy 2.1.0-111-g65014ad4
INFO     Loading config from builtin defaults
INFO     Loading config from /home/nick/.config/mopidy/mopidy.conf
INFO     Loading config from command line options
INFO     Enabled extensions: mpd, http, file, stream, m3u, softwaremixer, musicbox_webclient, local
INFO     Disabled extensions: none
INFO     Found 0 files in media_dir.
INFO     Checking 0 tracks from library.
INFO     Removing 0 missing tracks.
INFO     Found 0 tracks which need to be updated.
INFO     Scanning...
INFO     Scanned 0 of 0 files in 0s.
INFO     Done scanning.

Yours looks like it hasn’t even started scanning yet. I don’t know why it would be stuck, try running with the -v option i.e. mopidy -v local scan.


#7

Thank you for your help with this @kingosticks

So here is the new out put from running mopidy -v local scan

Yet still nothing showing in IRIS yet

  • Any thoughts on what to do next?

#8

Provide the entire log output (not a picture) from Mopidy firstly when running mopidy local scan (this obviously got a log further than the first image you posted, any explanation why that is?) and then also when starting Mopidy normally afterwards.


#9

Thanks @kingosticks

One quick question before running the scans.

Should the music be in the root folder of the USB?

My current set up is - USB Stick/Music/Artist-Name/Album-Name

Also on the usb is things like USB Sitck/Photos/Month/

Etc.


#10

It will start at the folder you configured and scan everything in and below that folder. Sounds like you’ll have it trying to scan a load of photos too; which should be fine, it’s just a waste of time. You would be better off setting the media_dir to /media/pi/F54D-CFFB/Music (or whatever the exact path is).


#11

I’ve just set up from scratch - if using Iris you need to go Browse then the music should be in ‘Local Media’, after scanning I also restarted Mopidy before the files appeared.
As kingosticks recommended it will be much quicker to point directly at the Music.


#12

Hi @kingosticks

I have updated the [local] to the exact path of the folder that contains the music.

Here is what I get when mopidy isn’t running and I execute mopidy local scan

And here is what I get when mopidy isn’t running and I execute mopidy -v local scan

Please let me know what to do next

And thank you for your continued help with this!


#13

The second log isn’t what I asked for. Either way looks like mopidy has found your tracks so this is something to do with iris. I suggest you follow what @Steve_Lambert said regarding how to view your local files in iris.


#14

Thank you for all your help today @kingosticks. It’s really appreciated!

@Steve_Lambert

I’ve pointed my [local] directly to the folder with the music in it.

And when I go to Browse I do see my audio and it plays

  • I was expecting to appear in Artists and in Albums and display the cover art. Is there any way to make this happened?

Thank you for helping me with this


#15

When playing I see the album art. I think the artwork needs to be in the same folder as the music you are playing. I have 5 albums on the usb stick and each one is in a separate folder with the relevant artwork.

I don’t know - I usually only use Mopidy for playing Spotify tracks, your queries have made me look at other forms of playing music. Have a look at the Settings page in Iris, there is an option there for Artist library URI that might be useful, probably best to ask the question on the Iris Github page


#16

@Steve_Lambert

A brief reply as typing from my phone.

My album artwork is embedded in to the mp3s.

Are you saying that I need to have a .jpeg of the art work inside each folder?

Thank you :slight_smile:


#17

No, when I checked again it’s all a bit haphazard, some tracks show artwork, some on the same album don’t. Some will show in the web UI Musicbox Webclient but not in Iris. I retagged a lot with musicbrainz but not sure if that made any difference.
As mentioned previous post I usually only use Spotify so can’t really offer any more advice on how to get the album art showing.


#18

Thanks for the reply @Steve_Lambert,

I also tagged my music with MusicBrainz Pickard.

Sounds like I might need to start a new thread to get others to weigh in on this issue.

Thank you for all your help (and to you @kingosticks) at least I have the critical part working and I can access my music via the web interface. Thank you again for all your help. Greatly appreciated :slight_smile: