Need a fast search method for locating MP3 files.
Need a fast search method for locating MP3 files.
My problem is just that. I have quite a collection of MP3 files in many different folders. Using "Turma find text" to find, for example, all the Beatles songs on both my hard drives could take ten minutes or more. And then when I do find them I can't enqueue them in XMMS. By comparison, Windows "search function" is very intuitive and much, much faster. Plus, I can then play whichever songs it finds. Very simple. Has anyone found a better method?
install these 2 files (11 kb):
http://dotpups.de/dotpups/System_Utilities/nohup.pup
http://dotpups.de/dotpups/Multimedia/play-mp3.pup
Then run play-mp3 from the Dotpups-menu.
It allows you to enter a search-word like "whatever".
Then it will scan all subfolders in /root for .mp3-files that contains "whatever" in the filename.
When it scanned all folders, it will play the found files with xmms.
To scan other folders than /root, open
/usr/local/play-mp3/play-mp3
in a texteditor, and alter the line
FOLDER=/root
to your needs.
It is not that fast on huge harddisks, but my pup001 is scanned in some seconds without mounted drives.
Please tell me, how it works for you.
Mark
http://dotpups.de/dotpups/System_Utilities/nohup.pup
http://dotpups.de/dotpups/Multimedia/play-mp3.pup
Then run play-mp3 from the Dotpups-menu.
It allows you to enter a search-word like "whatever".
Then it will scan all subfolders in /root for .mp3-files that contains "whatever" in the filename.
When it scanned all folders, it will play the found files with xmms.
To scan other folders than /root, open
/usr/local/play-mp3/play-mp3
in a texteditor, and alter the line
FOLDER=/root
to your needs.
It is not that fast on huge harddisks, but my pup001 is scanned in some seconds without mounted drives.
Please tell me, how it works for you.
Mark
please look, if the filenames use lower case for the .mp3.
I think the script just uses .mp3 , but not .MP3.
I can try to enhance it.
Please help me by doing this:
Naviate in ROX to a folder with some .mp3.
Right-click in ROX -> XTerm here
Now in the opened console enter
pwd
ls -al
Post the output of both comands here (select the text with the mouse, and Middle-click in a forum-message to paste it.
Maybe that gives me a hint.
Mark
I think the script just uses .mp3 , but not .MP3.
I can try to enhance it.
Please help me by doing this:
Naviate in ROX to a folder with some .mp3.
Right-click in ROX -> XTerm here
Now in the opened console enter
pwd
ls -al
Post the output of both comands here (select the text with the mouse, and Middle-click in a forum-message to paste it.
Maybe that gives me a hint.
Mark
MU wrote:
please look if there is a file /tmp/play-mp3.tmp
Yogi:
yes, and it has the files I was looking for. By the way, it is case sensitive. For example, my search for "beatles" revealed nothing. However, "Beatles" found every one. All of my music files are appended as ".mp3" , not "MP3". But I don't know if that really matters.
# pwd
/mnt/hda1/977
ina Grove.mp3
-rwxr-xr-x 1 root root 3552695 Jan 16 12:57 The Doobie Brothers - Li sten To The Music.mp3
-rwxr-xr-x 1 root root 2441762 Jan 16 23:29 The Doobie Brothers - Wh at A Fool Believes.mp3
-rwxr-xr-x 1 root root 2412296 Jan 16 23:15 The Eagles - Desperado.m p3
-rwxr-xr-x 1 root root 3256155 Jan 16 21:40 The Eagles - Life In The Fast Lane.mp3
-rwxr-xr-x 1 root root 3504316 Jan 16 15:46 The Eagles - New Kid In Town.mp3
-rwxr-xr-x 1 root root 3451966 Jan 16 17:01 The Eagles - One Of Thes e Nights.mp3
-rwxr-xr-x 1 root root 2458891 Jan 17 00:39 The Eagles - Take It Eas y.mp3
-rwxr-xr-x 1 root root 3270572 Jan 16 13:49 The Eagles - The Long Ru n.mp3
-rwxr-xr-x 1 root root 3267332 Jan 16 19:48 The Guess Who - Attilla' s Blues.mp3
-rwxr-xr-x 1 root root 1827988 Jan 16 23:36 The Guess Who - Laughing .mp3
-rwxr-xr-x 1 root root 1440433 Jan 16 21:06 The Guess Who - No Sugar Tonight.mp3
-rwxr-xr-x 1 root root 2516605 Jan 17 01:23 The Guess Who - No Time. mp3
-rwxr-xr-x 1 root root 3120943 Jan 16 12:49 The Hollies - Long Cool Woman (In A Black Dress).mp3
-rwxr-xr-x 1 root root 2689295 Jan 16 19:44 The James Gang - Funk #4 9.mp3
-rwxr-xr-x 1 root root 2774872 Jan 16 17:49 The Kinks - Lola.mp3
-rwxr-xr-x 1 root root 1814716 Jan 16 20:41 The Kinks - Tired Of Wai ting For You.mp3
-rwxr-xr-x 1 root root 2816672 Jan 16 22:22 The Knack - My Sharona.m p3
please look if there is a file /tmp/play-mp3.tmp
Yogi:
yes, and it has the files I was looking for. By the way, it is case sensitive. For example, my search for "beatles" revealed nothing. However, "Beatles" found every one. All of my music files are appended as ".mp3" , not "MP3". But I don't know if that really matters.
# pwd
/mnt/hda1/977
ina Grove.mp3
-rwxr-xr-x 1 root root 3552695 Jan 16 12:57 The Doobie Brothers - Li sten To The Music.mp3
-rwxr-xr-x 1 root root 2441762 Jan 16 23:29 The Doobie Brothers - Wh at A Fool Believes.mp3
-rwxr-xr-x 1 root root 2412296 Jan 16 23:15 The Eagles - Desperado.m p3
-rwxr-xr-x 1 root root 3256155 Jan 16 21:40 The Eagles - Life In The Fast Lane.mp3
-rwxr-xr-x 1 root root 3504316 Jan 16 15:46 The Eagles - New Kid In Town.mp3
-rwxr-xr-x 1 root root 3451966 Jan 16 17:01 The Eagles - One Of Thes e Nights.mp3
-rwxr-xr-x 1 root root 2458891 Jan 17 00:39 The Eagles - Take It Eas y.mp3
-rwxr-xr-x 1 root root 3270572 Jan 16 13:49 The Eagles - The Long Ru n.mp3
-rwxr-xr-x 1 root root 3267332 Jan 16 19:48 The Guess Who - Attilla' s Blues.mp3
-rwxr-xr-x 1 root root 1827988 Jan 16 23:36 The Guess Who - Laughing .mp3
-rwxr-xr-x 1 root root 1440433 Jan 16 21:06 The Guess Who - No Sugar Tonight.mp3
-rwxr-xr-x 1 root root 2516605 Jan 17 01:23 The Guess Who - No Time. mp3
-rwxr-xr-x 1 root root 3120943 Jan 16 12:49 The Hollies - Long Cool Woman (In A Black Dress).mp3
-rwxr-xr-x 1 root root 2689295 Jan 16 19:44 The James Gang - Funk #4 9.mp3
-rwxr-xr-x 1 root root 2774872 Jan 16 17:49 The Kinks - Lola.mp3
-rwxr-xr-x 1 root root 1814716 Jan 16 20:41 The Kinks - Tired Of Wai ting For You.mp3
-rwxr-xr-x 1 root root 2816672 Jan 16 22:22 The Knack - My Sharona.m p3
Pointing ROX to one of the music folders and "Xterm here" with your new commands yields the following:
# playlist='cat/tmp/play-mp3.tmp'
# nohup xmms "$playlist"
nohup: appending output to `nohup.out'
Also, XMMS player opens on the desktop along with X Play Files two-panel navigator. XMMS is empty (no song files showing in the playlist editor).
# playlist='cat/tmp/play-mp3.tmp'
# nohup xmms "$playlist"
nohup: appending output to `nohup.out'
Also, XMMS player opens on the desktop along with X Play Files two-panel navigator. XMMS is empty (no song files showing in the playlist editor).
Here is a tip, how you can search folders spread over different harddisks, without scanning them completely.
Create a folder /root/quickmp3
Now create symlinks to your harddisks.
ln -s "/mnt/hda1/977" "/root/quickmp3/977"
ln -s "/mnt/hda5/whatever" "/root/quickmp3/whatever"
Now in play-mp3, use /root/quickmp3 as the searchfolder.
This should massively increase the searchspeed, because now it ignores for example /mnt/hda1/windows
Mark
Create a folder /root/quickmp3
Now create symlinks to your harddisks.
ln -s "/mnt/hda1/977" "/root/quickmp3/977"
ln -s "/mnt/hda5/whatever" "/root/quickmp3/whatever"
Now in play-mp3, use /root/quickmp3 as the searchfolder.
This should massively increase the searchspeed, because now it ignores for example /mnt/hda1/windows
Mark
Mark,
Way to go! I re-downloaded both of the dotpups and they work perfectly! I edited /usr/local/play-mp3/play-mp3 to have it search my entire hard drive (120 GB) and it found exactly what I wanted. And the best news is it performed this function in less than five seconds!! Fantastic. XMMS pops up and has all those songs in the playlist and starts playing. This search utility is light years ahead of anything else I've tried, and that includes Windows. Thank you so very much for your efforts.
p.s. I don't know if this utility could be used to find other types of files. If it can that would be great be it is very, very fast!
Thanks again!
Way to go! I re-downloaded both of the dotpups and they work perfectly! I edited /usr/local/play-mp3/play-mp3 to have it search my entire hard drive (120 GB) and it found exactly what I wanted. And the best news is it performed this function in less than five seconds!! Fantastic. XMMS pops up and has all those songs in the playlist and starts playing. This search utility is light years ahead of anything else I've tried, and that includes Windows. Thank you so very much for your efforts.
p.s. I don't know if this utility could be used to find other types of files. If it can that would be great be it is very, very fast!
Thanks again!
I could write a small Gtk-Interface.
Then you could "set up" other filetypes and programs to execute.
But don't know if I can do it today.
Meanwhile you might look at the code, it is quite short, and you simply might replace .mp3 and xmms in it.
turma is slower, because it searches text in textfiles, while my small script just searches in the filenames (not in the files itself).
Mark
Then you could "set up" other filetypes and programs to execute.
But don't know if I can do it today.
Meanwhile you might look at the code, it is quite short, and you simply might replace .mp3 and xmms in it.
turma is slower, because it searches text in textfiles, while my small script just searches in the filenames (not in the files itself).
Mark
-
- Posts: 198
- Joined: Sat 28 Jan 2006, 15:55
for searching i really like the good old unix tools locate (slocate) and updtedb
it's so cool because you can pipe the whole output to what ever you want
it's incredible fast and normaly included in every linux distribution...
i took mine from ubuntu in puppy, because they are missed in puppy...
regards
costal
it's so cool because you can pipe the whole output to what ever you want
it's incredible fast and normaly included in every linux distribution...
i took mine from ubuntu in puppy, because they are missed in puppy...
regards
costal
-
- Posts: 198
- Joined: Sat 28 Jan 2006, 15:55
you could create a script "flocate":
Then it acts like slocate:
flocate *.mp3
But if it searches mounted drives, it may last long.
Instead of "/" I would use a subfolder like /root or /usr
Schnell
Code: Select all
#!/bin/bash
find / -type f -name "$1"
flocate *.mp3
But if it searches mounted drives, it may last long.
Instead of "/" I would use a subfolder like /root or /usr
Schnell
-
- Posts: 198
- Joined: Sat 28 Jan 2006, 15:55