Video library reorganisation via XML #903

Merged
merged 10 commits into from May 1, 2012

Conversation

Projects
None yet
3 participants
@jmarshallnz
Member

jmarshallnz commented Apr 29, 2012

This is v2 of the original #335. This allows the addition of (or removal of) nodes in the video library. By default nothing should change (even library flattening is implemented).

There's a couple of gotchas:

  1. Smartplaylists don't support proper sorting of sets - this is an existing problem in mainline, which is why 8cb48681 is in place. This could be dropped later when the sorting is fixed (problem is that the set items don't have the appropriate metadata associated, so sort on top). It may be that we need to readdress (yet again) the grouping of sets in certain nodes. It may be that this is something that @Montellese GSoC may look into?
  2. The sorting of nodes is done via the order attribute inside the XMLs. I'm not sure if this is the most intuitive way to do it or not. An alternative is to sort by filesystem order (i.e. just name them as 01genres.xml etc.)
  3. The flattening is a bit of a hack (2 directory structures in place) but I figured it was better to get this in while we can so we can see what other things folk will want rather than waiting until a more friendly way to setup the structure was in place. Again, perhaps @Montellese GSoC may address this by making it available via JSON-RPC then the web-interface.

Would like this in May :)

@sholafsson

This comment has been minimized.

Show comment Hide comment
@sholafsson

sholafsson Apr 29, 2012

I had a little play, this is simply a thing of beauty.
Is it possible that type filter and folder have different sorting options available?

I had a little play, this is simply a thing of beauty.
Is it possible that type filter and folder have different sorting options available?

@Montellese

This comment has been minimized.

Show comment Hide comment
@Montellese

Montellese Apr 29, 2012

Member

I really like this, excellent work. If we could get smartplaylists to behave (almost) the same as our CVideoDatabase::GetFooNav() methods we could actually get rid of most of the < path > tags and define those as filters as well.

  1. This brings us back to the discussion in #824 about a grouping step before doing the sorting. I think the custom sorting implementation for SmartPlaylists is one of the problems because it doesn't support things like "ignore article" etc. But without it the whole limiting functionality is kind of useless as we would still need to get all the matching items from the database, then do manual sorting and then apply the limiting which slows things done if we e.g. only want to retrieve 10 out of 2000 songs.
  2. Yup this is not very intuitive IMO as you have to open every XML to get an idea of what comes after what in the list. Sorting alphanumerically by filename in combination with XX_foo.xml or XXfoo.xml (where XX is a number) probably gives to fastest and simplest overview when looking at the XMLs. But I have to admit that the "order" attribute looks cleaner.
  3. I probably should have made that comment (jmarshallnz/xbmc@59b2222#commitcomment-1271352) here instead. Not sure what you mean concerning JSON-RPC and the webinterface?
Member

Montellese commented Apr 29, 2012

I really like this, excellent work. If we could get smartplaylists to behave (almost) the same as our CVideoDatabase::GetFooNav() methods we could actually get rid of most of the < path > tags and define those as filters as well.

  1. This brings us back to the discussion in #824 about a grouping step before doing the sorting. I think the custom sorting implementation for SmartPlaylists is one of the problems because it doesn't support things like "ignore article" etc. But without it the whole limiting functionality is kind of useless as we would still need to get all the matching items from the database, then do manual sorting and then apply the limiting which slows things done if we e.g. only want to retrieve 10 out of 2000 songs.
  2. Yup this is not very intuitive IMO as you have to open every XML to get an idea of what comes after what in the list. Sorting alphanumerically by filename in combination with XX_foo.xml or XXfoo.xml (where XX is a number) probably gives to fastest and simplest overview when looking at the XMLs. But I have to admit that the "order" attribute looks cleaner.
  3. I probably should have made that comment (jmarshallnz/xbmc@59b2222#commitcomment-1271352) here instead. Not sure what you mean concerning JSON-RPC and the webinterface?
@jmarshallnz

This comment has been minimized.

Show comment Hide comment
@jmarshallnz

jmarshallnz Apr 29, 2012

Member

Regarding JSON-RPC/web-interface, a UI to allow the user to more easily modify things is probably beyond XBMC's UI - in particular you'd really want drag n drop support and/or a rat + keyboard. A web interface might be able to do it quite nicely though, assuming things like lists with drag n drop are supportable (one presumes there's a bunch of js that could be used). It would be difficult I think to support both a mouse/touch based interface for it in XBMC while still allowing a remote control style interface as well, though perhaps that's something we'll need in future anyway...

Member

jmarshallnz commented Apr 29, 2012

Regarding JSON-RPC/web-interface, a UI to allow the user to more easily modify things is probably beyond XBMC's UI - in particular you'd really want drag n drop support and/or a rat + keyboard. A web interface might be able to do it quite nicely though, assuming things like lists with drag n drop are supportable (one presumes there's a bunch of js that could be used). It would be difficult I think to support both a mouse/touch based interface for it in XBMC while still allowing a remote control style interface as well, though perhaps that's something we'll need in future anyway...

@jmarshallnz

This comment has been minimized.

Show comment Hide comment
@jmarshallnz

jmarshallnz Apr 30, 2012

Member

Thanks for the review @Montellese and @Memphiz. Fixups applied + rebased.

I still want to check number 4 above before this goes in, and need to see whether number 2 needs doing a different way (hard to know really - we need to read the XMLs to list anyway, so sort order on the filesystem isn't necessarily that important. However, given that the user will be expected initially to manipulate the filesystem to do their thing, maybe it should be the other way around?)

Member

jmarshallnz commented Apr 30, 2012

Thanks for the review @Montellese and @Memphiz. Fixups applied + rebased.

I still want to check number 4 above before this goes in, and need to see whether number 2 needs doing a different way (hard to know really - we need to read the XMLs to list anyway, so sort order on the filesystem isn't necessarily that important. However, given that the user will be expected initially to manipulate the filesystem to do their thing, maybe it should be the other way around?)

@ghost ghost assigned jmarshallnz May 1, 2012

@jmarshallnz

This comment has been minimized.

Show comment Hide comment
@jmarshallnz

jmarshallnz May 1, 2012

Member

Ok, rebased again and eliminated the issue where a filter and virtual folder were named the same without the .xml extension - just distinguish between library://video/path/folder/ and library://video/path/folder.xml/ now.

The last question is whether I need to bother with rehashing the order thing. IMO what we have is fine.

Member

jmarshallnz commented May 1, 2012

Ok, rebased again and eliminated the issue where a filter and virtual folder were named the same without the .xml extension - just distinguish between library://video/path/folder/ and library://video/path/folder.xml/ now.

The last question is whether I need to bother with rehashing the order thing. IMO what we have is fine.

@Montellese

This comment has been minimized.

Show comment Hide comment
@Montellese

Montellese May 1, 2012

Member

I won't stand in the way concerning how ordering is done. For a quick overview doing it based on the filename is better but having to rename all your files everytime you want to add something in between isn't a nice prospect either.

Member

Montellese commented May 1, 2012

I won't stand in the way concerning how ordering is done. For a quick overview doing it based on the filename is better but having to rename all your files everytime you want to add something in between isn't a nice prospect either.

jmarshallnz added a commit that referenced this pull request May 1, 2012

Merge pull request #903 from jmarshallnz/library_reorg_v2
Video library reorganisation via XML

@jmarshallnz jmarshallnz merged commit 691095a into xbmc:master May 1, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment