WordPress.org

Ready to get started?Download WordPress

Forums

iTunes/Amazon Now Playing List... (23 posts)

  1. gbarber
    Member
    Posted 9 years ago #

    I recently found this: http://www.quietconfusion.com/2003/07/blogtunes/
    I'm trying to figure out how to implement this into WordPress. I've seen an Amazon plugin for WP, so this shouldn't be that difficult. I'm going to try and work on it and maybe if anyone else finds it to be an interesting project, they can post their results here.

  2. davidchait
    Member
    Posted 9 years ago #

    Let me know if you need any help. It'd be fairly easy to have a script for CG-Amazon which is the thing pinged with the iTunes update information, locates the right Amazon product, and flags it in the database. Then the pageload code could display the flagged entry(ies).
    -d

  3. gbarber
    Member
    Posted 9 years ago #

    Any help would be appreciated. I've got this: [http://wiki.wordpress.org/Display%20current%20iTunes%20Track%20info] running on my site. I installed the Kung Tunes software and have it running in the background, so my iTunes tells Kung Tunes what's playing and then it drops that information on my site. You can see what it's doing here: http://www.playswellwithothers.net, right side, near the bottom.
    So what I'd like it to have a link to iTunes and Amazon so people have the option of downloading or buying the song... and if I can have my Amazon ID in there that's even coolor. At this point, I've got my wishlist and need to figure out how to make it happen. So, any help would be greatly appreciated.

  4. davidchait
    Member
    Posted 9 years ago #

    Yeah, this can be done, likely using something close to what he was doing with MT.
    The problem I encountered was trying to do an Amazon search with the current (remix) title you had on your site. I had to strip out the parenthesized part, and nuke the ampersand, and THEN amazon fed me the right album. Well, or at the least, the remix-single album ISN'T up there... ;)
    I can definitely see ways to feed this to CG-Amazon, but I'm trying to come up with a way to encode the search term so that I can cache the result and not continuously re-search for it...
    -d

  5. davidchait
    Member
    Posted 9 years ago #

    By the way, CG-Amazon can already show items from your wishlist just fine (or any other items), let you show selected items from a custom database you build up ('what I'm reading'), and can be set up with your amazon assoc ID.
    -d

  6. gbarber
    Member
    Posted 9 years ago #

    I've posted this in the cg-amazon thread, but I've installed it in my 1.2 install and it's giving me an error when I try to add an item.
    As soon as I enter an ASIN and hit the add button, I get this message:
    Fatal error: Call to undefined function: stream_set_timeout() in /Users/gbarber/Sites/pwwo/wp/cg-plugins/XMLParser.php on line 61

  7. davidchait
    Member
    Posted 9 years ago #

    Yeah... I apparently have a host (and local) PHP version that supports a lot of newer stuff.
    Try changing that line to:

    if (function_exists('stream_set_timeout')) stream_set_timeout($fp, 7); // 7 sec timeout...

    For the moment, that'll fix it.
    I'll go update cg-feedread and cg-amazon with the correct longer workaround...
    Thanks for the heads-up,
    -d

  8. somefool
    Member
    Posted 9 years ago #

    a nice itunes 'now playing' app that uses images is nowplaying.
    you can see it in action on my blog http://www.somefoolwitha.com

  9. gbarber
    Member
    Posted 9 years ago #

    Awesome David... works like a charm. It's a bit of learning curve coming from MT to WP, but so far I'm liking WP much better. They had me at "you don't have to rebuild every time".

  10. davidchait
    Member
    Posted 9 years ago #

    And "you had me at 'Awesome'". ;)
    Looks nicely integrated.
    Hey, you gonna start using it at digink too? ;) The wishlist function is nice...
    Lemme know if you find any missing features!
    Back to the now-playing thing, Recent Tunes also looks promising. I'll look at it as well, as better to have one backend solution that supports multiple client interfaces (it'll be a script that can be passed one or more artist/song/album combos, and store it for retrieval by the 'plugin' part).
    -d

  11. davidchait
    Member
    Posted 9 years ago #

    Just found a 'tracking' applet for Windows iTunes:
    http://www.itunesblogger.com/wiki/wakka.php?wakka=HomePage
    I have a much-modified script, that should work with anything that can do a URL post.
    And I have rudimentary album lookup working. I just have to figure out how to properly clean up the results, and cache the whole thing so it only looks up again on significant changes.
    -d

  12. davidchait
    Member
    Posted 9 years ago #

    Okay, making decent progress. I have 'CG-WhatTunes', that can pull data from my new tracktunes.php script (an offshoot of some sample code from Recent Tunes), and manage CG-Amazon lookup calls and displaying the results.
    Getting the song name displayed is a bit hard, due to the nature of how CG-Amazon works. I may write a completely custom lookup, but trying to extend the CG-Amazon system to do things, well, 'better'. It was actually easy one I realized that I had to change all the spaces in the 'keyword' string to %20's all over the place. (Don't know if there's an encoding function I've yet to find in PHP...).
    I might have it together in the next day or two. It'll require a newer version of CG-Amazon as well, which might be the new Plugin-ready version.
    If you want the iTMS link as well, that's going to be later on... ;)
    -d

  13. gbarber
    Member
    Posted 9 years ago #

    Wow. Thanks for putting so much work into what I thought would be an easy little script. I can't wait to see what you come up with.

  14. davidchait
    Member
    Posted 9 years ago #

    It's almost ready. Need to make a plugin stub, test it in 1.2, and finish my cleanup (and plugin stubbing) for CG-Amazon and CG-Referer, AND finish testing my major overhaul to a custom-coded URL/HTTP retriever (so I can actually set timeouts so amazon doesn't hang a page for too long...).
    Spent the entire day writing the new HTTP code: who knew that XML feeds come in so many different forms, that HTTP has about 4 different ways it can be packaged (not including compression!), and that WordPress actually generates 'bad RSS2 HTTP' encoding by my 'strict' interpretation of the spec. So I had to 'loosen' my code so that all the WP feeds will still work... ;) AND deal with Redirects! Oh joy.
    -d

  15. davidchait
    Member
    Posted 9 years ago #

    hi all. Quick update. I've spent the last few days now COMPLETELY changing all of my core code over to plugins, and holding off on a release of CG-WhatTunes until everything is stable (since it depends on CG-Amazon, which depends on XMLParser...etc.).
    Anyone looking to be an early guinea pig? ;) It'll require at least CG-Amazon and CG-WhatTunes plugins (CG-Amazon is the real beast...).
    The current version (fluctuating as we speak) uses a keyword search based on a stripped down artist-name + album-name string. It caches it, so you'll only get the amazon lookup hit once in a (default) 24h period per-album. Pretty nice. Next is going to be looking up to see if the album is IN your CG-Amazon database already, and if so pull out any annotations from the database (WHEEEEE!).
    -d
    CHAITGEAR

  16. davidchait
    Member
    Posted 9 years ago #

    Scratch that. ALREADY have the annotation-thing working. So if you have it in your custom amazon list already, and have given it an annotation/note, it'll display it automagically. Gotta love when all my code starts working well together. ;)
    -d

  17. gbarber
    Member
    Posted 9 years ago #

    Cool. I'll be a guinea pig when you're ready for some testing. :)

  18. Anonymous
    Unregistered
    Posted 9 years ago #

    I think it'd be better if it grabbed the images from allmusic.com rather than amazon. Their database is a whole lot bigger.

  19. davidchait
    Member
    Posted 9 years ago #

    Amazon.com has a free API for accessing their information and generating links. I've yet to see another site provide the same. And that isn't a 'gray area' database of album art/scans...
    -d

  20. davidchait
    Member
    Posted 9 years ago #

    See my main post at http://wordpress.org/support/10/8615 -- I've put out a single mega-archive with all my plugins, that includes CG-Amazon and CG-WhatTunes inside. Documentation is lacking at the moment -- wanted to get it out there and THEN deal with helping folks with it. ;)
    -d

  21. davidchait
    Member
    Posted 9 years ago #

    Just a quick update -- after many requests, and seeing how sucky other options were, I'm implementing a little Win2K/XP tray applet that in combination with the new WMP blogging plugin will do HTTP POSTs to your webserver, so you can use WMP9 on XP/2K and have CG-WhatTunes code do all the work to show the current song and Amazon link and album cover, etc.
    -d

  22. davidchait
    Member
    Posted 9 years ago #

    and I got it working the other night... pretty cool. Far from bullet-proof, but enough to give it to a select few testers to try out. Let me know if you use the PowerPack, and WMP, and would like to give it a spin.
    -d

  23. kahuna01
    Member
    Posted 8 years ago #

    Hi guys.

    I am currently running wpitunes from lucky-33.com in my site, and it's pulling the itunes "now playing" data and displaying the album art where applicable.

    I would like to extend this somehow and create a list of other products related to the artist being played.
    I have the XML link and have tested it with my associate id and keywords, and it pulls out the correct data, but I have no idea how to display it so that it uses the keyword in wpitunes and outputs a list of products.

    Does anyone have anything like this? Or any help would be greatly appreciated! Cheers! :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.