Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


How to config USB storage specific folder only
#1
Hi there,

I can not figure out how to make only specific folder on USB storage to be scanned not whole usb.

I got errors:

Code:
20220322 180530 worker: USB source (7b952e33-7045-4155-9865-e7962f56faa4)
20220322 180530 worker: NAS and UPnP sources (none configured)
20220322 180530 worker: --
20220322 180530 worker: -- Other
20220322 180530 worker: --
20220322 180530 worker: USB volume knob (Off)
20220322 180530 worker: USB auto-mounter (udisks-glue)
20220322 180530 worker: Saved MPD vol level (0)
20220322 180530 worker: Preamp volume level (0)
20220322 180531 worker: MPD volume level (75) restored
20220322 180531 worker: ALSA Rotel USB Audio 1.0 volume (94%)
20220322 180531 worker: Auto-play (Off)
20220322 180531 worker: Maintenance interval (120 minutes)
20220322 180531 worker: Screen saver activation (Never)
20220322 180531 worker: Session permissions (OK)
20220322 180532 worker: Watchdog started
20220322 180532 worker: Ready
20220322 182202 worker: Job sourcecfg
20220322 182204 sourceMount(): Mount error: (mount error: could not resolve address for NAS: Unknown error)
20220322 182731 worker: Job sourcecfg
20220322 182737 watchdog: Info: Reducing PHP fpm worker pool
20220322 182825 worker: Job sourcecfg
20220322 182827 sourceMount(): Mount error: (mount error: could not resolve address for media: Unknown error)

So the USB source is (7b952e33-7045-4155-9865-e7962f56faa4), but MoOde scans the whole USB, but I want only a specific folder on USB. I tried config source but I can not see USB option only samba, UPnP, sdcard.

What I am doing wrong again?
Reply
#2
Search the forum for "mpdignore", you'll find posts describing how to but a file in the folders you don't want scanned thqat makes the mpd scan ignore them.
----------------
Robert
Reply
#3
(03-22-2022, 08:34 AM)the_bertrum Wrote: Search the forum for "mpdignore", you'll find posts describing how to but a file in the folders you don't want scanned thqat makes the mpd scan ignore them.

Thanks to @the_bertrum, I made it, however, I read that mpc manual and it si called file with wildcards files names but I am not sure if it accepts directories, anyway I made it and happy to try but another bummer.

How to clear all music databases in moode and start from scratch?
Reply
#4
(03-23-2022, 04:08 AM)Relocated2007 Wrote:
(03-22-2022, 08:34 AM)the_bertrum Wrote: Search the forum for "mpdignore", you'll find posts describing how to but a file in the folders you don't want scanned thqat makes the mpd scan ignore them.

Thanks to @the_bertrum, I made it, however, I read that mpc manual and it si called file with wildcards files names but I am not sure if it accepts directories, anyway I made it and happy to try but another bummer.

How to clear all music databases in moode and start from scratch?

That's an easy one...just disconnect all sources....USB NAS etc and do an 'Update Library" from the main menu then go to the Library tab and for good measure do a Thumbnail update.... after this you should see only those MoOde Radio stations you have opted to keep and perhaps the 'Stereo Test"
----------
bob
Reply
#5
(03-23-2022, 04:08 AM)Relocated2007 Wrote: Thanks to @the_bertrum, I made it, however, I read that mpc manual and it si called file with wildcards files names but I am not sure if it accepts directories

You can either put something like this inside the mpdignore file:
Code:
/path/to/ignore/*
That will tell it to ignore everything in that folder.

Or , simply put an empty mpdignore file in each directory you wish to exclude.  Then mdp will ignore any folder with the mpdignore file in it.  I use this last method in my collection.

Another alternative of course it put all your music under a single top level folder and just point at that when you mount the source.

Finally, regenerate music library on the Library configuration page wipes the database before rebuilding it if you want a one push solution.
----------------
Robert
Reply
#6
(03-23-2022, 07:25 AM)the_bertrum Wrote:
(03-23-2022, 04:08 AM)Relocated2007 Wrote: Thanks to @the_bertrum, I made it, however, I read that mpc manual and it si called file with wildcards files names but I am not sure if it accepts directories

You can either put something like this inside the mpdignore file:
Code:
/path/to/ignore/*
That will tell it to ignore everything in that folder.

Or , simply put an empty mpdignore file in each directory you wish to exclude.  Then mdp will ignore any folder with the mpdignore file in it.  I use this last method in my collection.

Another alternative of course it put all your music under a single top level folder and just point at that when you mount the source.

Finally, regenerate music library on the Library configuration page wipes the database before rebuilding it if you want a one push solution.


Hmm, I have tried all that you guys wrote and only one thing is working when I unplug the USB drive and regenerate the library I end up with a clean one at least. But putting this 
Code:
.mpdignore

in folders doing nothing, I tried empty one and the one with paths no luck at all MoOde is too keen to grab every sound file from my USB-HDD.

From MPD manual:

Code:
The music directory and the database
The “music directory” is where you store your music files. MPD stores all relevant meta information about all songs in its “database”. Whenever you add, modify or remove songs in the music directory, you have to update the database, for example with mpc:

mpc update
Depending on the size of your music collection and the speed of the storage, this can take a while.

To exclude a file from the update, create a file called .mpdignore in its parent directory. Each line of that file may contain a list of shell wildcards. Matching files in the current directory and all subdirectories are excluded.

What are: shell wildcards?
Reply
#7
Wildcards are symbols that mean "match anything". From my collection, I have a music folder with everything in that I mount into moOde. In there is a folder called EXCLUDE which contains files I want to keep but don't want in moOde. Inside that folder I place a file called .mpdignore inside which I have a single asterisk, *. The * is the wildcard, means match everything. So mpd comes along and read the .mpdignore file and ingnores everything it finds that matches, which in this case is everything.

I could have put *.flac in the file, then mpd would only ignore everything that had a .flac file type. Or Q* would ignore anything that starts with a Q.
----------------
Robert
Reply
#8
(03-24-2022, 07:19 AM)the_bertrum Wrote: Wildcards are symbols that mean "match anything".  From my collection, I have a music folder with everything in that I mount into moOde.  In there is a folder called EXCLUDE which contains files I want to keep but don't want in moOde.  Inside that folder I place a file called .mpdignore inside which I have a single asterisk,  *.  The * is the wildcard, means match everything.  So mpd comes along and read the .mpdignore file and ingnores everything it finds that matches, which in this case is everything.

I could have put *.flac in the file, then mpd would only ignore everything that had a .flac file type.  Or Q* would ignore anything that starts with a Q.

Ok, that might work for me I will give it a go, thanks for the explanation.
Reply
#9
(03-25-2022, 01:54 AM)Relocated2007 Wrote:
(03-24-2022, 07:19 AM)the_bertrum Wrote: Wildcards are symbols that mean "match anything".  From my collection, I have a music folder with everything in that I mount into moOde.  In there is a folder called EXCLUDE which contains files I want to keep but don't want in moOde.  Inside that folder I place a file called .mpdignore inside which I have a single asterisk,  *.  The * is the wildcard, means match everything.  So mpd comes along and read the .mpdignore file and ingnores everything it finds that matches, which in this case is everything.

I could have put *.flac in the file, then mpd would only ignore everything that had a .flac file type.  Or Q* would ignore anything that starts with a Q.

Ok, that might work for me I will give it a go, thanks for the explanation.

Nope, it did not work at all. I do not know my USB is 4TB HDD ext4. 

I can not see when is mounted and I have an idea maybe to add to that mound possibility that only one folder is mounted if possible. Otherwise, I have no idea how to make it.
Reply
#10
Are you regenerating the library after putting the ignore file in place?
----------------
Robert
Reply


Forum Jump: