INTERACT FORUM

Please login or register.

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

Author Topic: Q: Multi-level grouping based on file path? [ALMOST SOLVED]  (Read 3283 times)

masterjoe

  • World Citizen
  • ***
  • Posts: 235
Q: Multi-level grouping based on file path? [ALMOST SOLVED]
« on: April 16, 2015, 10:33:18 am »

Currently I am experimenting with custom views and found out that an expression allows custom grouping of media files.
However the grouping always results in a "flat" group list. When using file paths however this is not what I intend to have.

I want to achieve the following:
Take all media files and group them hierachically by their file path but REMOVE the drive letter info!
This allows combining media files from different drives into the same folder structure (sorta merge).


So when I have the following source media file paths:

C:\SciFi\StarTrek\StarTrekTheMovie.avi
C:\Other\Fun.avi
D:\SciFi\StarTrek\Nemesis.avi
D:\Horror\Saw\Saw1.avi
E:\Other\Movie.avi
E:\SciFi\StarTrek\FirstContact.avi


Then the resulting structure for a custom view "CustomView" shall be (=removing drive letters + expanding file paths):

CustomView
|
|---Horror
|       |---Saw
|              |---Saw1.avi
|
|---Other
|       |---Fun.avi
|       |---Movie.avi
|
|---SciFi
        |
        |---StarTrek
               |---FirstContact.avi
               |---Nemesis.avi
               |---StarTrekTheMovie.avi



How can that be achieved (using expressions etc)?  ?
Logged

masterjoe

  • World Citizen
  • ***
  • Posts: 235
Re: Multi-level grouping based on file path?
« Reply #1 on: April 16, 2015, 11:12:46 am »

Well after some trying... found a solution which is almost ok... but not 100%

I did the following:
- added 9 levels of path splitting in "customize view" (see path_levels.jpg)
- each level uses a ListItem() function to extract the folder at the given level for grouping (see lv4.jpg for level 4)

This way I can now browse hierarchically through my (merged) media library using the structure from the hard drives.
HOWEVER (why is there always a "however"??) this leads to EMPTY folder levels (see empty_levels.jpg).

How can empty groups be filtered for my custom view?
If I could filter them away (don't want ANY "Unassigned" group item at any level)
then everything would be almost perfect.

What's not so nice about this solution is how it has to be set up. My current view only allows up to 9 folder levels. If there were 10... well then I would have to add yet another level and so on.

So how can these empty groups be hidden?
Logged

masterjoe

  • World Citizen
  • ***
  • Posts: 235
Re: Multi-level grouping based on file path?
« Reply #2 on: April 16, 2015, 11:41:30 am »

Well the "solution"" suggested in my second post is none. Or maybe I found yet another bug.

Because I intended to use the view for serving files via DLNA I found out that
the same configuration (Lv1..Lv9) when being used over a DLNA server delivers
NOT the same than the view I have been doing for the desktop player.

The resulting folder / file structure is... rubbish!

Please try the same by adding a view with the function:

    Tools->Options->Add or configure DLNA servers->Customize Views->Add->Library Item From Standard View->CustomView
   
where "CustomView" is the view I have described in my second post.


The result is somewhat chaotic and absolutely NOT the same as the CustomView for the MC desktop window.

What the heck??  ? :o
Logged

masterjoe

  • World Citizen
  • ***
  • Posts: 235
Re: Multi-level grouping based on file path?
« Reply #3 on: April 16, 2015, 06:53:59 pm »

Bump!
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10935
Re: Q: Multi-level grouping based on file path?
« Reply #4 on: April 16, 2015, 08:01:51 pm »

Views always have a fixed depth, depending on how you define the view, although some parts of MC can skip views with only one element in them (ie. in Theater View or through DLNA).
If you want a variable-depth folder based view, use the "File Path"/Location view category.

PS:
Please consider giving people a tiny bit more time to answer your questions (say a day or two). Bumping after just a couple hours can be considered spam by some.
Logged
~ nevcairiel
~ Author of LAV Filters

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

fitbrit

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4887
Re: Q: Multi-level grouping based on file path?
« Reply #6 on: April 17, 2015, 08:27:47 am »

I think in time you will see that you are going about this all wrong. If you stick with MC, you may even be a little embarrassed when you read these posts a few months from now. What you want to achieve is easily doable with proper tagging of your media.

If you simply make sure your movies are tagged with the correct genre, and those that are part of a series like Star Trek are tagged in the [series] field, you will be 90% of the way there. Then you just create a view sorting by genre - SciFi, Horror, Other etc.
There are posts elsewhere on the best way to look at series of movies and how to incorporate those into your views. Just know that folder structure is the least flexible way for MC to view your media, resulting in silly requests like wanting MC to drop the drive letter etc. You can achieve that by tagging in the genre field by using "Fill properties from filename", and asking it to look at the folder name. Then MC can show you all the genres in a view, and clicking on any will take you to the movies in that genre, all listed together- irrespective of which disk they are physically on.
Logged

masterjoe

  • World Citizen
  • ***
  • Posts: 235
Re: Q: Multi-level grouping based on file path?
« Reply #7 on: April 17, 2015, 08:48:47 am »

I understand what you mean. Tagging is for sure a great way to manage a library.
However I have many sub and sub sub categories which are sometimes but not always there.

My disk structure is rather deeply nested and always the same for each drive.
I want MC to be able to not only reflect it but also allow merging of structures coming from multiple disks.

Perhaps rethinking the structure itself might be worth a look.
Maybe I rethink my strategy some day :)
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72439
  • Where did I put my teeth?
Re: Q: Multi-level grouping based on file path?
« Reply #8 on: April 17, 2015, 08:57:05 am »

You can use the disk structure to create the tags.
Logged

masterjoe

  • World Citizen
  • ***
  • Posts: 235
Re: Q: Multi-level grouping based on file path?
« Reply #9 on: April 17, 2015, 09:03:59 am »

So would I use a separate tag for each existing structural level? Or how do you mean that?
This woule take quite some new tag fields. And what happens if there are empty tags?
I will get those "Unassigned" ones right? Nested into each other?

My first approach is stated in the second post of this topic.
It almost worked the way I wanted it. But just on the desktop.
Via DLNA everything was cluttered like hell. I still think that there is a bug here!
Logged

fitbrit

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4887
Re: Q: Multi-level grouping based on file path?
« Reply #10 on: April 17, 2015, 09:04:17 am »

If you do decide yo restructure, MC can help you do it in an automated way based on your tags. Nice to see that you are open to learning. There are some very talented and helpful people on these forums. I think they can get you where you want to be, but in a slightly different way than you imagined.

Personally, if budget allowed, I would ditch the "smart" DLNA features of the LG TV, for a Windows stick or a sub $150 windows set-top PC. Then there'd be no need to transcode, and you could unleash the power of MC. And, based on your enthusiasm here, and your background as a SW developer, I think you'd learn quickly.

For now though, your question in this post is valid, and can be solved, I think.
Logged

masterjoe

  • World Citizen
  • ***
  • Posts: 235
Re: Q: Multi-level grouping based on file path?
« Reply #11 on: April 17, 2015, 09:13:41 am »

DLNA is important for me where I DON'T have a HTPC. This is my mobile phone, my tablet PC and the TV set in my sleeping room (which is the LG).
In the living room I have an Intel NUC which does what you suggest and there no problems are expected. But for music and the other devices mentioned above I use DLNA which comes handy. Also in the sleeping room it is desired not to have that much electric equipment.

Still I hope you'll have a look at the bug that seems to be around the corner regarding my special view in the second post. This view going over DLNA seems to work not quite as the one on the desktop!
Logged

fitbrit

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4887
Re: Q: Multi-level grouping based on file path?
« Reply #12 on: April 17, 2015, 09:15:11 am »

You must have these nested folders for a reason, right? Each level corresponds to some attribute of the video. As an example:
Video - TV show - comedy - the office - season 1

Corresponds to the tags:

Mediatype - media subtype - genre - series - season

You can create your own custom ones too as you know. However, the "unassigned" problem comes up as you saw. I believe his can be bypassed, by using expressions in the view.  They will ignore a field if it is blank. The best example of this can be found in the threads that deal with movie box sets or series. Eg People want Star Wars movies to be sorted under S, next to other single movies beginning with S. When you click on Star Wars, it leads you to the 6 current movies. That's better for most than having Episode VI sorted under R. All non series movies are not relegated to unassigned under this view. This is all assuming you are using Theater View.

You will get help setting this sort of thing up by asking here.

Logged

masterjoe

  • World Citizen
  • ***
  • Posts: 235
Re: Q: Multi-level grouping based on file path?
« Reply #13 on: April 17, 2015, 03:47:57 pm »

Well... it IS possible to do this what I wanted in the inital post. And marko is my hero :)

http://yabb.jriver.com/interact/index.php?topic=96994.msg669569#msg669569

MC more and more impresses me what's possible right out of the box ;)

However some things are not that intuitive. I would never have come up with that expression!
Is there some guide anywhere for the most advanced features of the expression thingy?
Logged

masterjoe

  • World Citizen
  • ***
  • Posts: 235
Re: Q: Multi-level grouping based on file path?
« Reply #14 on: April 18, 2015, 06:16:41 am »

Well you don't have a large DLNA(!) library, don't you?

I do not say you should handle (most of) your data via DLNA! There might be users that do not use this additional feature when it's there. But other users would be thankful to have something like it.

Do YOU use all the features of MC? We could have debates over other things which might or might not be useful for one or the other user! But that's not helpful. Thinking in the overall context is helpful.

Also Plex is free if you don't need the premium features. Plex' DLNA section is not premium and can be used by anyone! You have to pay nothing and still have a great deal of features.

I don't support Plex - I only have no better choice currently when it comes to seeking in transcoded video streams! If MC could do it then Plex would be obsolete for me! that would be great. I am looking for solutions for the seek problem and loading a Plex library would be one. If MC gets its new transcoder I hope things look different and then a middleware is not required anymore!

There are many other DLNA servers out there, too. It's about flexibility and to be able to load the library of everything that could make any sense. And maybe someone wants the meta data to be EXACTLY the one of a different DLNA server because it is already hand tuned and managed there. You can't assume everyone has been using MC from day one.

So to further expand MC's capabilities I think its reasonable to support loading a CDS:Browse only DLNA library.
Logged

masterjoe

  • World Citizen
  • ***
  • Posts: 235
Re: Q: Multi-level grouping based on file path? [ALMOST SOLVED]
« Reply #15 on: April 18, 2015, 12:52:42 pm »

Damn... The solution which made it possible to solve the merging and browsing for my multi drive library has a side effect:

Files which are in folders that contain further (nested) folders are not displayed in the view!?

They can be found doing a search. However over DLNA this is not possible so they cannot be located.

Can these files be made visible?
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Q: Multi-level grouping based on file path? [ALMOST SOLVED]
« Reply #16 on: April 18, 2015, 01:09:52 pm »

Files which are in folders that contain further (nested) folders are not displayed in the view!?

That might be, though I'm not sure, dependent on your browsing device or software. It may not even try to display a file listing (regardless of whether the DLNA Server "has one") because it always expects you to browse to the "end" of a category tree.

Because they're not expected to be filesystem folders, but metadata structures like: [Genre]\[Artist]\[Album]

So, by this logic, it works the way MC's Views work, and when you expand [Genre] in a view like that described above, it "contains" the results of all files in the selected Genre.  There are no files in a particular [Genre], there are just those tagged with a Genre, that might (and probably do) have other fields populated, or maybe even multiple Genres.

So, if your device doesn't provide a "Show All" kind of functionality (like Theater View does) and you really, really want to have a view that browses filesystem structures, you might be stuck.  As was suggested above, though, this is really not using the tool as designed.  You would be better off populating the Fields in MC.  It is less fragile, and much, much more flexible than organizing things via a filesystem structure.  That's why metadata is cool.  ;)

But, I'm guessing. I don't use a bunch of DLNA devices, even though I have stuff built into my TV, because every one I've ever tried was crappy or flaky.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

masterjoe

  • World Citizen
  • ***
  • Posts: 235
Re: Q: Multi-level grouping based on file path? [ALMOST SOLVED]
« Reply #17 on: April 18, 2015, 01:40:24 pm »

Well, I totaly agree that correct metadata is the best possible solution because it allows multiple views on the same set of data.
Folders are only one single view on the data an they are therefore very unflexible. But they are currently what I have!

I could now create "Unsorted" (or "Unsassigned"  ;D) folders for these files so that they become visible.
But it would be sorta nonsense because I should rather prefer doing some tagging ;)

Well... it seems that I need to reorganize my library ;) *sigh*
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Q: Multi-level grouping based on file path? [ALMOST SOLVED]
« Reply #18 on: April 18, 2015, 01:58:04 pm »

There isn't a "proper" Wiki article about this, but read the thread linked from here:
http://wiki.jriver.com/index.php/Fill_Properties_from_Filename
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/
Pages: [1]   Go Up