Strange question about Media Library.

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
flatloop
Regular
Posts: 14
Joined: Thu Mar 16, 2006 3:04 pm
Contact:

Strange question about Media Library.

Post 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.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Strange question about Media Library.

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
flatloop
Regular
Posts: 14
Joined: Thu Mar 16, 2006 3:04 pm
Contact:

Post 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.
Post Reply