Hey, this is Karlheinz, author of the Discogs module.

I just found out about your module. I haven't downloaded it yet, but it seems to do exactly the same thing as Discogs, except with the Spotify API.

One of the things I was planning to do with D7 Discogs is make it more of a "discography framework," and each third-party API would simply be a plug-in to that framework. This would be incredibly useful for people like you, who would not have to code everything from scratch.

I've been communicating with the author of Pushtape to see if we can come up with some kind of standard for this. I'd like to get you on board too, if you're up for it.

Here are links to the relevant issues in our queues:
#1409724: having nodes for each individual song
#1413612: Create an Entity Adapter for Pushtape Discography
#1193186: Support for alternative data sources
#1226226: Importing/exporting discography

CommentFileSizeAuthor
#6 discog_spotify.zip5.63 KBKarlheinz

Comments

peter törnstrand’s picture

That sound interesting. Let me take some time to have a look at your module and then I'll get back to you.

alpp’s picture

any update on this issue?

peter törnstrand’s picture

I'm sorry @alpp, I haven't had the time to look at this. I'm afraid I won't have any time to work on this until later this year. I'm focusing on work now until I go on a three month vacation :-)

Karlheinz’s picture

FYI, I have now finished the API for Discogs 7.x (which I am calling the Discography Framework), and this can import releases from Spotify (or anywhere else).

Details about writing adapter modules are at this handbook page:
Developing Modules for the Discography Framework

However, you don't even have to do that, because I've already coded a module that acts as an adapter for Spotify. It's mostly finished - there are still some minor bugs to work out (mainly regarding territories), and I have to see how to get images.

There is, quite obviously, a lot of overlap with your module. I noticed that you already have a "modules" sub-folder that includes the "spotifyfield" module. Do you think it would be a good idea to make the module I coded part of this project?

If so, I will have to do a minor re-write to follow your standards, but that should be a day's work at most. (And it will save a lot of work in the future.)

If not, I will have to release it as a stand-alone module. I would prefer to have it all together in one project, though.

EDIT: I also wrote a module that integrates Discogs 7.x with Pushtape, so you including my Spotify adapter would allow that integration as well.

peter törnstrand’s picture

Sound to me that the Spotify module should be apart of the Discography module, not the other way around? Or am I missing something? I'll be glad to merge the Spotify module with your Discography module if you think that would be apropriate.

Karlheinz’s picture

StatusFileSize
new5.63 KB

Sound to me that the Spotify module should be apart of the Discography module, not the other way around? Or am I missing something?

From a programming perspective, there's a lot of repeated code. Also, there are certain things (e.g. images and Amazon) that have to be handled in a way specific to Spotify, and that I don't know how to do.

From a user's perspective, I think it would make more sense to have everything Spotify-related be in a single Spotify module.

I'll be glad to merge the Spotify module with your Discography module if you think that would be apropriate.

The choices are to distribute it with Spotify (merged or not), or to have it be on its own, as a completely independent module in its own namespace. It will not be distributed with Discogs either way. You are probably a bit confused (and I don't blame you) because the Discogs 7.x version is no longer limited to the Discogs.com website, nor to specific content types (e.g. it can import releases into Pushtape too).

There's actually an issue about whether to break up Discogs into different projects because of this. Love to hear your opinion on that, if you want to weigh in.

...But for the immediate future, it seems like I should at least re-write the code such that it uses Spotify's functions, and make Spotify a dependency.

EDIT: Yeah, after having dug into your code to see where the overlap is, I realized that I pretty much re-wrote spotify.api.inc from scratch. My module, however, queries for JSON, not XML. There are a few things in my code that I think are handled better (of course I do...), and I'd like you to take a look at it before I do anything.

Just so you'll see what I'm talking about, I'm including the module as it stands so far. Hope a ZIP archive is OK.

peter törnstrand’s picture

Ok, now I understand. I will take a look. I'm afraid I can't give you any promises as to when I will be able to do this however as I don't have much spare time to put into this module.

peter törnstrand’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)