INTERACT FORUM

Please login or register.

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

Author Topic: Album Comments used for reporting.  (Read 1823 times)

vbphil

  • World Citizen
  • ***
  • Posts: 136
Album Comments used for reporting.
« on: December 11, 2013, 11:48:33 am »

So I'm switching to MC19 from Media Monkey. I have used a field in MM called Album Notes where I indicate whether the Album is Vinyl, Cassette, Download, Missing. This field lives in the MM database only and not part of the file tag so it isn't loaded into my MC19 library when I import my music folder.

What's the best way to implement a comment like this in MC19?

One way I use this information is in a MM report I wrote that creates a text file listing only the CDs in my Library by Artist and Album name. The report goes deeper than that where it divides my collection up into what storage box the CD should be located. I have 10 boxes that holds a given number of CDs. The report divides up the CD collection by Artist and assigns the CDs to a storage box not letting an Artist wrap over from one box to another. I'll want to create a similar script (Report) in MC19 but haven't researched that yet.

Just wondering how to implement an Album comment in MC.

thanks,  -phil
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Album Comments used for reporting.
« Reply #1 on: December 11, 2013, 12:45:38 pm »

You can use any user-defined custom field, or maybe you're fine with the stock Keywords field.  There are Large text fields such as Notes and Description.  See: http://wiki.jriver.com/index.php/File_Properties_%28tags%29

As for your Media Monkey report, can you show a segment of what the report looks like?
Logged
The opinions I express represent my own folly.

vbphil

  • World Citizen
  • ***
  • Posts: 136
Re: Album Comments used for reporting.
« Reply #2 on: December 11, 2013, 02:28:13 pm »

Yes I think the Keywords field would work for this, and that's a tag written to the file as well. I didn't notice that one. I can probably implement that in MM before I import into MC.

The report is a VBS script that is run from MM which then exposes the Application Object in MM.
The report file is written to a file in the RTF format where I can control pagination and a few other RTF codes.
So page one of the report is for Box 1. Here's how it starts out. Each Box is written to it's own page.

*****  Box #1 **********
ARTIST NAME       ALBUM NAME
2 Unlimited       No Limits
A. J. Croce       A.J. Croce
Acoustic Alchemy  Blue Chip
                 +Natural Elements
                 +Reference Point
                 +The Beautiful Game
                 +The New Edge
Adele            21
Air Supply       Greatest Hits
Al Di Meola      Kiss My Axe
Al Jarreau       All Fly Home
Alabama          Twentieth Century
Alan Jackson     Good Time
America          America


Also, I use ClickBook by Blue Squirrel to print it out as a 5 1/2 x 11" booklet. So all in all it's a nice archiving process to stow away my CDs since I never play them anymore just the digital copies.

some sample code from the script;
Select Case record_type
      Case 1
      'Just the classical and christmas, Box 10
      sql = "SELECT DISTINCT Albums.Artist, Albums.Album " _
      & "FROM Albums INNER JOIN Songs ON Albums.ID = Songs.IDAlbum " _
      & "WHERE ((Songs.Genre LIKE '%Classical%') " _
      & "OR (Songs.Genre LIKE '%Christmas%'))" _
      & "AND (NOT (Albums.Comment LIKE '%Download%') " _
      & "OR NOT (Albums.Comment LIKE '%Cassette%') " _
      & "OR NOT (Albums.Comment LIKE '%Missing%') " _
      & "OR NOT (Albums.Comment LIKE '%Vinyl%')) " _
      & "ORDER BY (Songs.Genre)"
      boxnum=10
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Album Comments used for reporting.
« Reply #3 on: December 11, 2013, 02:40:07 pm »

To create a similar report, you can base it off a custom view.  And then just export or print the view.  You'll have to experiment to see what works for you best.

Here's a method I use to keep track of my "boxes" (cases) of CDs stored away like you.  This groups them by 160, but the grouping can be arbitrary.  I have a number of views that allow selecting a given "box":

    http://wiki.jriver.com/index.php/CD_Reference_Number

You could add a Box # field to MC, and populate it, or you could use your rules (like your Select clause terms) to construct a Search List in a view.  You select a particular Search List and only those items are shown.

You'll need a new script and method with MC to obtain media info.  You can use the MCWS interface, available when Media Network is enabled.

Logged
The opinions I express represent my own folly.

vbphil

  • World Citizen
  • ***
  • Posts: 136
Re: Album Comments used for reporting.
« Reply #4 on: December 11, 2013, 02:53:21 pm »

I was wondering what the Expression Language was used for? It sounded like a programming language that could be used to query the library database and do essentially what I was doing in MM. There's a reference for it in the Wiki but no tutorials or discussions on how to implement it.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Album Comments used for reporting.
« Reply #5 on: December 11, 2013, 02:53:51 pm »

Logged
The opinions I express represent my own folly.

vbphil

  • World Citizen
  • ***
  • Posts: 136
Re: Album Comments used for reporting.
« Reply #6 on: December 11, 2013, 05:39:36 pm »

That's the Wiki I was talking about. It just looks like a language reference and there's no discussion about how you put a complete program together, where you install it or how MC executes it. You know all that other good stuff you need to know before you can write your own. Are there any program or script examples?
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Album Comments used for reporting.
« Reply #7 on: December 11, 2013, 05:44:45 pm »

You could write a plug-in, but I'm not sure that's where you want to go.

You are asking about how to externally obtain info from the MC library.  The MCWS interface will allow you to do that.  It is a simple HTTP-based protocol where you send queries and obtain results in a list, which you then further process.  Because it is HTTP-based, you can use whatever scripting language you want to send/receive/parse.

There are various examples in the forum here for calling MCWS.  It is also semi-self-documented, available on the landing page.  See the link I mentioned previously.  Requests are generally pretty simple - for example:

    http://localhost:52199/MCWS/v1/Playback/Info?Zone=-1
Logged
The opinions I express represent my own folly.

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Album Comments used for reporting.
« Reply #8 on: December 11, 2013, 06:53:39 pm »

I was wondering what the Expression Language was used for? It sounded like a programming language that could be used to query the library database and do essentially what I was doing in MM. There's a reference for it in the Wiki but no tutorials or discussions on how to implement it.

A better way to think about it is more like functions in Excel (the language itself is - or was at one time anyway - pretty similar to the one used by Excel, in fact).

It is used all over the place in MC.  For example, you can use it to define searches when filtering a View using the Set Rules for File Display, or a Smartlist search.  Expressions can also be used to make custom fields that are calculated automatically based on other fields (Calculated Fields), custom Columns in Details view, and a wide variety of other things.

If you get crazy, it can be used almost like a (somewhat clumsy) programming language.  But generally only if you're MrC.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

vbphil

  • World Citizen
  • ***
  • Posts: 136
Re: Album Comments used for reporting.
« Reply #9 on: December 13, 2013, 11:20:33 am »

That  helps. I get the MCWS now although I don't see a connection between that and the Expression Language.

Maybe a little more help here will get me on my way.

I created some custom views as you suggested and between that and playlists I was able to set a couple Keywords marking library entries as "Vinyl" and "Tape". Is there a way to use an MCWS call to retrieve a list of Artist and Albums whose Keywords equals Vinyl?

This works but I'd like an ordered list showing the Artist and the name of the Albums for that Artist.

http://localhost:52199/MCWS/v1/Library/Values?Filter=Vinyl

This is returning what looks like a jumbled list with no obvious relation between the Artist and the Albums.

this is a partial of what I get back.


<?xml version="1.0" encoding="UTF-8" standalone="true"?>
-<Response Status="OK">
<Item Name="Keywords">Vinyl</Item>
<Item Name="Artist">Linda Ronstadt</Item>
<Item Name="Artist">National Lampoon</Item>
<Item Name="Album">Garden Of Delights</Item>
<Item Name="Album Artist">National Lampoon</Item>
<Item Name="Comment">Recorded from record album.</Item>
<Item Name="Album Artist">Linda Ronstadt</Item>
<Item Name="Comment">Recorded from record album. Noisy</Item>
<Item Name="Album Artist">Gordon Lightfoot</Item>
<Item Name="Artist">Gordon Lightfoot</Item>
<Item Name="Comment">Recorded from record album</Item>
<Item Name="Comment">Recorded from record album. Noisy.</Item>


I tried this but I didn't get a list back.
http://localhost:52199/MCWS/v1/Library/Values?Filter=Vinyl&Field=Artist,Album

<?xml version="1.0" encoding="UTF-8" standalone="true"?>
<Response Status="OK"/>


thanks,  -phil
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Album Comments used for reporting.
« Reply #10 on: December 13, 2013, 12:36:50 pm »

That  helps. I get the MCWS now although I don't see a connection between that and the Expression Language.

We're having several conversations at once, so that's creating some confusion.  You've asked about how to get some structured information about your library, and I gave some pointers as to several possible methods.

Since I wrote the expressiona language page, I don't think I can do any better explaining it here.  It does cover the connection you're looking for along with the MCWS page.  In brief, MCWS can query the MC database, and those queries can utilize the expression language just like Search queries in MC.  Maybe you'll also need to understand Search better:

    http://wiki.jriver.com/index.php/Smartlist_and_Search_-_Rules_and_Modifiers

Quote from: vbphil
I created some custom views as you suggested and between that and playlists I was able to set a couple Keywords marking library entries as "Vinyl" and "Tape". Is there a way to use an MCWS call to retrieve a list of Artist and Albums whose Keywords equals Vinyl?

This works but I'd like an ordered list showing the Artist and the name of the Albums for that Artist.

http://localhost:52199/MCWS/v1/Library/Values?Filter=Vinyl

This is returning what looks like a jumbled list with no obvious relation between the Artist and the Albums.

this is a partial of what I get back.

<?xml version="1.0" encoding="UTF-8" standalone="true"?>
-<Response Status="OK">
<Item Name="Keywords">Vinyl</Item>
<Item Name="Artist">Linda Ronstadt</Item>
<Item Name="Artist">National Lampoon</Item>
...
<Item Name="Artist">Gordon Lightfoot</Item>
<Item Name="Comment">Recorded from record album</Item>
<Item Name="Comment">Recorded from record album. Noisy.</Item>


I tried this but I didn't get a list back.
http://localhost:52199/MCWS/v1/Library/Values?Filter=Vinyl&Field=Artist,Album

<?xml version="1.0" encoding="UTF-8" standalone="true"?>
<Response Status="OK"/>

Maybe this explains it:

   http://yabb.jriver.com/interact/index.php?topic=66214.msg444338#msg444338

I haven't thought about the technique or algorithm you'd need to accomplish what your MM report does.  You can probably just ask for all entries to be returned including the Fields you want.  This will come back as a structured MPL, which you parse and present.  Or you might want to request only a subset of those values based on a Filter.  See the GetInfo command in MCWS.

I'm running short on time right now, but can expand later today if you want more help.
Logged
The opinions I express represent my own folly.
Pages: [1]   Go Up