INTERACT FORUM

Please login or register.

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

Author Topic: discogs.pl: a Discogs metadata scraper and dummy file creator  (Read 54564 times)

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
discogs.pl: a Discogs metadata scraper and dummy file creator
« on: January 27, 2014, 12:17:35 am »

Description

The following command script pulls metadata from Discogs to tag your Media Center tracks.  In addition, it can also create dummy files that can be imported and tagged to simulate collections for which physical media does not exist (e.g Vinyl, desired CDs, etc.).

The script is written in Perl, and can be used on Windows, Mac OS X, or Linux.  It basically works like this:

    1. You supply an album's Discogs release ID
    2. You select the album's tracks in a view in MC
    3. You run the script

The script will do one or both of:

  - update MC fields directly via MCWS (version 19.0.54+, Media Server needs to be running with authentication enabled)
  - produce an MPL file which will update the MC fields when imported into MC via File > Import Playlist

Available Metadata

The following metadata can be retrieved (when available):

    Per-Album Values
        Album Artist
        Album
        Genre
        Styles
        Country
        Date
        Date Released
        Label (combined label and catalog #)
        Disc #
        Discogs Release ID
        Discogs Release URL
        Media Format (Vinyl, CD)
        Credits
        Notes  (coming soon)
        Barcode
    Per-Track Values
        Artist
        Track #
        Name
        Credits
        Duration (currently disabled)

Download the attached zip file, and unzip the items to a folder (right-click > Extract All).  See the README.txt file inside the folder.

Here are several videos showing the script in action.
- See the Demo movies at the download site in the Instructions

For best results, download the files and view in your preferred player.

See also this thread:

   http://yabb.jriver.com/interact/index.php?topic=86465.msg594479#msg594479
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: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #1 on: January 27, 2014, 12:23:18 am »

Notes

Implemented, will be in the next release:

Future:
   - Support other Discogs searching mechanisms if possible.
   - Complete the merge with amg.pl (much of the code is shared now).
   - Download cover art from Discogs (this is implemented, but won't work as discogs changed their API terms to require authentication).
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: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #2 on: January 27, 2014, 12:23:24 am »

Usage Tips

  • Create a Link to take you to the Discogs release web page
    You can create a Link in MC to take you directly to the Discogs release page once you have a populated Discogs ID field:

    <Link version="1.2">
    <Item Name="Name">Discogs</Item>
    <Item Name="Action">1</Item>
    <Item Name="Base URL">http://www.discogs.com/</Item>
    <Item Name="Search URL">http:////www.discogs.com//release//[Discogs ID]</Item>
    <Item Name="Filter"/>
    </Link>

    See also this post for another way:

       http://yabb.jriver.com/interact/index.php?topic=79783.msg544326#msg544326

  • Use discogs.pl to update track info for a CD that has no metadata
    When you insert a CD and find there is no track information available, all is not hopeless.  You can use discogs.pl to grab the album information.  All you need to do is remove the Filename column (right click the Filename header, and deselect it), and add a new expression column, with the name Filename, and use the expression [Filename,0].  This outputs the raw Filename value, which for CD entries begins with a hexidecimal path.  Now just run discogs.pl with your normal arguments, and supply the Discogs release ID on the command line (or have it in the view).  Oh, and don't forget to right-click the CD entry under Drives & Devices, and Submit to Internet so the CD's metadata will be available for others.
Logged
The opinions I express represent my own folly.

cinjin

  • Recent member
  • *
  • Posts: 26
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #3 on: January 28, 2014, 01:22:55 am »

MR C Thanks for all the work you put into this. I have been using musicbrainz then jaikoz then mp3tag to completely tag my files. This is gonna greatly reduce the time it took. A great time saver Thanks !!!
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #4 on: January 28, 2014, 06:52:10 pm »

Thanks.  I'm interested in getting feedback.

You may have also noticed I completed the cover art download work (noted above in post #2), and was hoping for a few bug reports that I could fix before releasing 1.01.
Logged
The opinions I express represent my own folly.

broncodan

  • World Citizen
  • ***
  • Posts: 212
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #5 on: January 28, 2014, 11:14:09 pm »

I am very interested in this but not sure where to start - I guess I need to get the discog's album id?  Is there anyway to get this data automatically?  I have quite a large library and doing this manually would take weeks?

I saw on another post about this discogs info that you were extracting this data from the discogs.xml.  One thought for me would be able to get that XML data into an excel file (for me I would only be looking to get the genre/styles/original release date (song and/or album) and the album/artist information to search from.  With that information in a spreadsheet I could export my library to excel with the blank fields created, run a macro in excel to compare album/artist between the 2 sheets, if there is a match - copy the information to the blank fields.  Use the track info lookup excel spreadsheet created by Just Some Guy - which can export excel data to MPL - then reimport the mpl and have the information added to the library.

This also prevents hitting the discogs server with a lot of pings (which in the past has gotten my ip banned).... :)

Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #6 on: January 28, 2014, 11:40:25 pm »

There's no automatic way to get your Release ID for an album.  Rather, there are many releases for any given album, sometimes more than a hundred.  For example, check out Pink Floyd's Dark Side of the Moon:

   http://www.discogs.com/Pink-Floyd-The-Dark-Side-Of-The-Moon/master/10362

Each of the items there is a Release, and one release may be different from another.  While many have essentially the same track lists, each has a different quantity and quality of credits and extra meta-information (release date, label, remastering, etc.), and of course the Catalog #.  And some releases have extra tracks, extended versions, and different packaging, and obviously different media formats (CD, SACD, LP, 8-Track, Cassette).

There is the concept of a Master Release, which is a bit of an overarching entry with a track list, year, genre, but little other metadata.

Now, if you wanted a way to, say, return the first 'CD' release, and didn't really care about the other metadata beyond track info, I could have the script query by Artist/Album Name/Format, and just accept the first release found that matches the criteria (and number of tracks probably), and ignore assigning unverified information (Catalog #, Country, Label, Release Date, etc.).  Or perhaps the list can be narrowed and more refined with your own good metadata (such as Date, Country, Label, or whatever).

And there can be more problems, for albums where exact title matches are difficult, especially with Greatest Hits albums, where there might be many different "Greatest Hits" masters with entirely different tracks.

So, in summary, with only two pieces of metadata (Artist/Album), results will be less than spectacular.   With better metadata, results should theoretically be better.  But at some point, if you have perfect metadata, you don't need the script, and I'm not sure where that balance is yet (and we probably don't know until user requests come in).

My approach to this type of stuff is to get the data when I play an album (cover art, extra metadata, lyrics), as it is few second process, for each 60 minutes of playback, roughly.  But I'm open to suggestions.

I would suggest you start by trying it out with a test album or two, and see what you need and want, and how well it works for you.
Logged
The opinions I express represent my own folly.

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #7 on: February 03, 2014, 12:37:13 pm »

Thanks MrC. I still haven't tested the script but was wondering could this be used through MC's send to external program? If the (album) files have discogs id already filled could I use that to fill all the other metadata? That would be convenient.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #8 on: February 03, 2014, 01:00:35 pm »

Thanks MrC. I still haven't tested the script but was wondering could this be used through MC's send to external program? If the (album) files have discogs id already filled could I use that to fill all the other metadata? That would be convenient.

That's OK, at your leisure.

You could use Send To, but it isn't designed for this, and here's why.  Send To operates one file at a time, and will invoked the external command for every file you have selected.  And it will leave a command window open for every file you've selected, which you'll have to close.  Send To's paradigm is rudimentary and simple; it wasn't designed for batch or multi-file operations.

But discogs.pl operates on all the files at once, and needs them all to determine certain sequencing and minimize calls to the Interweb.

So, bad idea.

You'll have a much better experience if you just create a batch file (or chose your own scripting language) which launches a command window and invokes discogs.pl with the proper arguments and leaves the command window open for you to review any diagnostics.  Then, all you need to do is double click the batch file when you are ready to do some lookups on the selection in MC.  Ask if you need help here.
Logged
The opinions I express represent my own folly.

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #9 on: February 19, 2014, 02:53:42 pm »

Just tested with one album. Few humble suggestions reflecting my needs.

Could Label and Catalog # be separated. Currently both are written to Catalog # field.
I've been using Label = Publisher in MC and Catalog # = Catalog #

The other one would be Composer field in MC.
Could discogs 'Written By' / 'Composed By' written to MC's Composer field (; as a separator).
This data is now written to Credits field it seems. I guess I could use the scripting thing you released but it would be nice if this script could fill the composer field automatically.

Thanks again for the script.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #10 on: February 19, 2014, 02:58:07 pm »

Great, thanks.

Re: Catalog # and Label.  I thought about this.  If I recall correctly, there are some entries which have more than a single Label/Catalog listing, and I wasn't sure how users wanted those mapped.  Suggestions?

Re: Composer, etc.  I haven't migrated the Credits mappings yet that the amg.pl script has.  I'll do that.  I'm in the process of a grand merger, so discogs.pl, amg.pl, and pscriptor.pl will share all the common code, and amg.pl will pick up capabilities that discogs has, and vice versa.  Hold tight on this...
Logged
The opinions I express represent my own folly.

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #11 on: February 19, 2014, 03:22:44 pm »

Re: Catalog # and Label.  I thought about this.  If I recall correctly, there are some entries which have more than a single Label/Catalog listing, and I wasn't sure how users wanted those mapped.  Suggestions?
This is tough one. I've got no killer suggestions. I guess I have handled this case by case when there has been multiple label information.

IMO for re-releases you should use the re-release company. e.g. Led Zeppelin Classic Records vinyl releases should use that as a publisher and not Atlantic (just my opinion of course)

That said I'm not sure if discogs have some kind code of conduct for that. Should the actual releaser be added as top of label list or is there any ruling to how list these....?

It looks like it could be like that:
http://www.discogs.com/Led-Zeppelin-Led-Zeppelin/release/2154266
http://www.discogs.com/Led-Zeppelin-Led-Zeppelin/release/1125921

Other solution could be taking them all and separate with ;
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #12 on: February 19, 2014, 03:28:22 pm »

Where does the re-release company. "e.g. Led Zeppelin Classic Records vinyl" come from on the page?
Logged
The opinions I express represent my own folly.

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #13 on: February 19, 2014, 03:38:26 pm »

It is just one of the Label fields in xml.

Judging with that one example it would suggest that first label field is the releaser of the release in concern.

Like in http://www.discogs.com/Led-Zeppelin-Led-Zeppelin/release/2154266
First label - catalog # pair says "EastWest Japan ‎– AMCY-2431" which is the company behind the reissue.

and in http://www.discogs.com/Led-Zeppelin-Led-Zeppelin/release/1125921
First label - catalog # pair says "Classic Records ‎– SD 8216" which is the company behind this reissue.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #14 on: February 19, 2014, 04:08:15 pm »

Oh, that you already have.  I see, your "Led Zeppelin Classic Records vinyl" was literally just an example; I was confused, because the pages you reference are specific.

So you just want the first one, and you want the first one split as Label and Catalog #.  Right?
Logged
The opinions I express represent my own folly.

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #15 on: February 20, 2014, 08:21:22 am »

Right. Might go wrong sometimes depending of discogs editor but maybe it would be too messy to add all of them and i suppose most of times that first entry identifies the release quite well. Of course one can always check release from the discogs also if id is saved to the tags.
I've been using publisher tag (because it was already there) in mc for discogs labels but user defined label field would be fine also.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #16 on: February 21, 2014, 12:36:33 pm »

FYI: Yesterday I finished the album credits mapping, and the change to return the first catalog and label, storing them into their own fields (Catalog # and Publisher).  I'm finishing up a few more items, and then I'll publish the update.
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: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #17 on: February 21, 2014, 10:43:32 pm »

I've just posted a large update to version 1.02.  Most of the code has changed, to make it as much the same as possible with the amg.pl script.  There are also many nifty new features here.  Enjoy.

Version 1.02
    - Fix: forgot to bump version number for 1.01
    - Fix: empty release years, or those that contained month and day values were not handled correctly.
    - Internal: amg.pl, discogs.pl, and pscriptor.pl now share common modules (under directory MCUtils).
    - Fix: problem mis-detecting old clipboard data when last column in view was empty.
    - Change: field key 'label' deprectated and split into two new field keys 'catalog' and 'publisher'.
    - Change: only the first (primary) Catalog # / Label is returned via the new field keys 'catalog' and
      'publisher'.
    - Change: key 'credits' mapped to 'Album Credits' now by default, since MC's Credits field is Video-Only.
    - New: credits mapping to selectively map credits to other MC fields, or ignore certain credits.  See the
      Credits section in the config file.
    - New: the Discogs Notes section (key: 'notes') is now available and mapped to MC's Description field.
    - Fix: a missing Filename column was sometimes not detected.
    - New: be tolerant of uppcase letters in key names used on the command line.
    - New: option --fileregex added, which allows pulling track numbers from filenames.
    - New: option --all will add album info for tracks not in Discogs (useful for extra-track disks, etc.).
    - New: option --range <range list> allows selecting which discs and tracks are to be used from the release.
      This is useful for box sets, etc., to select only those items that map to your collection.  The --range
      option implies the --sequence option.  The <range list> is one or more semicolon separated lists of
      individual disc/track pairs, where within a disc track pair, disc or tracks may be specified as a comma-
      separated list.  Either the Disc or Track portion may be omitted to indicate ALL items.  Examples:

        --range d2                                                       all tracks from disc 2
        --range d2-4                                                    all tracks from discs 2 through 4, inclusive
        --range d2T1-9                                                tracks 1 through 9 from disc 2
        --range T1-4                                                    tracks 1 through 4 from all discs
        --range "D9T1,3,5,7,9,11-13; D10T1-3,5-7"       tracks 1,3,5,7,9, 11-13 for disc 9, tracks 1-3 and 5-7 for disc 10*
        --range D1-3T1-9,11-13,15;T1-3,5-7;D6T1-5     tracks 1-9, 11-13, and 15 for discs 1-3, tracks 1-5 for disc 6,
                                                                               and tracks 1-3 and 5-7 for other discs

        * note the double quotes surrounding the entire --range argument, due to use of (optional) white space
Logged
The opinions I express represent my own folly.

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #18 on: February 22, 2014, 02:08:52 am »

Nice! Thanks MrC.
So I can use --all parameter to add album info for example to the album art files? Of course I could just test it...  ;D
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #19 on: February 22, 2014, 02:12:09 am »

Yes, and that's an obvious usage that didn't occur to me.  Just make sure the art is last in the album grouping.
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: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #20 on: February 22, 2014, 10:32:40 pm »

I've posted a new version 1.03.

Version 1.03:
    - New: key 'totaltracks' mapped by default to Total Tracks returns the total number of tracks across
      all discs.
    - New: warn when an --include or --exclude key does not exist.
    - New: debug and verbose messages are easier to read.
    - Internal: more cleanups and bug fixes.
Logged
The opinions I express represent my own folly.

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #21 on: February 23, 2014, 01:41:03 pm »

Working very well and is extreme time saver :)
Dare I i still ask for fetching of the Barcode and other identifiers...
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #22 on: February 23, 2014, 02:28:53 pm »

Sure.  I have to modify the WWW::Discogs module.

There can be many different identifiers:

    Matrix / Runout: 10 C 268-098434
    Matrix / Runout: 10 C 268-098.434
    Other (Depósito Legal): B. 5695-1977
    Rights Society: S.G.A.E.

    Matrix / Runout (Side A Label): MX178307
    Matrix / Runout (Side B Label): MX178308
    Matrix / Runout (Side A Runout Groove): ' A SBP234948 A 1359-700
    Matrix / Runout (Side B Runout Groove): ' A SBP234948 B 1360-700

    Barcode: 4 988009 604220
    Matrix / Runout: DPA-19 2
    Rights Society: JASRAC

    Barcode: 7 24382 97482 6
    Other (Distribution Code): F: PM 520
    Other (Distribution Code): I: 070
    Other: CDEMD 1060
    Matrix / Runout: teltron 7030-2 8297482 INDUSTRIA ARGENTINA

Maybe you just want Barcode?

[Edit: I have the barcode being returned:

    - New: key 'barcode' mapped by default to MC field Barcode returns the release's Barcode, if it exists.
]
Logged
The opinions I express represent my own folly.

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #23 on: February 26, 2014, 04:02:42 pm »

Yes,I think that barcode is enough.
Other info may or may not be correct for the album I've got and it is impossible to automatically choose the correct deadwax info from the discogs when there are variants.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #24 on: February 26, 2014, 05:29:51 pm »

Version 1.04 is posted.

Version 1.04 Changes:
    - New: key 'barcode' mapped by default to MC field Barcode returns the release's Barcode, if it exists.
    - Fix: some more debugging message cleanups.
Logged
The opinions I express represent my own folly.

jctcom

  • Citizen of the Universe
  • *****
  • Posts: 690
  • Rush - Styx - Yes - Porcupine Tree - Staple Food!
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #25 on: March 01, 2014, 05:56:05 pm »

2 questions (For now).

1st.  I do no know anything about Perl (or other programming languages) but I am very interested in this.  I have downloaded the package and edited the discogs-config.txt file to match and / or add the fields missing or with a different name in MC.

I have read through the thread and can't find anything that actually tells me how to run this package and load the Discogs Catalog # and basically us it?

2nd.  Having gone through the thread and the discogs-config.txt file I didn't see any mention of "Original Release Date".  Is this pulled from discogs and implemented somewhere?

Thanks and sorry for being such a noob in this regard.

Carl.
Logged
Carl's Music: https://cloud.clz.com/jctcom/music
Carl's Movies: https://cloud.clz.com/jctcom/movies

Some of Carl's Equipment:  Yamaha RX-A2A, i7-11700K, 128GB, PCIe X4 2TB M.2 SSD, GTX-970, SMSL DL200

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #26 on: March 01, 2014, 07:05:53 pm »

1st.  I do no know anything about Perl (or other programming languages) but I am very interested in this.  I have downloaded the package and edited the discogs-config.txt file to match and / or add the fields missing or with a different name in MC.

I have read through the thread and can't find anything that actually tells me how to run this package and load the Discogs Catalog # and basically us it?

No need to know about perl.

The README.txt file gives you the steps.  Have you looked through that file?

2nd.  Having gone through the thread and the discogs-config.txt file I didn't see any mention of "Original Release Date".  Is this pulled from discogs and implemented somewhere?

There are two dates that can be pulled - the release date and a year-only value of the date.

On the top of a discogs release page, you'll see a "Released" field, and the date there may be a year, year/month, or year/month/day value, as a string.   This will be stored in the MC field Date Issued, by default (this would be a user-defined field).  You would see this as the 'rdate' key in the config file.

The year-only value, seen on a page as "Year", gets assigned to MCs Date field.  The "Year" value is typically seen at the top of a discogs Master page.  This is the 'date' key you'll find in the config file.
Logged
The opinions I express represent my own folly.

jctcom

  • Citizen of the Universe
  • *****
  • Posts: 690
  • Rush - Styx - Yes - Porcupine Tree - Staple Food!
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #27 on: March 01, 2014, 07:34:55 pm »

No need to know about perl.

The README.txt file gives you the steps.  Have you looked through that file?
I did read the file.  I guess there is either something I missed or something I don't understand.

What I believe are the relevant parts of the TXT file:
The script is written in Perl, and can be used on Windows, Mac OS X, or Linux.  It basically works like this:

    1. You supply an album's Discogs release ID   
 (If "Run The Script" isn't the first step then I am not sure where to "supply" the Discog's Info to? unless it is simply entering it into the "Catalog #" field for the album which I already do.
    2. You select the album's tracks in a view in MC
I can do this!  lol
    3. You run the script   
How does one "Run The Script".  Do I just double click on the "discogs.pl" file? When I do that I get "dos" type window that opens and closes instantly.  (I have downloaded and installed the "ActivePerl 5.16.3...")

There are two dates that can be pulled - the release date and a year-only value of the date.

On the top of a discogs release page, you'll see a "Released" field, and the date there may be a year, year/month, or year/month/day value, as a string.   This will be stored in the MC field Date Issued, by default (this would be a user-defined field).  You would see this as the 'rdate' key in the config file.

This part I have done.  I changed the discogs-Config.txt field to match mine which is "ReleaseDate".


The year-only value, seen on a page as "Year", gets assigned to MCs Date field.  The "Year" value is typically seen at the top of a discogs Master page.  This is the 'date' key you'll find in the config file.

Ok.  When I was going through the discogs-config.txt file originally for some reason I missed the "Date" field.  But I see it there now.

So I guess I am good to go.  except for the part about "Run The Script" lol

Carl
Logged
Carl's Music: https://cloud.clz.com/jctcom/music
Carl's Movies: https://cloud.clz.com/jctcom/movies

Some of Carl's Equipment:  Yamaha RX-A2A, i7-11700K, 128GB, PCIe X4 2TB M.2 SSD, GTX-970, SMSL DL200

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #28 on: March 01, 2014, 09:25:39 pm »

The part you've quoted is from the top, introductory section.  It's just an overview of what you'll be doing.  The real meat is in the various Usage sections.  It really does walk you through the process, including how to find the discogs release ID.  Search "Usage: Common":

Quote
Usage: Common

* To see alist of command line options supported by discogs.pl, use the --help option:

    perl discogs.pl --help

* The discogs.pl script and the following usage scenarios require a Discogs Release ID.  To find this value, go to www.discogs.com, and search for an Artist.  Navigate into the artists discography listing, and select an album.  There will be one or more album releases; select the one you believe is yours (match your catalog #, or label, or use some generic entry if you don't care for that level of detail - just be sure the release has the metadata you want).  Once you are on the release page for the album, you'll see the Discogs Release ID as the last component of the URL, and also in the upper right corner of the page with a little record icon (but you only want the numeric part).
Logged
The opinions I express represent my own folly.

jctcom

  • Citizen of the Universe
  • *****
  • Posts: 690
  • Rush - Styx - Yes - Porcupine Tree - Staple Food!
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #29 on: March 01, 2014, 09:58:24 pm »

Oops.

Got to the "Download and install ActivePerl 5.16" and for some reason after doing that I thought I had been at the end of the file.

Sorry my bad.

I will continue and report back. 

Carl.
Logged
Carl's Music: https://cloud.clz.com/jctcom/music
Carl's Movies: https://cloud.clz.com/jctcom/movies

Some of Carl's Equipment:  Yamaha RX-A2A, i7-11700K, 128GB, PCIe X4 2TB M.2 SSD, GTX-970, SMSL DL200

jctcom

  • Citizen of the Universe
  • *****
  • Posts: 690
  • Rush - Styx - Yes - Porcupine Tree - Staple Food!
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #30 on: March 01, 2014, 10:40:55 pm »

Ok so I have completed the steps and performed my first test on the Jimi Hendrix Album "Hendrix In the West" with Discogs Release ID: 694011

All went well except for the Date.  All of my Artists / Albums have always had the "Year" in the upper right which is what they are sorted on.  This "Year" has always been the "Original Release Year" of the album.  In this case "1971".  

This process pulls and puts the "Current Release Year" (1980 in this case) in that space as it appears on the release for the version of the album attached to that discogs ID.

What discogs field can I use to pull the "Original Release Year" that appears when you click on the "All Versions of this release".  This is the year I would want to sort on.  I don't want an album that was re-released in 2010 to appear at the bottom of my list when the original album was released in 1970.

I have attached my discogs-config.txt just in case.  But I think it is correct with Field: Date = Date?
Thanks.

Carl.
Logged
Carl's Music: https://cloud.clz.com/jctcom/music
Carl's Movies: https://cloud.clz.com/jctcom/movies

Some of Carl's Equipment:  Yamaha RX-A2A, i7-11700K, 128GB, PCIe X4 2TB M.2 SSD, GTX-970, SMSL DL200

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #31 on: March 01, 2014, 10:52:36 pm »

I'll probably have to make a second call to get the master release date.  Stay tuned.
Logged
The opinions I express represent my own folly.

jctcom

  • Citizen of the Universe
  • *****
  • Posts: 690
  • Rush - Styx - Yes - Porcupine Tree - Staple Food!
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #32 on: March 01, 2014, 10:54:53 pm »

Thanks. That will be great.

Carl.
Logged
Carl's Music: https://cloud.clz.com/jctcom/music
Carl's Movies: https://cloud.clz.com/jctcom/movies

Some of Carl's Equipment:  Yamaha RX-A2A, i7-11700K, 128GB, PCIe X4 2TB M.2 SSD, GTX-970, SMSL DL200

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #33 on: March 01, 2014, 11:46:24 pm »

Here's a pre-release of 1.05.  It pulls the date from the master entry, so should be correct.  I haven't put a lot of testing into this yet.  Unzip the attachment, and replace your discogs.pl script.
Logged
The opinions I express represent my own folly.

jctcom

  • Citizen of the Universe
  • *****
  • Posts: 690
  • Rush - Styx - Yes - Porcupine Tree - Staple Food!
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #34 on: March 02, 2014, 12:29:33 am »

Thanks. now it is putting the correct date in.

Is there an easy way for me to have it not put in the track numbers?  With my Vinyl stuff I have created an additional field which I put in manually A1, A2, B1, B2, B3 etc...

But I like the actual track numbers to go numerically in order from 1st to nth.

If it's a problem or will create grief for others who might want to use the program then don't worry about it.  I will just do the "Fill track numbers automatically. deal.

But so far so great!

Carl.
Logged
Carl's Music: https://cloud.clz.com/jctcom/music
Carl's Movies: https://cloud.clz.com/jctcom/movies

Some of Carl's Equipment:  Yamaha RX-A2A, i7-11700K, 128GB, PCIe X4 2TB M.2 SSD, GTX-970, SMSL DL200

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #35 on: March 02, 2014, 12:46:48 am »

Add the options:

    --sequence --nodiscnum

to your command.  The --sequence option uses the order listed in the view, and the --nodiscnum option says to ignore the disc name/number and just count upwards 1 to n for track numbers.
Logged
The opinions I express represent my own folly.

jctcom

  • Citizen of the Universe
  • *****
  • Posts: 690
  • Rush - Styx - Yes - Porcupine Tree - Staple Food!
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #36 on: March 02, 2014, 12:53:11 am »

Thanks.  I will try that presently.

Once I have this command fixed can I just create a .bat file and run that?  Is there a way for me to tell it the discogs ID that way?

Also I wanted to add the "Artist" name into my "Album Artist" field since 95% of them are the same.

I added the line: Field:  artist   = Album Artist     ("Album Artist" of course being the name of my "Album Artist" field) but it didn't work.  What did I do wrong?

Carl
Logged
Carl's Music: https://cloud.clz.com/jctcom/music
Carl's Movies: https://cloud.clz.com/jctcom/movies

Some of Carl's Equipment:  Yamaha RX-A2A, i7-11700K, 128GB, PCIe X4 2TB M.2 SSD, GTX-970, SMSL DL200

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #37 on: March 02, 2014, 01:08:48 am »

Most of the command line options you can add to the config file.  See the Options section.  Obviously, you can't add the discogs ID, nor the -c discogs-config.txt options.  However, I find it faster to select all the tracks, get the release ID, and add that value to the selected files in MC.  Then, you don't need the --rid option at all, since discogs.pl will grab it from your selection.

If you want to map the 'artist' key to Album Artist, then just change the single artist field entry in the config file.   It won't work to add additional Field entries with identical keys - only the last one would be in use anyway.  So, change the existing:

   Field:  artist          = Artist

to:

   Field:  artist          = Album Artist
Logged
The opinions I express represent my own folly.

jctcom

  • Citizen of the Universe
  • *****
  • Posts: 690
  • Rush - Styx - Yes - Porcupine Tree - Staple Food!
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #38 on: March 02, 2014, 01:15:55 am »

Cool.  So then I could run it as a batch file once I've added the discogs ID?

I think since the Artist Field is usually correct at the time I am tagging I might just go ahead and change the artist to my "album artist" field.

So can you get this to read my mind and fill out all my other custom fields!?  lol

Carl.
Logged
Carl's Music: https://cloud.clz.com/jctcom/music
Carl's Movies: https://cloud.clz.com/jctcom/movies

Some of Carl's Equipment:  Yamaha RX-A2A, i7-11700K, 128GB, PCIe X4 2TB M.2 SSD, GTX-970, SMSL DL200

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #39 on: March 02, 2014, 01:22:22 am »

Right, a batch file would work fine.

I'm working on the --mindread option.
Logged
The opinions I express represent my own folly.

jctcom

  • Citizen of the Universe
  • *****
  • Posts: 690
  • Rush - Styx - Yes - Porcupine Tree - Staple Food!
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #40 on: March 02, 2014, 02:56:26 am »

I get confused about "Publisher", "Copyright" and "Label".

Recently I had made a decision for my database to use the definitions as listed on Discogs.  But they seem to be different on different sites.  However the "Label" is usually pretty consistent.

I noticed that you seem to pull the "Label" into the "Publisher" field.  Are they generally considered the same?  Because they are not always listed the same on Discogs.  I think I may even have created my own "Label" field because I don't think it existed.

For instance on this release:  http://www.discogs.com/Jimi-Hendrix-Blues/release/2521556

Where the label is "Classic Records" and the Publisher is listed as "Experience Hendrix, L.L.C.".

In this particular case I know it would not pull the Publisher per say because it is in the "Notes" and not in the Credits spot but I have seen others that list the Publisher in the credit's spot and it is not the same as the "Label".

I guess what I am wondering is on Discogs when there is a proper listing for "Publisher" under the Credits section does the "Publisher" field not have a separate designation from the "Label" field?

Thanks.

Carl.

Logged
Carl's Music: https://cloud.clz.com/jctcom/music
Carl's Movies: https://cloud.clz.com/jctcom/movies

Some of Carl's Equipment:  Yamaha RX-A2A, i7-11700K, 128GB, PCIe X4 2TB M.2 SSD, GTX-970, SMSL DL200

jctcom

  • Citizen of the Universe
  • *****
  • Posts: 690
  • Rush - Styx - Yes - Porcupine Tree - Staple Food!
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #41 on: March 02, 2014, 03:45:42 am »

Hi MrC.

I think I have discovered an issue for Multi-Disc albums where they have headers included headers included such as this one:

http://www.discogs.com/Jimi-Hendrix-And-Gypsy-Sun-Rainbows-Live-At-Woodstock/release/2562147

The headers seem to be imported as track titles.

Carl.
Logged
Carl's Music: https://cloud.clz.com/jctcom/music
Carl's Movies: https://cloud.clz.com/jctcom/movies

Some of Carl's Equipment:  Yamaha RX-A2A, i7-11700K, 128GB, PCIe X4 2TB M.2 SSD, GTX-970, SMSL DL200

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #42 on: March 02, 2014, 05:49:21 am »

However, I find it faster to select all the tracks, get the release ID, and add that value to the selected files in MC.  Then, you don't need the --rid option at all, since discogs.pl will grab it from your selection.
So could I use MC's send to external with no parameters i.e. no [filename]. I would just select the files and send to external which would launch the bat file
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72436
  • Where did I put my teeth?
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #43 on: March 02, 2014, 07:28:41 am »

Right, a batch file would work fine.

I'm working on the --mindread option.
The delay is unacceptable.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #44 on: March 02, 2014, 12:57:07 pm »

I get confused about "Publisher", "Copyright" and "Label".

Recently I had made a decision for my database to use the definitions as listed on Discogs.  But they seem to be different on different sites.  However the "Label" is usually pretty consistent.

I noticed that you seem to pull the "Label" into the "Publisher" field.  Are they generally considered the same?  Because they are not always listed the same on Discogs.  I think I may even have created my own "Label" field because I don't think it existed.

Copyright is a legal concept that determines the ownership rights of a work.  Only the Copyright holder has the authority to define how a work may be used, published, modified, etc.  I see no practical value in capturing and saving this value into MC.

Label is the name of the company that has been given the rights to recreate and mass-produce a copyrighted work.  The label company may change one or more times over the life of a copyrighted work.   This field (along with the release date) is useful to capture, as it helps identify the specific release of the work, especially since over time the work may be released in many different forms of packaging and variations in content.  Unfortunately, label companies get consumed by other label companies, and the same packaging release may have two different label names.

Publisher is not so clear to me in the context of music releases.  Since works are primary identified by label and catalog number, it seems not important.  Given the dearth of publisher information in discogs releases, it seems unimportant to others as well.

I used the Publisher field in MC, because there is no stock Label field.  You are free to configure your own field name in the config file.

For instance on this release:  http://www.discogs.com/Jimi-Hendrix-Blues/release/2521556

Where the label is "Classic Records" and the Publisher is listed as "Experience Hendrix, L.L.C.".

In this particular case I know it would not pull the Publisher per say because it is in the "Notes" and not in the Credits spot but I have seen others that list the Publisher in the credit's spot and it is not the same as the "Label".

Media companies are very interested in getting their names stamped on everything they can, usually with no practical consumer benefit or value.

I guess what I am wondering is on Discogs when there is a proper listing for "Publisher" under the Credits section does the "Publisher" field not have a separate designation from the "Label" field?

You can map the credits to whatever field you want.  Since Publisher is being used by default for the label, you might not want to use that field (or change the label mapping).  I configure the credits mapping for publisher to 'ignore'.
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: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #45 on: March 02, 2014, 12:57:45 pm »

Hi MrC.

I think I have discovered an issue for Multi-Disc albums where they have headers included headers included such as this one:

http://www.discogs.com/Jimi-Hendrix-And-Gypsy-Sun-Rainbows-Live-At-Woodstock/release/2562147

The headers seem to be imported as track titles.

Oh, that's a curious one.  I'll take a look and post an update as soon as I can.
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: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #46 on: March 02, 2014, 01:03:05 pm »

So could I use MC's send to external with no parameters i.e. no [filename]. I would just select the files and send to external which would launch the bat file

I replied to the same basic question in #8 above.  MC's Send To calls the external program for EACH track.  It does not operate in a batch mode.  So, for a 16 track selection, MC will call the program you've defined 16 times, regardless of what parameters you supply in your Send To command.  Now, if MC had a Send To Batch command, that would be different.
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: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #47 on: March 02, 2014, 01:07:39 pm »

The delay is unacceptable.

I'm fired.
Logged
The opinions I express represent my own folly.

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #48 on: March 02, 2014, 01:20:04 pm »

I replied to the same basic question in #8 above.  MC's Send To calls the external program for EACH track.  It does not operate in a batch mode.  So, for a 16 track selection, MC will call the program you've defined 16 times, regardless of what parameters you supply in your Send To command.  Now, if MC had a Send To Batch command, that would be different.
Ok thanks and sorry, should have read your previous answer more carefully.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: discogs.pl: a Discogs metadata scraper and dummy file creator
« Reply #49 on: March 02, 2014, 01:37:45 pm »

Hi MrC.

I think I have discovered an issue for Multi-Disc albums where they have headers included headers included such as this one:

http://www.discogs.com/Jimi-Hendrix-And-Gypsy-Sun-Rainbows-Live-At-Woodstock/release/2562147

The headers seem to be imported as track titles.

Carl.

Ok, here's your update (unzip and replace discogs.pl).  I was not aware that the tracklist might contain type = 'header' information, so this is ignored now.  I can see this information might be useful; we'll see if anyone wants it.
Logged
The opinions I express represent my own folly.
Pages: [1] 2 3   Go Up