maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Telling Media Player to ignore certain directories (https://talk.maemo.org/showthread.php?t=64983)

LaptopU 2010-11-03 12:08

Telling Media Player to ignore certain directories
 
I am sure this has been covered already but for the life of me I cannot find a thread on it.

I installed Sygic Maps recently and now there are 31 tracks by 'unknown' artist in my media player with the tag 'test'. These all stem from the Sygic installation. How can I tell Media Player to ignore the Sygic directories when it scans for media?

Also, this is a slightly different question, there is nothing in the repos for controlling media by the headset controls. Is there anything for Maemo yet that can reliably do this?

Cheers all.

James_Littler 2010-11-03 12:11

Re: Telling Media Player to ignore certain directories
 
edit the tracker.cfg file and add your excludes

e.g.
Code:

# List of directory roots NOT to index and NOT to watch (separator=;)
NoWatchDirectory=$HOME/MyDocs/core-dumps/;$HOME/MyDocs/cities/;$HOME/MyDocs/.sounds/Ringtones/;$HOME/MyDocs/tmp/;/home/user/MyDocs/cities/diskcache/e/1/;/home/user/MyDocs/cities/diskcache/5/8/;/media/mmc1/tmp/;/media/mmc1/cities/;/home/opt;/media/mmc1/games/;/media/mmc1/Temp/;/home/user/;$HOME/MyDocs/;/home/user/MyDocs/irreco/modern/buttons/blank/;/home/user/MyDocs/irreco/modern/buttons/down/;/home/user/MyDocs/irreco/modern/buttons/left/;/home/user/MyDocs/irreco/modern/buttons/menu/;/home/user/MyDocs/irreco/modern/buttons/next/;/home/user/MyDocs/irreco/modern/buttons/num_0/;/home/user/MyDocs/irreco/modern/buttons/num_1/;/home/user/MyDocs/irreco/modern/buttons/num_2/;/home/user/MyDocs/irreco/modern/buttons/num_3/;/home/user/MyDocs/irreco/modern/buttons/num_4/;/home/user/MyDocs/irreco/modern/buttons/num_5/;/home/user/MyDocs/irreco/modern/buttons/num_6/;/home/user/MyDocs/irreco/modern/buttons/num_7/;/home/user/MyDocs/irreco/modern/buttons/num_8/;/home/user/MyDocs/irreco/modern/buttons/num_9/;/home/user/MyDocs/irreco/modern/buttons/ok/;/home/user/MyDocs/irreco/modern/buttons/pause/;/home/user/MyDocs/irreco/modern/buttons/play/;/home/user/MyDocs/irreco/modern/buttons/playpause/;/home/user/MyDocs/irreco/modern/buttons/power/;/home/user/MyDocs/irreco/modern/buttons/prev/;/home/user/MyDocs/irreco/modern/buttons/right/;/home/user/MyDocs/irreco/modern/buttons/up/;


LaptopU 2010-11-03 12:22

Re: Telling Media Player to ignore certain directories
 
Thanks, where should the tracker.cfg file appear as I don't appear to have one?

lasas 2010-11-03 12:23

Re: Telling Media Player to ignore certain directories
 
Where this file is located?

James_Littler 2010-11-03 12:31

Re: Telling Media Player to ignore certain directories
 
/home/user/.config/tracker/tracker.cfg

jer006 2010-11-03 12:36

Re: Telling Media Player to ignore certain directories
 
is it possible to exclude images (ie album art) from the photos app using tracker.cfg and if so how?

jedi 2010-11-03 12:38

Re: Telling Media Player to ignore certain directories
 
Quote:

Originally Posted by jer006 (Post 862059)
is it possible to exclude images (ie album art) from the photos app using tracker.cfg and if so how?

Stupidly, no it's not possible. The same tracker is used for the media player and the photo viewer so any image it finds in your music folder will be shown in the photo viewer.

SubCore 2010-11-03 12:47

Re: Telling Media Player to ignore certain directories
 
Quote:

Originally Posted by jer006 (Post 862059)
is it possible to exclude images (ie album art) from the photos app using tracker.cfg and if so how?

NoIndexFileTypes=FILEGLOB[;MORE;FILEGLOBS...]

should do what you want (haven't tested it though.)

jedi 2010-11-03 12:49

Re: Telling Media Player to ignore certain directories
 
Quote:

Originally Posted by SubCore (Post 862072)
NoIndexFileTypes=FILEGLOB[;MORE;FILEGLOBS...]

should do what you want (haven't tested it though.)

Sounds like it's a setting to ignore filetypes. But (as far as I'm aware) you can't tell it to *only* index audio files in your Music directory and *only* pics in your photos dir.

SubCore 2010-11-03 12:56

Re: Telling Media Player to ignore certain directories
 
Quote:

Originally Posted by jedi (Post 862076)
Sounds like it's a setting to ignore filetypes.

not just filetypes - you can put any pattern there, and files matching that pattern won't be indexed.
album art usually has "AlbumArt" or something similar in it's name, so it should be possible to set a pattern that will match all those files, but leave all other image files as indexed.

lasas 2010-11-03 13:07

Re: Telling Media Player to ignore certain directories
 
Is it possible not to exclude some folders, but to specify which folders to track?
That would be easier.

LaptopU 2010-11-03 13:08

Re: Telling Media Player to ignore certain directories
 
I'm stuck now, and have been bashing my keyboard for a while. I know this will be a simple error as well so I apologise in advance.

The folder I want to ignore is called 'Res' and it appears in the home directory (along with 'Drive', 'Mac OS', 'Music' etc. just so you know exactly where I am). In the same directory I created another folder called .config and within this directory I put in another, tracker. Then I edited a file to read NoWatchDirectory=$HOME/Res/; and called it tracker.cfg.

Even though media player has done a rescan the files in the 'Res' directory still appear. Where have I fouled up?

Thanks.

SubCore 2010-11-03 13:27

Re: Telling Media Player to ignore certain directories
 
Quote:

Originally Posted by lasas (Post 862100)
Is it possible not to exclude some folders, but to specify which folders to track?
That would be easier.

WatchDirectoryRoots=DIRECTORY[;MORE;DIRECTORIES]

(srsly, search is your friend...)

Quote:

Originally Posted by LaptopU (Post 862102)
In the same directory I created another folder called .config and within this directory I put in another, tracker.

tracker will only read it's config file from /home/user/.config/tracker/tracker.cfg - that's the file you have to edit. creating your own tracker config file(s) elsewhere won't work.

demiurgus 2010-11-03 13:36

Re: Telling Media Player to ignore certain directories
 
The MyDocs partition is considered a removable device and is controlled by another setting that tells the tracker to index it by default, so if you want it to only index explicitly given directories you need to add $HOME/MyDocs to No Watch Directories.
You can also try tracker-cfg (I wrote it) from extras-devel that gives you a GUI to modify these settings.

LaptopU 2010-11-03 13:50

Re: Telling Media Player to ignore certain directories
 
I think I have hit a problem in that case, I am on Ubuntu and cannot see the /home/user/ file and I cannot browse to it. In mass storage mode the only directory I can see and browse is the main folder containing music, DCIM and so on. Any ideas how I can get to the other directories within Ubuntu?

zerocool2k 2010-11-03 13:53

Re: Telling Media Player to ignore certain directories
 
Quote:

Originally Posted by LaptopU (Post 862171)
I think I have hit a problem in that case, I am on Ubuntu and cannot see the /home/user/ file and I cannot browse to it. In mass storage mode the only directory I can see and browse is the main folder containing music, DCIM and so on. Any ideas how I can get to the other directories within Ubuntu?

Install rootsh and ssh on your phone.

N900@900MHz 2010-11-03 14:35

Re: Telling Media Player to ignore certain directories
 
hello i have also a unknown album in my playlist, it's from sygic navigation, the sound files are in /home/user/MyDocs/Res/. (sounds and voices) I have edit the tracker.cfg file, but no result.
What exactly i have to put in the .cfg file and where???

LaptopU 2010-11-03 14:41

Re: Telling Media Player to ignore certain directories
 
Brilliant, thanks a lot all worked for me.

Carlito 2010-11-03 14:45

Re: Telling Media Player to ignore certain directories
 
Quote:

Originally Posted by N900@900MHz (Post 862217)
hello i have also a unknown album in my playlist, it's from sygic navigation, the sound files are in /home/user/MyDocs/Res/. (sounds and voices) I have edit the tracker.cfg file, but no result.
What exactly i have to put in the .cfg file and where???

Same for me . . . someone got the solution?

jedi 2010-11-03 14:47

Re: Telling Media Player to ignore certain directories
 
Quote:

Originally Posted by Carlito (Post 862227)
Same for me . . . someone got the solution?

See post #2 in this thread....?!

Carlito 2010-11-03 14:54

Re: Telling Media Player to ignore certain directories
 
Quote:

Originally Posted by jedi (Post 862232)
See post #2 in this thread....?!

Did that already with Tracker GUI, no result... still there.


EDIT: Got it!! Did a reindex with xterminal.

demiurgus 2010-11-03 14:55

Re: Telling Media Player to ignore certain directories
 
Did you rebuild the tracker database? If not the unwanted entries will still be there.

Carlito 2010-11-03 14:59

Re: Telling Media Player to ignore certain directories
 
Quote:

Originally Posted by demiurgus (Post 862238)
Did you rebuild the tracker database? If not the unwanted entries will still be there.

Yep. Works already!

lasas 2010-11-03 15:26

Re: Telling Media Player to ignore certain directories
 
Cannot get it working if I add other folder then MyDocs like:
/home/user/applications/ or other

Tried GUI and editing file, rebuilding DB's, still no luck.

Any suggestions?

Carlito 2010-11-03 15:35

Re: Telling Media Player to ignore certain directories
 
Quote:

Originally Posted by lasas (Post 862270)
Cannot get it working if I add other folder then MyDocs like:
/home/user/applications/ or other

Tried GUI and editing file, rebuilding DB's, still no luck.

Any suggestions?

X-Terminal try this

~ $ tracker-processes -r
~ $ /usr/lib/tracker/trackerd -r

jedi 2010-11-03 15:54

Re: Telling Media Player to ignore certain directories
 
Quote:

Originally Posted by SubCore (Post 862072)
NoIndexFileTypes=FILEGLOB[;MORE;FILEGLOBS...]

should do what you want (haven't tested it though.)

The problem with this is that I haven't got a consitent format for my cover art.

As a selection, I've got files like:
cover.jpg
folder.jpg
<name of album>.jpg
AlbumArt_{12345679324789234293}.jpg
AlbumArtSmall.jpg
Cov.jpg
etc... etc...
And that doesn't include derivatives with different capitalization etc :(

If only there was an option to index given file types in given directories -OR- someone write a nice/better photo viewer app :)

SubCore 2010-11-03 16:36

Re: Telling Media Player to ignore certain directories
 
Quote:

Originally Posted by jedi (Post 862315)
The problem with this is that I haven't got a consitent format for my cover art.

did you try putting the path in the glob?

maybe something like
Code:

NoIndexFileTypes=/home/user/MyDocs/Music/*jpg;/home/user/MyDocs/Music/*png
will work.
that would nicely solve your problem.

jedi 2010-11-03 17:58

Re: Telling Media Player to ignore certain directories
 
Quote:

Originally Posted by SubCore (Post 862367)
did you try putting the path in the glob?

maybe something like
Code:

NoIndexFileTypes=/home/user/MyDocs/Music/*jpg;/home/user/MyDocs/Music/*png
will work.
that would nicely solve your problem.

I LOVE YOU!

I'd assumed that this was only for fike types (ie jpg, png, etc) - didn't realise you could but a full path in there Doh!

I'm sure this topic has been discussed more than several times here but I'd never seen this solution before...

Thanks again :)

N900@900MHz 2010-11-04 08:55

Re: Telling Media Player to ignore certain directories
 
Quote:

Originally Posted by Carlito (Post 862285)
X-Terminal try this

~ $ tracker-processes -r
~ $ /usr/lib/tracker/trackerd -r

this worked for me!

jedi 2010-11-04 12:39

Re: Telling Media Player to ignore certain directories
 
Quote:

Originally Posted by jedi (Post 862448)
I LOVE YOU!

I'd assumed that this was only for fike types (ie jpg, png, etc) - didn't realise you could but a full path in there Doh!

I'm sure this topic has been discussed more than several times here but I'd never seen this solution before...

Thanks again :)

Errrrrrrr..... hang on.

This doesn't appear to work. I've been fiddling with many different combinations including:

NoIndexFileTypes=/home/user/MyDocs/Music/*jpg;
NoIndexFileTypes=/home/user/MyDocs/Music/*.jpg;

But it's still showing jpg's from my Music directory in the photo viewer :(

Maybe my outpouring of love was a little premature?!

SubCore 2010-11-04 13:28

Re: Telling Media Player to ignore certain directories
 
Quote:

Originally Posted by jedi (Post 863191)
Maybe my outpouring of love was a little premature?!

hehe yes, i said maybe this'll work :)
for some programs, the filename to which pattern matching is applied contains the whole path, for some it doesn't.
apparently tracker belongs in the latter group.

kureyon 2010-11-04 14:07

Re: Telling Media Player to ignore certain directories
 
You can try this (this is assuming that /home/user/MyDocs/Music/ only contains sub-directories that actually hold your music and album art:

Code:

NoIndexFileTypes=/home/user/MyDocs/Music/*/*.jpg;
If /home/user/MyDocs/Music/ also contains album art then you need to add an extra path:

Code:

NoIndexFileTypes=/home/user/MyDocs/Music/*.jpg;
And you may need to add extra paths like so depending on how you have stored your music and how many levels deep:

Code:

NoIndexFileTypes=/home/user/MyDocs/Music/*/*.jpg;/home/user/MyDocs/Music/*/*/*.jpg;

slender 2010-11-04 14:10

Re: Telling Media Player to ignore certain directories
 
When making changes to tracker cfg you have to remember that some changes happen only after when you rebuild database. So restarting tracker doesnīt remove pics/videos from database if you have chosen to ignore some directory.

jedi 2010-11-04 14:14

Re: Telling Media Player to ignore certain directories
 
Quote:

Originally Posted by slender (Post 863260)
When making changes to tracker cfg you have to remember that some changes happen only after when you rebuild database. So restarting tracker doesnīt remove pics/videos from database if you have chosen to ignore some directory.

You mean with
Code:

$ tracker-processes -r
?

slender 2010-11-04 14:20

Re: Telling Media Player to ignore certain directories
 
Quote:

Originally Posted by jedi (Post 863265)
You mean with
Code:

$ tracker-processes -r
?

Yep IIRC. I normally use tracker configuration GUI which has those commands in top menu.

Code:

user@Nokia-N900-42-11:~$ tracker-processes --help
Usage:
  tracker-processes [OPTION...]  - Manage Tracker processes and data

Help Options:
  -?, --help          Show help options

Application Options:
  -k, --kill          Use SIGKILL to stop all tracker processes found - guarantees death :)
  -t, --terminate      Use SIGTERM to stop all tracker processes found
  -r, --hard-reset    This will kill all Tracker processes and remove all databases

.edit
and btw. Tracker manages the index of email also dunno about sms&im messages, contacts etc. so please be aware that it will rebuild ALL indexes. Not only audio & video.

jedi 2010-11-04 14:23

Re: Telling Media Player to ignore certain directories
 
Quote:

Originally Posted by slender (Post 863271)
Yep IIRC. I normally use tracker configuration GUI which has those commands in top menu.

Code:

user@Nokia-N900-42-11:~$ tracker-processes --help
Usage:
  tracker-processes [OPTION...]  - Manage Tracker processes and data

Help Options:
  -?, --help          Show help options

Application Options:
  -k, --kill          Use SIGKILL to stop all tracker processes found - guarantees death :)
  -t, --terminate      Use SIGTERM to stop all tracker processes found
  -r, --hard-reset    This will kill all Tracker processes and remove all databases


Right, thanks. Yeah I've been doing that.... (and waiting half an hour while it re-creates the indexes)

slender 2010-11-04 14:31

Re: Telling Media Player to ignore certain directories
 
Quote:

Originally Posted by jedi (Post 863274)
Right, thanks. Yeah I've been doing that.... (and waiting half an hour while it re-creates the indexes)

Yeah if you have lotīs of stuff. And just a thought. If you have just couple of files that you want to remove then better and faster way would be:
copy files to desktop pc
delete files from n900
change tracker configuration
copy them back to n900

jedi 2010-11-04 14:34

Re: Telling Media Player to ignore certain directories
 
Quote:

Originally Posted by kureyon (Post 863256)
Code:

NoIndexFileTypes=/home/user/MyDocs/Music/*/*.jpg;
If /home/user/MyDocs/Music/ also contains album art then you need to add an extra path:

Thanks, but made no difference. Nor did the other ideas :(

kureyon 2010-11-04 18:31

Re: Telling Media Player to ignore certain directories
 
Quote:

Originally Posted by jedi (Post 863288)
Thanks, but made no difference.

Been running some tests, have tried path with fileglob and just plain fileglob

Code:

NoIndexFileTypes = /media/mmc1/music/*/*/*.jpg;/media/mmc1/music/*/*/*/*.jpg;*.mp4
But they still get indexed.

And doing lots of googling, I think I can only come to this conclusion:
NoIndexFileTypes does not work

cjsegninir 2010-11-05 02:05

Re: Telling Media Player to ignore certain directories
 
I did the music correctly, but I want to do the same with pictures. When I go to the gallery, I don't want to see all the album art...
Any help?


All times are GMT. The time now is 19:19.

vBulletin® Version 3.8.8