New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cd number to album model #286

Closed
adamcik opened this Issue Dec 20, 2012 · 6 comments

Comments

3 participants
@adamcik
Member

adamcik commented Dec 20, 2012

Our current model for albums has no good way of storing metadata for multi cd albums. Having a field for cd number and number of cds might be enough

This is somewhat related to #263.

@jodal

This comment has been minimized.

Member

jodal commented Dec 20, 2012

Something like Track.disc_no and Album.num_discs, to be exact? Maybe default both to 1?

On a related note, I haven't found anything on how libspotify handles multidisc albums. Anybody got an example album I can look at?

@adamcik

This comment has been minimized.

Member

adamcik commented Dec 20, 2012

I would default to None as most of the time we don't really know anything about this. I imagine cases where this also might not make sense.

@trygveaa

This comment has been minimized.

Member

trygveaa commented Dec 21, 2012

@jodal: Tracks in libspotify have a disc number associated with them which can be retrieved by sp_track_disc(track) in libspotify or track.disc() in pyspotify. However this number doesn't seem to be initialized until you do an albumbrowse on the album the disc is in.

I did this test:

  • Lookup track by url.
  • Wait until track is loaded.
  • Check disc number, it was 0.
  • Get the album the track is from.
  • Check that the album is loaded (it wasn't necessary to wait).
  • Call sp_albumbrowse_create on the album.
  • Check disc number, it was 0.
  • In the albumbrowse callback, check disc number on the same track object. This time it was correct.

It also doesn't seem to be possible to get the number of discs an album consist of, other than by traversing all the tracks and checking the highest disc number.

The example album I used was spotify:album:3LymDdEISKszJqeN2z9DBI.

@jodal

This comment has been minimized.

Member

jodal commented Jan 7, 2013

Fixed by #315.

@jodal jodal closed this Jan 7, 2013

@adamcik

This comment has been minimized.

Member

adamcik commented Jan 7, 2013

What about actually populating the field? Could you open an issue for that if we don't have one. And then there is the other issue of tricking mpd into understanding this by using say '%d%02d' %(disc_num, track_num)

@jodal

This comment has been minimized.

Member

jodal commented Jan 7, 2013

Opened #317 and #318.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment