Re: [mb-users] Track duration is None
Johannes Dewender <[email protected]> Wed, 17 Apr 2013 03:11:17 +0200
| Newsgroups | gmane.comp.audio.musicbrainz.user |
|---|---|
| Message-ID | <3453548.PKuV6Pxgda@haljo> |
Am Dienstag 16 April 2013, 18:29:57 schrieb Jeffrey Barish:
> Here's what I came up with:
>
> releases = m.get_releases_by_discid("<discid>",
> includes=['recordings'])
>
> duration =
> releases['disc']['release-list'][0]['medium-list'][0]['track-list']
> [i]['recording']['length']
>
> where i is the track index. Also,
>
> ttitle =
> releases['disc']['release-list'][0]['medium-list'][0]['track-list']
> [i]['recording']['title']
>
> It's a far cry from release.tracks[i].duration, but at least I'm not
> getting CDStubs anymore.
>
> BTW, how to a modify the above if I *do* want CDStubs?
Hm, currently with python-musicbraiz-ngs you will never get cdstubs,
because they are not considered "valid elements".
I opened a bug report:
https://github.com/alastair/python-musicbrainz-ngs/issues/99
There should be some way to get them.
--
JonnyJD
_______________________________________________
MusicBrainz-users mailing list
[email protected]
http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-users
signature.asc
(application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEABECAAYFAlFt9rgACgkQaDBIOMxoZgdrZgCgz5QpNsRHa4KBX4xN8L+aBkpA GaoAnijBtxJS89P8rxyqdZvaWVuhrIl3 =ngxJ -----END PGP SIGNATURE-----