INTERACT FORUM

Please login or register.

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

Author Topic: export a field?  (Read 3071 times)

laerm

  • Galactic Citizen
  • ****
  • Posts: 424
export a field?
« on: January 17, 2014, 03:55:01 pm »

Hi all –

Is there a way to export a field? I could make a view that only has that field in it, then export that playlist with "only visible fields" selected, but I was wondering if there was a more straightforward way.

Thanks –
Micah
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: export a field?
« Reply #1 on: January 17, 2014, 04:09:16 pm »

That's the way.

Or you could use MCWS to retrieve it.
Logged
The opinions I express represent my own folly.

laerm

  • Galactic Citizen
  • ****
  • Posts: 424
Re: export a field?
« Reply #2 on: January 17, 2014, 04:10:16 pm »

Then onward ho for me.

Gracias –
Micah
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: export a field?
« Reply #3 on: January 17, 2014, 04:11:35 pm »

De nada.

Note I edited my post shortly afterwards - you may not have seen the MCWS comment.
Logged
The opinions I express represent my own folly.

laerm

  • Galactic Citizen
  • ****
  • Posts: 424
Re: export a field?
« Reply #4 on: January 17, 2014, 04:15:04 pm »

I didn't; I was too quick on the draw.

I'll play with MCWS a bit, too. I'm trying to grab all lyrics by an artist, and it looks like you can't really filter, but I'll see...

Micah

My turn to edit: looks like I can do it. Thanks!
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: export a field?
« Reply #5 on: January 17, 2014, 04:20:59 pm »

Here's the idea:

    http://192.168.2.20:52199/MCWS/v1/Browse/Files?Action=mpl&ActiveFile=-1&Zone=-1&Fields=Lyrics&ID=1

You'll get also the FileKey, so the MPL list will include even files without Lyrics.  But you could pre-filter your list of File Keys first with a Search Query on files with non-empty Lyrics.
Logged
The opinions I express represent my own folly.

laerm

  • Galactic Citizen
  • ****
  • Posts: 424
Re: export a field?
« Reply #6 on: January 17, 2014, 04:27:47 pm »

Interesting. The doc says URLs go
http://.../MCWS/v1/Library/Values
but yours is
http://.../MCWS/v1/Browse/Files

What's the difference there?

Also, it looks like you're generating a playlist. Take out the 'Action=' statement and it just displays in browser, right? I.e. that's the "default" action?
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: export a field?
« Reply #7 on: January 17, 2014, 04:32:57 pm »

I used the Browse interface, just so I didn't have to lookup any FileKey's or do any Queries, just as a demo it can be done.  Use which ever is easiest.

Yup, the Action here is unnecessary for our purposes.  You get an MPL with Browse.
Logged
The opinions I express represent my own folly.

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: export a field?
« Reply #8 on: January 17, 2014, 04:37:49 pm »

If you use:

   http://localhost:52199/MCWS/v1/Library/Values?Field=Lyrics

You'll get all your Lyrics, but no associated Filename.  To get more Fields, you have to use the Filter parameter too.
Logged
The opinions I express represent my own folly.

laerm

  • Galactic Citizen
  • ****
  • Posts: 424
Re: export a field?
« Reply #9 on: January 17, 2014, 04:49:25 pm »

I used the Browse interface, just so I didn't have to lookup any FileKey's or do any Queries, just as a demo it can be done.  Use which ever is easiest.

Yup, the Action here is unnecessary for our purposes.  You get an MPL with Browse.

Got it. Makes sense to me.

If you use:

   http://localhost:52199/MCWS/v1/Library/Values?Field=Lyrics

You'll get all your Lyrics, but no associated Filename.  To get more Fields, you have to use the Filter parameter too.

Aha, yep, and that was what I was just working on. :D Trying to get the filter to apply to the right field now, as it seems to be stuck on filter [Name] and not [Artist].

http://192.168.1.113:52199/MCWS/v1/Library/Values?Field=Artist&Filter=Eno&Field=Lyrics

EDIT: duh, it is filtering the lyrics and not artist. Is there a hierarchy of the & elements, or some kind of nesting? I tried other orders and other text, all filter lyrics only. (But if I leave the &Field=Lyrics off, Artist filters properly.)
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: export a field?
« Reply #10 on: January 17, 2014, 06:03:57 pm »

I think you want a Fields=Artist,Lyrics approach, not multiple Fields parameters.  I'm not sure this solves the issue.
Logged
The opinions I express represent my own folly.

laerm

  • Galactic Citizen
  • ****
  • Posts: 424
Re: export a field?
« Reply #11 on: January 17, 2014, 07:45:44 pm »

You are absolutely correct. Thanks!

Micah
Logged
Pages: [1]   Go Up