INTERACT FORUM

Please login or register.

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

Author Topic: Custom Views and Modify Results Ordering  (Read 896 times)

somedave

  • Member
  • *
  • Posts: 3
Custom Views and Modify Results Ordering
« on: April 26, 2013, 06:36:11 pm »

Hi,

I'm having a problem with custom views (I.e. for Gizmo and other devices like JRemote, which rocks BTW). The issue is the order of application of the view logic, the filters, and the final "Modify Results" rules. What I am trying to accomplish is to have custom views that only return a certain amount of music (say 2 hours). For example, consider a view that lets me select genre then artist and applies a filter for songs with a rating 4 and above. What I want is to be able to see all of the genres (that contain songs with a >4 rating), then after picking one see all of the artists in that genre (that contain songs with a >4 rating), then by playing the results for an artist get two hours of >4 rating songs from that artist.

I can get this to work just fine without the 2 hour time limit (I.e., nothing set in "modify results"). I just add the genre and then artist to the view and a filter for songs with >4. The problem is that the "modify results" rules actually appear to apply "pre-selection" rather than "post-selection" - in other words, it's modifying the library rather than the results. What I end up seeing in my view is a small subset of genres available for selection and then an even smaller subset of artists with only a couple (or one) song(s) each. The view has applied the 2 hour limit BEFORE it generates the view instead of AFTER I've made my selections.

I hope this was clear. Is there a way to fix this (perhaps by using the expression language)? Maybe there's a setting I missed?

Thanks!
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Custom Views and Modify Results Ordering
« Reply #1 on: April 26, 2013, 07:02:52 pm »

Test this out in a panes view.  Add your Album and Artist columns.  Then add a search list column, where you set the modifiers:

   ~sort=Random ~t=2h

(using the GUI, Shuffle and Limit time to 2 hours)

Then, pick an artist and/or album, and then select the limit.  You can see how the Search list affects the files already selected.  You can modify the view now to take into consideration your other criteria.
Logged
The opinions I express represent my own folly.

somedave

  • Member
  • *
  • Posts: 3
Re: Custom Views and Modify Results Ordering
« Reply #2 on: April 26, 2013, 07:31:55 pm »

I can see where that would quite well for use in a pane view - because each of the categories are independent, you can select the search list item that limits the time while also selecting (or not) any of the other criteria. Unfortunately, this won't quite work for me because I'm having the problem in a web/Gizmo view, which requires categories be nested and also allows returning results at any level. For my actual scenario, see the attachment. I'd like to be able to see 2 hours of unrated music within an entire genre, for a particular artist, or even for the entire library. I also realize this may not be possible - figured I'd run it by the folks here before admitting defeat though.

Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Custom Views and Modify Results Ordering
« Reply #3 on: April 26, 2013, 07:51:57 pm »

I think I'm confused by your original description(s).

I read that you wanted: Genre > Artist > Rating=4+

But Then you said you wanted: Rating=4+ > Genre list > Artist

In both cases, you're drilling down, traversing a single tree path, so what I posted above would work since the limit/randomization occurs last.

You'd have to create some other container category to flexibly allow broader selections.

Gizmo is more limited, since unlike panes or categories, you can't select multiple items for file usage.

As you've discovered, File rules dictate which files are returned from the database query - category and pane selection simply narrow these results.

So I can't think of a way to do what you want in {Web}Gizmo.
Logged
The opinions I express represent my own folly.
Pages: [1]   Go Up