PDA

View Full Version : Search files and folders for keywords



slutz
2007-04-16, 00:53
Hi,

I would like to search filenames and foldernames for keywords.
Does anybody know how I could do that or does even a plugin exist?

Thanks a lot!
-lutz

mherger
2007-04-16, 01:10
> I would like to search filenames and foldernames for keywords.

Hit F3 in Windows Explorer?

> Does anybody know how I could do that or does even a plugin exist?

SlimServer relies on correctly tagged files. Interpreting filenames are
only a workaround if tags don't exist. You therefore IMHO can't search for
filenames or folders. But you can browse them ("Browse Music Folder").

--

Michael

-----------------------------------------------------------------
http://www.herger.net/SlimCD - your SlimServer on a CD
http://www.herger.net/slim - AlbumReview, Biography, MusicInfoSCR

slutz
2007-04-16, 07:04
>> Does anybody know how I could do that or does even a plugin exist?[/color]

> SlimServer relies on correctly tagged files. Interpreting filenames are
> only a workaround if tags don't exist. You therefore IMHO can't search for
> filenames or folders. But you can browse them ("Browse Music Folder").

The problem is that I got a really large mp3 library and this library is completely unsorted. There are lots of songs without tags, they are in folders named like "1", "2", "unnamed1", "unnamed2" etc. The filenames are not built on a schema. But each filename has an element that allows me to guess what could be in there.
It is impossible for me sort and tag these by hand.
That's why I'm looking for a solution to extend the search with "search by an element of the filename or foldername". Something like the lyrics field but searching the path and the filename.
Does anybody know of a plugin that might be a good starting point? At the moment I have no clue about plugin programming. But that would make it easier for me.

mherger
2007-04-16, 07:13
> It is impossible for me sort and tag these by hand.

There are a lot of programs out there which will help you guess the same
way you do now, and which then will store the result in the file as tags.
Do yourself a favour and tag your files.

> That's why I'm looking for a solution to extend the search with "search
> by an element of the filename or foldername". Something like the lyrics
> field but searching the path and the filename.

If you want a cheap solution, just tag your files with whatever nonsense
is in the filename. You can then use SlimServer to search the tags - which
correspond to the file name.

> Does anybody know of a plugin that might be a good starting point?

Not plugins, but very helpful: mp3tag, tag&rename & others ;-)

--

Michael

-----------------------------------------------------------------
http://www.herger.net/SlimCD - your SlimServer on a CD
http://www.herger.net/slim - AlbumReview, Biography, MusicInfoSCR

Ben Sandee
2007-04-16, 07:13
On 4/16/07, slutz <slutz.2p4yub1176732301 (AT) no-mx (DOT) forums.slimdevices.com>
wrote:
>
>
> >> Does anybody know how I could do that or does even a plugin
> exist?
>
> > SlimServer relies on correctly tagged files. Interpreting filenames
> are
> > only a workaround if tags don't exist. You therefore IMHO can't
> search for
> > filenames or folders. But you can browse them ("Browse Music
> Folder").
>
> The problem is that I got a really large mp3 library and this library
> is completely unsorted. There are lots of songs without tags, they are
> in folders named like "1", "2", "unnamed1", "unnamed2" etc. The
> filenames are not built on a schema. But each filename has an element
> that allows me to guess what could be in there.
> It is impossible for me sort and tag these by hand.[/color]


If your tags are meaningless, you could just retag all your files with the
track name=the filename using a mass tagger. Then SlimServer's standard
searching would work just like you want it to.

Ben

Siduhe
2007-04-16, 07:25
Something like Tag & Rename might be a good bet for you, assuming a Windows setup.

It will definitely search by tag and also across the file name I think. The latest version will also filter your library using MSDOS wild cards (so "*some text*"). It will also help you retag your files. Free to try for 30 days or so (no connection, but I paid to keep it).

It will also rename all your files based on file name structure as Ben suggests.

erland
2007-04-16, 09:30
It is impossible for me sort and tag these by hand.
That's why I'm looking for a solution to extend the search with "search by an element of the filename or foldername". Something like the lyrics field but searching the path and the filename.
Does anybody know of a plugin that might be a good starting point? At the moment I have no clue about plugin programming. But that would make it easier for me.
First of all, I really agree with the others, your experience with SlimServer will be a lot better if you take the time to tag your files. You could at least tag the files so the filename is placed in the COMMENT tag, this way the already existing advanced searching in slimserver can be used to search for files with a matching value in the COMMENT tag.

The problem with a plugin is how you like to show the result, if the files aren't tagged you would probably have to show single files and have no way of showing matched albums/artists. The result in a large library would be that you get a lot of hits independent of what you give as search parameters.

Anyway, it could definitely be done with a plugin. To start, find a simple plugin that does something similar and then start to modify it. The plugin you look at doesn't have to do searching, if it just have some simple web interface it would probably be good enough to start with.

If you want to use it from the web interface, you would need:
- A single web interface page with a single search field
- The web interface page would be connected to a function that did a like search towards the url column in the tracks table.
- The result is shown as a list of tracks, you probably also want to show a play and add icon besides each track.

If you want to be able to search using the remote I think it might be a bit more complicated, mostly because you need to implement the button handling. But most of this button handling should already be available in the SlimServer code for the current search mechanism or in the LazySearch plugin.

slutz
2007-04-16, 11:23
First of all, I really agree with the others, your experience with SlimServer will be a lot better if you take the time to tag your files. You could at least tag the files so the filename is placed in the COMMENT tag, this way the already existing advanced searching in slimserver can be used to search for files with a matching value in the COMMENT tag.

The problem with a plugin is how you like to show the result, if the files aren't tagged you would probably have to show single files and have no way of showing matched albums/artists. The result in a large library would be that you get a lot of hits independent of what you give as search parameters.

Anyway, it could definitely be done with a plugin. To start, find a simple plugin that does something similar and then start to modify it. The plugin you look at doesn't have to do searching, if it just have some simple web interface it would probably be good enough to start with.

If you want to use it from the web interface, you would need:
- A single web interface page with a single search field
- The web interface page would be connected to a function that did a like search towards the url column in the tracks table.
- The result is shown as a list of tracks, you probably also want to show a play and add icon besides each track.

If you want to be able to search using the remote I think it might be a bit more complicated, mostly because you need to implement the button handling. But most of this button handling should already be available in the SlimServer code for the current search mechanism or in the LazySearch plugin.

I did it the easy way and modified two files (advanced_search.html & Search.pm). Now I have an added input field for parts of the URL. And when a new version comes out and if I do not have them sorted then the patch is applied very easily.
It is a quick and dirty hack, I know. But for the moment it helps.

Thanks to all!
-lutz