INTERACT FORUM

Windows => Plug-in Development => Topic started by: MrC on September 12, 2013, 08:18:27 pm

Title: MCWS and the Selected files
Post by: MrC on September 12, 2013, 08:18:27 pm
I don't see a way to get the list of files that are currently selected in the UI.  Is this possible?  Filekeys would be sufficient.
Title: Re: MCWS and the Selected files
Post by: Matt on September 16, 2013, 06:06:28 pm
It's not currently possible.

Maybe a files function:
MCWS/v1/Files/Current

It would be like Files/Search (and other file functions), so you could use Action=Serialize to get a list of keys.

What happens if nothing is selected?  All visible or no results?
Title: Re: MCWS and the Selected files
Post by: MrC on September 16, 2013, 06:13:47 pm
That's what I suspected.

A files search function would be fine, as would be the serialized list of keys.

No selection should probably produce no results (since the result set is very large in the default case of no selection).

Thanks.
Title: Re: MCWS and the Selected files
Post by: Matt on September 18, 2013, 06:25:09 pm
Just a note that this is on my list, but it might take a little while.

Talking to the UI from worker threads like the web service requires a little extra planning and caution.
Title: Re: MCWS and the Selected files
Post by: MrC on September 18, 2013, 06:28:44 pm
No problem.  Thanks.

And just to be clear, the reason for this request is just to simplify two steps in something I'm doing now:

  1. request user to Copy to clipboard
  2. parse rows on the clipboard

I figured it would be more robust to just grab the selected filekeys via MCWS, since that's what I care about anyway.  But my request to bulk update (http://yabb.jriver.com/interact/index.php?topic=77417.msg570461#msg570461) fields is really more interesting, if I had to choose only one.
Title: Re: MCWS and the Selected files
Post by: Matt on January 29, 2015, 09:12:56 am
It's been a couple years, but it's here!

Next build:
NEW: Added MCWS/v1/Files/Current to get the currently selected files.
Title: Re: MCWS and the Selected files
Post by: fredele on January 29, 2015, 01:35:50 pm
Wow, that looks interesting.
Will something similar happen for the COM automation ?
Title: Re: MCWS and the Selected files
Post by: jmone on September 22, 2015, 04:12:01 am
Hi Matt,
This call works well but there are a few tweaks if you have the time as the info returned only includes static fields for which there are values.  This means, I’m really not getting the contents of the view like one would when doing a copy / paste.  

This causes three problems:
1) there’s no way to know what columns are available in the view,  
2) calculated fields such as Album Artist (auto) are not included in the returned results so I have to make yet another call to get the fields (see next comment), and
3) expression column data is missing from the returned data.

Perfect world, I want all the data that is in the view.

Note: Regarding the MCWS call - there is a parameter to request which fields you want, so you can either:
1) don’t ask for anything specific and you get all populated static data (no data for calculated fields), or
2) ask for specific fields and these can be calculated fields.  

However, it would be good if there was a way to ask for All fields + a specific list of other fields.  This would allow making one call to get everything + some calculated fields.

Thanks
Nathan