Page 1 of 1

Strange question about Media Library.

Posted: Mon Mar 20, 2006 4:01 pm
by flatloop
I've got a question, and unfortunately I'm mostly PHP retarded, but I can follow 'explicit' direction.

There is essentially nothing wrong with the media manager, it's way more likely that my configuration is the problem. I'm almost certain it is. I was hoping that someone could suggest a solution to my current inconvenience.

Scenario:
My uploads/ directory is actually an NFS mount from my fileserver. This mount contains not only all my Photos, but other filetypes as well. When I try to use the 'Rebuild Thumbs' option in the admin panel it will throw errors on the files that are 'not valid media'.

My question is this:
Is it possible to exclude certain file types from the scan, or even to exclude certain directories from the media scan? Below is a 'representation' of my file structure.

Code: Select all

./uploads
      |-Photos
      |    |-Summer
      |    |-Spring
      |
      |-ISOs
      |    |-XBOX
      |    |-Data
      |
      |-MP3
      |    |-Book
      |    |-Music
      |
      |-Video
      |    |-TV
Obviously I want to exclude the ISOs from serendipity, and maybe others as well, but for sure ISOs. Any suggestions would be helpful.

Oh, and thanks in advance.

Re: Strange question about Media Library.

Posted: Mon Mar 20, 2006 4:51 pm
by garvinhicking
Hi!

In serendipity versions prior to 1.1, this is a problem as the gathering is a bit tricky.

Basically you'll need to patch up the include/functions_images.inc.php file and inspect the serendipity_traverseDir() path to add exclude filtering.

In serendipity 1.1 we have a global place where exclude patterns can be injected. There you can find the code:

Code: Select all

	## SYNCH START ##
	$aExclude = array("CVS" => true, ".svn" => true);
in that same file. There you could add your directory that shall be exlucded.

There is no place in the GUI to configure that, currently.

And yes, this kind of setup imposes a bit of a problem. However, here's a different approach: Do you really need to link your whole NFS tree into the 'upload' directory? Can't you just map the directories there that you really need?

Regards,
Garvin

Posted: Mon Mar 20, 2006 9:45 pm
by flatloop
:oops: I was so happy to get the NFS export working I didn't want to run the chance of 'breaking' it. I've exported only my Photo's tree and it seems to be working fine, and as I go along I will attempt to export other branches as needed.

Thanks for the info, and I should have thought of that myself.