# File/media\_dirs are not scanned for mp3 files

**URL:** <https://discourse.mopidy.com/t/file-media-dirs-are-not-scanned-for-mp3-files/1034>\
**Category:** Misc\
**Created:** [December 29, 2015, 3:34pm UTC](https://discourse.mopidy.com/t/file-media-dirs-are-not-scanned-for-mp3-files/1034 "2015-12-29T15:34:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![shimon001](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@shimon001](https://discourse.mopidy.com/u/shimon001)\
**Post date:** [December 29, 2015, 3:34pm UTC](https://discourse.mopidy.com/t/file-media-dirs-are-not-scanned-for-mp3-files/1034/1 "2015-12-29T15:34:10Z")

</div>

Hi, I am new to mopidy and I have currently installed it to my new Raspberry PI.

It runs as service under user `mopidy`. I am however unable to see the media files in my media directories.

I have mounted an USB drive to my raspberry PI, which is accessible on path:

```
/media/pi/SHIMON_USB

```

My `/etc/mopidy/mopidy.conf` looks like this:

```
[core]
cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy

[logging]
config_file = /etc/mopidy/logging.conf
debug_file = /var/log/mopidy/mopidy-debug.log

[local]
data_dir = /var/lib/mopidy/local
media_dir = /var/lib/mopidy/media

[m3u]
playlists_dir = /var/lib/mopidy/playlists

[file]
enabled = true
media_dirs =
  $XDG_MUSIC_DIR|Music
  ~/|Home
  /media/pi/SHIMON_USB|Shimon USB
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000

```

I have restarted the mopidy service using:

```
sudo service mopidy restart

```

and then scanned the local files using

```
sudo mopidyctl local scan

```

I am accessing the mopidy MPD through the RompR web extension, but I am unable to see any of the mp3 files placed on the USB stick. (I can see only one test mp3 file placed inside my `/var/lib/mopidy/media`).

Did I misunderstand some part of the configuration?

@jodal, @kingosticks - seems like you are the right persons to ask. Could you please check my configuration?

Thanks, shimon

---

<div class="post-metadata">

**Author:** ![tkem](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/tkem/32/22_2.png) [@tkem](https://discourse.mopidy.com/u/tkem)\
**Post date:** [December 30, 2015, 8:16pm UTC](https://discourse.mopidy.com/t/file-media-dirs-are-not-scanned-for-mp3-files/1034/2 "2015-12-30T20:16:52Z")

</div>

Using the `file` backend, there’s no need for `mopidyctl local scan`; all files will be available instantly, but _only_ via Mopidy’s “browse” interface. No search, no support for MPD `list` commands, etc. However, you should be able to see a top-level directory named “Files” with sub-directories “Music”, “Home” and (hopefully) “Shimon USB”.

I never used RompR, but IIRC there were some integration issues with Mopidy, and I don’t know if it supports the browse interface properly. So I’d suggest you just try one of the various other clients available and see if you can access your files.

---

<div class="post-metadata">

**Author:** ![shimon001](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@shimon001](https://discourse.mopidy.com/u/shimon001)\
**Post date:** [December 30, 2015, 8:23pm UTC](https://discourse.mopidy.com/t/file-media-dirs-are-not-scanned-for-mp3-files/1034/3 "2015-12-30T20:23:11Z")

</div>

Thanks for reply. I have noticed a warning message in my mopidy startup log:

```
2015-12-30 20:18:39,167 WARNING [536:MainThread] mopidy.file.library: /media/pi/SHIMON_USB is not a directory. Please create the directory or update the file/media_dirs config value.

```

I am able to see this directory in midnight commander. I tried to use `/media/pi` instead od `/media/pi/SHIMON_USB` in mopidy media\_dirs setting and I could see the top directory in RompR. However I couldn’t get to subdirectories on my usb stick through the RompR web interface.

Whe I try to `ls -l` the ‘/media/pi’ dir, I get this output:

```
pi@raspberrypi:~ $ ls -l /media/pi
total 5
drwxr-xr-x 3 root root 1024 Jan 1 1970 SETTINGS
drwx------ 6 pi pi 4096 Jan 1 1970 SHIMON_USB

```

Could it be, thaht the `mopidy` use is unable to even see this directory? The USB stick was mounted automatically, should I remount it and use different permissions?

Thanks, shimon

---

<div class="post-metadata">

**Author:** ![shimon001](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@shimon001](https://discourse.mopidy.com/u/shimon001)\
**Post date:** [December 30, 2015, 8:37pm UTC](https://discourse.mopidy.com/t/file-media-dirs-are-not-scanned-for-mp3-files/1034/4 "2015-12-30T20:37:31Z")

</div>

Problem solved 😃

I tried to mount my USB stick using `/etc/fstab` to other mount point with default permissions and it did the trick.

I have edited the `/etc/fstab` file with nano (I have added following line under other uncommented linex):

```
/dev/sda1 /media/usbstick vfat defaults 0 0 

```

then I have rebooted the Raspberry PI.

After that I have changed my mopidy configuration to point `media_dirs` to new directory (`/media/usbstick`) and the subdirectories are now shown in RompR web interface under ‘Files’ section.

---

<div class="post-metadata">

**Author:** ![tkem](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/tkem/32/22_2.png) [@tkem](https://discourse.mopidy.com/u/tkem)\
**Post date:** [December 30, 2015, 9:19pm UTC](https://discourse.mopidy.com/t/file-media-dirs-are-not-scanned-for-mp3-files/1034/5 "2015-12-30T21:19:29Z")

</div>

Just had a quick look at the code, and AFAICS your configured `media_dirs` have to exist when Mopidy starts, otherwise they will be ignored. Hence the lig messages. So another way to work around this would be to configure `/media/pi` as media dir, then you should be able to see your USB drive as a subdirectory even when you connect it at runtime.

---

<div class="post-metadata">

**Author:** ![shimon001](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@shimon001](https://discourse.mopidy.com/u/shimon001)\
**Post date:** [December 30, 2015, 9:25pm UTC](https://discourse.mopidy.com/t/file-media-dirs-are-not-scanned-for-mp3-files/1034/6 "2015-12-30T21:25:58Z")

</div>

I have tried this workaround (set `/media/pi` as media\_dirs) but I was unable to see any subdirectories in RompR web page. But after adding the mount point to fstab everything works just fine. Mopidy is really great - thanks 😉
