INTERACT FORUM

Please login or register.

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

Author Topic: MCWS/v1/Files/Current?ActiveFileOnly=1 returns too much  (Read 889 times)

masterjoe

  • World Citizen
  • ***
  • Posts: 236
MCWS/v1/Files/Current?ActiveFileOnly=1 returns too much
« on: August 26, 2024, 06:11:19 am »

Hi there,

love MCWS and use it for automation.

There seems to be a bug when calling /MCWS/v1/Files/Current?ActiveFileOnly=1 in Theater View on the Search page!
This command returns ALL files instead of only the one where the cursor box is at!!
This way my automation becomes VERY slow as a lot of data needs to be processed!!
However the doc says the list would be reduced to only one file with ActiveFileOnly=1 - this is not the case!!

Please correct the behavior so that ANY command with ActiveFileOnly=1 ONLY returns one single file at any time!
In Theater View this shall be where the cursor box is at and nothing else.

Thanks  8)
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42441
  • Shoes gone again!
Re: MCWS/v1/Files/Current?ActiveFileOnly=1 returns too much
« Reply #1 on: August 26, 2024, 09:28:33 am »

You also need to set ActiveFile for it to trim to only that file.
Logged
Matt Ashland, JRiver Media Center

masterjoe

  • World Citizen
  • ***
  • Posts: 236
Re: MCWS/v1/Files/Current?ActiveFileOnly=1 returns too much
« Reply #2 on: August 26, 2024, 10:31:48 am »

Err, well, but I do not have any key when I want to find out what the currently selected file IS?

It would be nice if ActiveFileOnly=1 *without* any provided Key will return the file that has the selection rectangle around it.

In Theater View I have otherwise no other option to find out where the selection rectangle is...
Or is there any other option to get the file under the selection rectangle?
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: MCWS/v1/Files/Current?ActiveFileOnly=1 returns too much
« Reply #3 on: August 26, 2024, 02:50:03 pm »

Have you tried just "http://localhost:52199/MCWS/v1/Files/Current?action=JSON" ? Works for me.
Logged

masterjoe

  • World Citizen
  • ***
  • Posts: 236
Re: MCWS/v1/Files/Current?ActiveFileOnly=1 returns too much
« Reply #4 on: August 27, 2024, 12:41:21 am »

Just to clarify things:

http://localhost:52199/MCWS/v1/Files/Current?action=JSON does work UNTIL you go to something like the search page with a search result with more than one file. Then the MCWS call delivers ALL files in the search result. This is not the desired result in my use case! Also the huge amount of returned data (from the search result) stalls my automation and everything becomes sluggish, slow and unresponsive.

Therefore I used the additional parameter ActiveFileOnly=1 with the intent to reduce the data to ONLY the selected item under the selection box. This SHOULD return only one file. I thought this would return only the selected file with the selection box around it. It did not. It STILL returns all files on the search page. So I considered this a bug as the result is not limited to one file only.

I am looking for an option that ONLY and really ONLY delivers the file that is below the selection box in Theater View.
In search view when you are over the the virtual keyboard (selection box is around a letter) NO file should be returned unless you go to the right and select a file from the result. And then ONLY ONE file (the one where the selection box is around) shall be returned.

I hope that clarified the issue.

So I want to get the selection box file ONLY on every page and in any case in Theater View. If the selection box is above NO file (e.g. over the virtual keyboard letters) then no file shall be returned.

THX
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: MCWS/v1/Files/Current?ActiveFileOnly=1 returns too much
« Reply #5 on: August 27, 2024, 06:29:29 am »

Thanks for clarifying.
I agree, it's a bug. It's not only in Search - in any Theater View where there's a list of files and none is selected, the /Current API call returns all files. It should return an empty array.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42441
  • Shoes gone again!
Re: MCWS/v1/Files/Current?ActiveFileOnly=1 returns too much
« Reply #6 on: August 27, 2024, 06:49:28 am »

If nothing is selected it might return all the files.  I just searched, selected a file, and http://localhost:52199/MCWS/v1/Files/Current?action=JSON returned just that one file.
Logged
Matt Ashland, JRiver Media Center

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: MCWS/v1/Files/Current?ActiveFileOnly=1 returns too much
« Reply #7 on: August 27, 2024, 08:47:24 am »

Outside of Theater View the same call returns an empty array when nothing is select (which makes sense, as "current" is not defined). I think it should do the same in Theather?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42441
  • Shoes gone again!
Re: MCWS/v1/Files/Current?ActiveFileOnly=1 returns too much
« Reply #8 on: August 27, 2024, 09:05:15 am »

We can try it next build.   Thanks.

Changed: Theater View returns no files instead of all the files when nothing is selected when querying with MCWS.
Logged
Matt Ashland, JRiver Media Center

masterjoe

  • World Citizen
  • ***
  • Posts: 236
Re: MCWS/v1/Files/Current?ActiveFileOnly=1 returns too much
« Reply #9 on: August 28, 2024, 01:03:30 am »

Thanks for clarifying.
I agree, it's a bug. It's not only in Search - in any Theater View where there's a list of files and none is selected, the /Current API call returns all files. It should return an empty array.

It should not be empty if the selection box is around a valid file key!
I want to know which file is currently selected by the selection box cursor in Theater View.
If the cursor is above a non-file item (menus, virtual keyboard etc.) then NO file shall be returned.
But when the selection box cursor is highlighting a valid file key then THIS key shall be returned when the parameter ActiveFileOnly=1 is provided.
Logged

masterjoe

  • World Citizen
  • ***
  • Posts: 236
Re: MCWS/v1/Files/Current?ActiveFileOnly=1 returns too much
« Reply #10 on: August 28, 2024, 01:06:34 am »

We can try it next build.   Thanks.

Changed: Theater View returns no files instead of all the files when nothing is selected when querying with MCWS.

Returning nothing is fine when nothing is selected (no valid file key below the cursor, no selection otherwise). But please return the selected file item when the selection box cursor highlights any valid file key.
Then I like it :)

THX
Logged
Pages: [1]   Go Up