Welcome Guest

Pages: 1
Inconsistent values for "Discogs Release Ordinal Position"
spatulaPostAugust 8, 2017, 04:00
Newbie
Posts: 3
Registered:
August 8, 2017, 06:43
Normal topicInconsistent values for "Discogs Release Ordinal Position"

Hi,

I've been using Yate for a while now, but I haven't had time to dive into Actions until just a few days ago. I really appreciate this functionality. It's saving me a ton of time.

I assembled a batch action that imports metadata from Discogs. It reads the Discogs Release Id value from the parent folder/directory (e.g. "Donovan;1969;2422420" where "2422420" is the release id). It reads the disc and track numbers from the file name ("DD-TT Title.flac", where DD and TT are the zero-padded disc and track numbers respectively).

From there it builds the values for the Track Position and Discogs Release Ordinal Position fields. The track position value seems to have two variants.

Take the case of the first track in an album:
1. Track Position = 1, for a single disc release
2. Track Position = 1-1, for a multi-disc release

I thought I'd figured out the pattern for the Discogs Release Ordinal Position field. Initially I constructed these values as "track number minus one" for disc one, and "sum of track counts of previous discs, plus track number of current track, minus one" for subsequent discs in the release.

For example:
1. Disc one, track three -> Discogs Release Ordinal Position = 2
2. Disc two, track 2 -> Discogs Release Ordinal Position = 3 (assuming disc one has exactly two tracks)

But now I'm finding that it's not that simple with multi-disc releases. For example:

These two multi-disc releases follow the above pattern (start counting from zero and end at "release track count minus one"):
1. 6097171 (Ministry - Twelve Inch Singles)
2. 4147144 (Can - The Lost Tapes)

And these two multi-disc releases are exceptions to the above pattern:
1. Release 6451663 (William Onyeabor), which has 37 tracks, starts at Discogs Release Ordinal Position = 1 for track one, and skips a few numbers along the way so that it ends up at ordinal position = 45 for the 37th track.
2. Release 1195635 (Vangelis - Blade Runner Trilogy), which has 36 tracks, starts at ordinal position = 1 for track one, and also skips a few numbers to end up at ordinal position = 38 for the 36th track.

My first thought is that there's inconsistent data in the Discogs database. But I'm not sure how to approach this issue with Discogs. I have not found any relevant information in their guidelines, or any way to edit the release ordinal position values on the Discogs site. The only way I'm aware that these ordinal position values exist is through the Yate application.

How would I describe these values to Discogs so that they understand what I'm referring to? I started looking at the Discogs API documentation, but there's a lot of information to sort through. Can you point me in the right direction?

2MR2PostAugust 8, 2017, 11:20
Avatar photo
Administrator
Posts: 2079
Registered:
August 23, 2012, 19:27
Normal topicRe: Inconsistent values for "Discogs Release Ordinal Position"

Hi, I'm answering this for the third time 🙂 I attempted to answer on my laptop earlier but twice I inadvertently lost all my text due to the damn TouchBar. I hate that thing!!!!!!!!!

Okay I've calmed down now:)

First off the Discogs Release Ordinal Position is a Yate-ism. It is a synthesized value used by Yate to make some sense of the textual representation of track positions in Discogs metadata. The Track Position UDTI contains the actual text returned by the Discogs API.

The Discogs guidelines for track positions can be found here:

https://www.discogs.com/help/database/submission-guidelines-release-trk

You really have to read it over numerous times to see the full intent. Tracks are not separate database entities in the Discogs database. When you get the information on a release the track listing contains headers, breaks, and other extra things as well as the track names. If the guidelines were followed by all, the parsing of the metadata would be easy. Unfortunately, there are numerous releases for which many track listings do not come close to the guidelines. There are pages of code in Yate to try and make sense of it... and even with that the track extraction will never be 100% correct. This stuff gets tweaked fairly regularly.

The two releases you note as being exceptions are actually well formed. So the question becomes "What did the software that created the 'DD-TT Title.flac' files do when extracting the information? Did it treat the headers as tracks? If you load these releases into Yate's Discogs Wizard you can see that the track breaks as displayed by the wizard correspond to the information as displayed on the Discogs site. Do the symbolic track positions on the filenames line up with the data as displayed on Discogs? I think not. For example on the Blade runner release you are starting at 1 because there is a header preceding the first track. You are more than likely off one more number at the end of disc 1 and again one additional number after disc 2. Each of these headers occupies a slot in the returned track list. At the end of this answer I've included the returned track listing for the Blade Runner release. BTW these headers can be imported as Media Sub-titles.

As I said, these releases are well formed. However, the ability to create the ordinal numbers from textual positions will be impossible if the data on the filenames is inaccurate... and can prove to be difficult even if it is correct. The Discogs data may be malformed (or at least not follow the guidelines).

As you have the release numbers you can always use the 'Discogs Metadata for Release' statement. This will give you all the metadata in all the tracks in a named variable which you can parse yourself attempting to make matches. I've done this a few times in the past. Extensive use of Dump Variable statements for debugging purposes will probably be necessary 🙂

I hope this makes sense.

Here's the track list dump for the Blade Runner release.

Release: 1195635
tracklist: Array[39]
tracklist: [0] Dictionary
tracklist: [0] type_: heading
tracklist: [0] title: Blade Runner 1994 Soundtrack Album
tracklist: [0] position:
tracklist: [0] duration:
tracklist: [1] Dictionary
tracklist: [1] type_: track
tracklist: [1] title: Main Titles
tracklist: [1] position: 1-1
tracklist: [1] duration: 3:42
tracklist: [2] Dictionary
tracklist: [2] type_: track
tracklist: [2] title: Blush Response
tracklist: [2] position: 1-2
tracklist: [2] duration: 5:47
tracklist: [3] Dictionary
tracklist: [3] type_: track
tracklist: [3] title: Wait For Me
tracklist: [3] position: 1-3
tracklist: [3] duration: 5:27
tracklist: [4] Dictionary
tracklist: [4] type_: track
tracklist: [4] title: Rachel's Song
tracklist: [4] position: 1-4
tracklist: [4] duration: 4:46
tracklist: [5] Dictionary
tracklist: [5] type_: track
tracklist: [5] title: Love Theme
tracklist: [5] position: 1-5
tracklist: [5] duration: 4:56
tracklist: [6] Dictionary
tracklist: [6] type_: track
tracklist: [6] title: One More Kiss, Dear
tracklist: [6] position: 1-6
tracklist: [6] duration: 3:58
tracklist: [7] Dictionary
tracklist: [7] type_: track
tracklist: [7] title: Blade Runner Blues
tracklist: [7] position: 1-7
tracklist: [7] duration: 8:53
tracklist: [8] Dictionary
tracklist: [8] type_: track
tracklist: [8] title: Memories Of Green
tracklist: [8] position: 1-8
tracklist: [8] duration: 5:05
tracklist: [9] Dictionary
tracklist: [9] type_: track
tracklist: [9] title: Tales Of The Future
tracklist: [9] position: 1-9
tracklist: [9] duration: 4:46
tracklist: [10] Dictionary
tracklist: [10] type_: track
tracklist: [10] title: Damask Rose
tracklist: [10] position: 1-10
tracklist: [10] duration: 2:32
tracklist: [11] Dictionary
tracklist: [11] type_: track
tracklist: [11] title: Blade Runner (End Titles)
tracklist: [11] position: 1-11
tracklist: [11] duration: 4:40
tracklist: [12] Dictionary
tracklist: [12] type_: track
tracklist: [12] title: Tears In Rain
tracklist: [12] position: 1-12
tracklist: [12] duration: 3:00
tracklist: [13] Dictionary
tracklist: [13] type_: heading
tracklist: [13] title: Blade Runner Previously Unreleased & Bonus Material
tracklist: [13] position:
tracklist: [13] duration:
tracklist: [14] Dictionary
tracklist: [14] type_: track
tracklist: [14] title: Longing
tracklist: [14] position: 2-1
tracklist: [14] duration: 1:58
tracklist: [15] Dictionary
tracklist: [15] type_: track
tracklist: [15] title: Unveiled Twinkling Space
tracklist: [15] position: 2-2
tracklist: [15] duration: 1:59
tracklist: [16] Dictionary
tracklist: [16] type_: track
tracklist: [16] title: Dr. Tyrell's Owl
tracklist: [16] position: 2-3
tracklist: [16] duration: 2:40
tracklist: [17] Dictionary
tracklist: [17] type_: track
tracklist: [17] title: At Mr. Chew's
tracklist: [17] position: 2-4
tracklist: [17] duration: 4:47
tracklist: [18] Dictionary
tracklist: [18] type_: track
tracklist: [18] title: Leo's Room
tracklist: [18] position: 2-5
tracklist: [18] duration: 2:21
tracklist: [19] Dictionary
tracklist: [19] type_: track
tracklist: [19] title: One Alone
tracklist: [19] position: 2-6
tracklist: [19] duration: 2:23
tracklist: [20] Dictionary
tracklist: [20] type_: track
tracklist: [20] title: Deckard And Roy's Duel
tracklist: [20] position: 2-7
tracklist: [20] duration: 6:16
tracklist: [21] Dictionary
tracklist: [21] type_: track
tracklist: [21] title: Dr. Tyrell's Death
tracklist: [21] position: 2-8
tracklist: [21] duration: 3:11
tracklist: [22] Dictionary
tracklist: [22] type_: track
tracklist: [22] title: Desolation Path
tracklist: [22] position: 2-9
tracklist: [22] duration: 5:45
tracklist: [23] Dictionary
tracklist: [23] type_: track
tracklist: [23] title: Empty Streets
tracklist: [23] position: 2-10
tracklist: [23] duration: 6:16
tracklist: [24] Dictionary
tracklist: [24] type_: track
tracklist: [24] title: Mechanical Dolls
tracklist: [24] position: 2-11
tracklist: [24] duration: 2:52
tracklist: [25] Dictionary
tracklist: [25] type_: track
tracklist: [25] title: Fading Away
tracklist: [25] position: 2-12
tracklist: [25] duration: 3:32
tracklist: [26] Dictionary
tracklist: [26] type_: heading
tracklist: [26] title: BR 25
tracklist: [26] position:
tracklist: [26] duration:
tracklist: [27] Dictionary
tracklist: [27] type_: track
tracklist: [27] title: Launch Approval
tracklist: [27] position: 3-1
tracklist: [27] duration: 1:54
tracklist: [28] Dictionary
tracklist: [28] type_: track
tracklist: [28] title: Up And Running
tracklist: [28] position: 3-2
tracklist: [28] duration: 3:09
tracklist: [29] Dictionary
tracklist: [29] type_: track
tracklist: [29] title: Mail From India
tracklist: [29] position: 3-3
tracklist: [29] duration: 3:27
tracklist: [30] Dictionary
tracklist: [30] type_: track
tracklist: [30] title: BR Downtown
tracklist: [30] position: 3-4
tracklist: [30] duration: 2:27
tracklist: [31] Dictionary
tracklist: [31] type_: track
tracklist: [31] title: Dimitri's Bar
tracklist: [31] position: 3-5
tracklist: [31] duration: 3:52
tracklist: [32] Dictionary
tracklist: [32] type_: track
tracklist: [32] title: Sweet Solitude
tracklist: [32] position: 3-6
tracklist: [32] duration: 6:56
tracklist: [33] Dictionary
tracklist: [33] type_: track
tracklist: [33] title: No Expectation Boulevard
tracklist: [33] position: 3-7
tracklist: [33] duration: 6:44
tracklist: [34] Dictionary
tracklist: [34] type_: track
tracklist: [34] title: Vadavarot
tracklist: [34] position: 3-8
tracklist: [34] duration: 4:14
tracklist: [35] Dictionary
tracklist: [35] type_: track
tracklist: [35] title: Perfume Exotico
tracklist: [35] position: 3-9
tracklist: [35] duration: 5:19
tracklist: [36] Dictionary
tracklist: [36] type_: track
tracklist: [36] title: Spotkanie Z Matka
tracklist: [36] position: 3-10
tracklist: [36] duration: 5:09
tracklist: [37] Dictionary
tracklist: [37] type_: track
tracklist: [37] title: Piano In An Empty Room
tracklist: [37] position: 3-11
tracklist: [37] duration: 3:37
tracklist: [38] Dictionary
tracklist: [38] type_: track
tracklist: [38] title: Keep Asking
tracklist: [38] position: 3-12
tracklist: [38] duration: 1:29

spatulaPostAugust 8, 2017, 12:38
Newbie
Posts: 3
Registered:
August 8, 2017, 06:43
Normal topicRe: Inconsistent values for "Discogs Release Ordinal Position"

I'm sorry to hear about the TouchBar trouble! Thank you so much for taking the time to write this thorough explanation (and for the shift-right-click tip on how to show the Discogs raw data).

I didn't consider the impact of the headers--- that's the trouble I'm running into. It's my process, not the Discogs data that's causing trouble. Again, you've saved me a ton of time.

My process for generating the the "DD-TT Title.flac" files consists of extracting CDs with XLD. In XLD, the only metadata I add to the tracks tags is the disc number. This is a manual step, but it's not a considerable effort since I'm already clicking around in the GUI.

So my process generates the correct track position values (e.g. track one on disc one is 1-1), but since it doesn't know about the headers (like the one at the beginning of disc one), it is unable to generate correct values for the ordinal position.

I appreciate your mention of the "Discogs Metadata for Release" statement. I've been using it in my batch action to save off a copy of the release metadata in a text file (for reference). I just read through it for the Blade Runner release that we've been discussing. I see what you're saying: the ordinal position values are given in the track list. I can definitely work with this in my batch action.

Again, thank you for taking the time to help me with this. You've saved me a lot of trouble.

By the way, would you ever consider allowing another type of matching for the "Access Discogs" function? I'm thinking about a variation of Release Matching that removes the requirement for the ordinal position values, but still imports the metadata that Loose Matching excludes.

2MR2PostAugust 8, 2017, 13:09
Avatar photo
Administrator
Posts: 2079
Registered:
August 23, 2012, 19:27
Normal topicRe: Inconsistent values for "Discogs Release Ordinal Position"

It's really the same problem. If I don't have the ordinal numbers I can't make a 100% accurate match of the tracks to the DIscogs list. I'm not much for guessing. Especially on multi-disc albums where the same title might appear on more than one track. I guess I could have an "I'm feeling lucky option" but I couldn't guarantee the results. The action statements all work correctly when not all the tracks are present. Guessing in this scenario is even worse.

I've uploaded an action I use to disassemble and display the results of a Discogs Metadata for Release or MusicBrainz Metadata for Release statement. It prompts for the ID but could easily be changed to be passed the data.

The action can be found at:

https://2manyrobots.com/actions/DumpMusicBrainzOrDiscogsMetadata.zip

You may find it useful 🙂

spatulaPostAugust 8, 2017, 14:00
Newbie
Posts: 3
Registered:
August 8, 2017, 06:43
Normal topicRe: Inconsistent values for "Discogs Release Ordinal Position"

I find it very useful--- thank you!

I thought about building a similar action (to make my metadata dump text files easier to read). I'll leverage your action to do that. And of course I can also leverage the ideas in that action to work around my ordinal release issues.

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.034 seconds.