INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Pictures (Images)  (Read 1680 times)

ldoodle

  • Galactic Citizen
  • ****
  • Posts: 411
Pictures (Images)
« on: February 16, 2012, 03:01:56 am »

Hiya,

I want my Pictures library to show just the folder name that the pictures are in but I can't seem to do that unless I choose Filename (path) as the option, but then this shows the full UNC path \\<servername>\Pictures\<foldername>, which is then too long to actually see what the folder is, i.e. the actual folder name gets cropped to \\<servername>\Pictures\<fol...>

Is there a setting that can just list the 'albums' by folder name?
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9165
Re: Pictures (Images)
« Reply #1 on: February 16, 2012, 07:32:47 am »

Welcome to the forums...

Not a setting, no... but you have MC now, and with MC, just about anything imaginable is possible...

  • Tools > Options > Library and folders > Manage Library Fields
  • Add a new field. Name it appropriately... Parent Folder perhaps?
  • Select the "Calculated Data" radio button and paste the brown txt below into the expression field
  • =ListItem([Filename (path)],Math(ListCount([Filename (path)],\)-1),\)
  • Keep pressing OK till you are out of options


You should now have a field called [Parent Folder] that you can use like any other field in your MC library.

-marko

tcman41

  • Citizen of the Universe
  • *****
  • Posts: 564
  • Sound Surfing!
Re: Pictures (Images)
« Reply #2 on: February 16, 2012, 07:40:18 am »

I was wondering the same thing, thanks, this should come in handy  :D
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Pictures (Images)
« Reply #3 on: February 16, 2012, 10:49:12 am »

I have a parent folder column in some panes views, and use the expression below. The important part, the RE, is in red.  The rest is just MC.

  Regex([Filename (path)], /#([^\\]+)\\$#/, 1)

(  Start of memory capture.
[^\\]  A character class, matches any one of the listed characters; but a leading ^ negates to mean NOT any of the listed characters (i.e. NOT backslash).
+  1 or more of the previous atom (i.e., one or more non-backslash characters).
)  End of memory capture.
\\  A backslash character (which needs to be escaped, since \ is the escape char in RE.
$  Matches at the end of the line.

Thus, for a [Filename (path)] such as:

  C:\some\happily\nested\parent\

the RE will match the red part.  Only the non-backslash stuff is remembered though, and is output by the 1 parameter in Regex().  It's almost easier to see how it works backwards, since we force anchoring at the end of the string.  From the end of the string, going right-to-left, a backslash is matched, and then a bunch of non-backslash characters, until the RE must stop at the backslash between the d and p.
Logged
The opinions I express represent my own folly.

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9165
Re: Pictures (Images)
« Reply #4 on: February 16, 2012, 07:00:39 pm »

I have a parent folder column in some panes views, and use the expression:

  Regex([Filename (path)], /#([^\\]+)\\$#/, 1)

There are many ways to arrive at your goal. To help those of us that know nothing of the dark art, can you break that regex down and explain why it works?

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Pictures (Images)
« Reply #5 on: February 16, 2012, 07:30:48 pm »

I edited my post above to include the explanation.
Logged
The opinions I express represent my own folly.

Bengi010

  • World Citizen
  • ***
  • Posts: 173
Re: Pictures (Images)
« Reply #6 on: February 16, 2012, 07:59:56 pm »

I'd like to know more about this, and add a hopefully simple question of my own.

First of all, where does the Regex script MrC posted go?  I honestly have no idea what he's talking about.

Second, I don't use MC for images for one simple reason.  Even though I have the image file location in Options set to my pictures folder and nothing else it still loads every piece of cover art and random screen captures and god knows what else, all of which are either in my music or video folders.  So how do I get rid of all that and only show my own pictures?
Logged
Intel Core i-5 6600K, Asus Z170-A ATX Motherboard, Gigabyte GTX 970 4GB, 16 GB Corsair Vengeance Ram, Asus Xonar Essence STX,
                                          Be Quiet Dark Power Pro 10 1000w PSU, Lian-Li PC-B25F ATX Tower,
                                   Dell S2716DG G-Sync Monitor & AOC 2230 Monitor, Corsair Hydro H60 Cooler,
                                                                    Windows 10, JRiver MC 23

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Pictures (Images)
« Reply #7 on: February 16, 2012, 08:07:25 pm »

I'd like to know more about this, and add a hopefully simple question of my own.

First of all, where does the Regex script MrC posted go?  I honestly have no idea what he's talking about.

Expressions are used to create panes or file columns, categories, in searches, for calculated fields, etc.  It might be best to review how the MC expression language works:

  http://wiki.jriver.com/index.php/Media_Center_expression_language

Quote
Second, I don't use MC for images for one simple reason.  Even though I have the image file location in Options set to my pictures folder and nothing else it still loads every piece of cover art and random screen captures and god knows what else, all of which are either in my music or video folders.  So how do I get rid of all that and only show my own pictures?

This is probably due to having your cover art inside this folder tree too.  You can have MC ignore auto-importing certain files, based upon various rules, including Cover art folders, screen captures, etc., presuming you have these in particular folders, or have them named in same way MC can be told to avoid them.  See the auto-import configuration options for Image files.  There are lots of options there...
Logged
The opinions I express represent my own folly.

ldoodle

  • Galactic Citizen
  • ****
  • Posts: 411
Re: Pictures (Images)
« Reply #8 on: February 17, 2012, 04:51:32 am »

Welcome to the forums...

Not a setting, no... but you have MC now, and with MC, just about anything imaginable is possible...

  • Tools > Options > Library and folders > Manage Library Fields
  • Add a new field. Name it appropriately... Parent Folder perhaps?
  • Select the "Calculated Data" radio button and paste the brown txt below into the expression field
  • =ListItem([Filename (path)],Math(ListCount([Filename (path)],\)-1),\)
  • Keep pressing OK till you are out of options


You should now have a field called [Parent Folder] that you can use like any other field in your MC library.

-marko

Just whaaaat!?!?!

That is awesome, thanks!
Logged
Pages: [1]   Go Up