ITunes API & querying lists of artists

I'm trying to build an interface similar to the iPod's, where you can group by artist, album, genre, etc. I can't seem to find any existing method in the SDK for doing this. I'm starting to suspect I'm gonna have to do this by querying the library XML file with some twisted XPath. Are there any other options?

Yeah, you're probably going to have to use the XML file.
Good luck....you seem to have a sense of 'twisted Xpath' humor...welsome to these boards!

Similar Messages

  • How do I change my iTunes library from albums listing alphabetically back to artist listing alphabetically.  Before the last update to iTunes, everything was listed by artist, now it all is listed by album name.  I can't find a way to return it to artist

    Before the latest update to iTunes, everything was listed by artist.  All albums by the same artist were listed together.  Now they are all separated by the name of the album instead of the artist.  How do I return to the other format?

    Are you viewing it in Artist view or Album view? In Album view, it should still list albums by artist name, then album name. If you're in Album view, you might be looking for Artist view.

  • Howto handle persistence API query result list

    Hello.
    I need some advice on how to handle a persistence API query result List since the Object variable returned by the "list.get(i)" method cannot be cast to an EntityClass declared by the EntityClassManager.
    The piece of code below might help you understand my exact problem.
    EntityManagerFactory emf = Persistence.createEntityManagerFactory("SporTakipPU");
    EntityManager em = (EntityManager) emf.createEntityManager();
    Query q1 = em.createQuery( "SELECT d.id, d.date, c.name, c.sirname FROM Log d, Kisi c WHERE d.id = :id AND c.id = :id" );
    q1.setParameter( "id", argument );
    List logList = q1.getResultList();
    Log log = (Log) logList.get(1);
    In this code i cannot cast Object to Log in the last line. Apparently this has something to do with the query.
    Trying to solve this problem i declared two private string variables name and sirname and their set and get methods but this didn't help.
    Thanks...

    Entity Class : ReportView
    ===================
    @Entity
    @Table(name = "dummy")
    public class ReportView implements Serializable {
    @Id
    @Column(name = "id", nullable = false)
    private Integer id;
    // getter , setter
    SessionBean : ReportSessionBean
    ==========================
    public List<ReportView> getReports() {
    Query q = em.createNativeQuery("SELECT ID FROM REPORT", ReportView.class);
    List<ReportView> r=(List<ReportView>)q.getResultList();
    return r;
    JSF / Back Bean : ReportBackBean
    ==========================
    public class ReportBackBean {
    @EJB
    private ReportSessionRemote reportSessionBean;
    /** Creates a new instance of ReportBackBean */
    public ReportBackBean() {
    public List<ReportView> getReports() {
    return reportSessionBean.getReports();
    JSF
    ===
    <f:view>
    <h:dataTable value="#{ReportBackBean.reports}" var="report" border="1">
    <h:column>
    <h:outputText value="#{report.id}"/>
    </h:column>
    </h:dataTable>
    </f:view>
    Regards,
    Telman
    ..

  • I use an iPod nano 5th generation. I have had it for 2 years now and then after about a year when I plugged in my iPod to my computer, the iPod is read but the tab where I would always go that showed my list of artists to sync to my iPod does not show up

         I use an iPod nano 5th generation. I have had it for about two years now and after about one year, I plugged in my iPod into my computer to sync more music. Here is the problem: The tab where you go to sync music to your iPod and shows the list of artists and songs you want to sync to the iPod, the tab I can get to but the list of songs and artists does not show up and the only way I can sync music to my iPod is to basically wipe my iPod and start from scratch. Obviously, I do not want to do that because I do not have all the songs in my library that I have on my iPod. I have uninstalled iTunes and then re-installed it, but it did not work and I do not know what else to do. I would really appreciate helpful guidance to get it fixed if it can be fixed. Thanks in advance

    http://support.apple.com/kb/TS1591
    There have been some problems accessing pages on the Apple web site.  If the hyperlink gives you a "We're sorry" message, try again.

  • How do I get all the songs from an album to show in the album view?  Currently, if an album lists the artist plus a guest artist, those are shown separately and appear to be two different albums on my iPod.  How do I get all the songs on that album togeth

    How do I get all the songs from an album to show in the album view?  Currently, if an album lists the artist plus a guest artist, those are shown separately and appear to be two different albums on my iPod.  How do I get all the songs on that album together on my iPod?  If the album is a collaboration wtih many artists, each sond may appear as a separate album.

    I used to have this problem.
    First, you need to go back on iTunes
    you need to go to each of the songs that are having this problem
    Click the album so all the songs drop down
    Right click the songs that have this problem
    Click ' Get info '
    Click the tab that says " info '
    The box that says ' album artist ' should probably be empty (correct me if I'm wrong)
    Click it and type the artist of the entire album, NOT the songs guest artist
    as such,
    ARTIST
    JAY-Z Feat. Justin Timberlake
    ALBUM ARTIST
    JAY-Z
    These should be separate for each artist
    If you write the same album artists for each song by that artist, all the songs should be on 1 album

  • Artist not showing in list of artists

    I know the artist (Toto) is on my IPOD but it doesn't show in the list of artists. Why does it do this?

    Hello there,
    It may be listed as part of a compilation in iTunes then.
    To change this, locate and highlight all the songs in the missing album and right-click and choose *Get Info* from the menu. From there, make sure there is no check mark next to "Part of a compilation", which can be found in the lower right hand corner of the Info tab. Then hit OK and re-sync the updates to your iPod and see if that helps.
    B-rock

  • ITunes 9 sorting Album by Artist shows multi-cd albums out of order now

    Hello,
    This has worked before in every version of iTunes I have used. iTunes 9 now lists my multi-cd albums' tracks out of order. For instance, it lists them as track 1 of disc 1, then track 1 of disc 2, then track 2 of disc 2.
    It used to list them correctly as Disc 1 of 2, track 1-x and then disc 2 of 2, track 1-x, in that order. Why did they break a perfectly good thing?
    I use 'list view' and sort by 'Album by Artist', anything else my my huge library just slows it to a crawl.

    I'm in the same boat. I always use Album by Artist.
    My work around for now is to add the Album Artist field to the library list and sort on that field. It seems to work ok.
    I'm able to edit my post ok here.
    I see that my solution only works if I've put in the album artist. Other wise, they go to the obttom of the list as "Unknown". This shines a spotlight where I haven't put in Album Artist so I will now work on cleaning that up.
    I hope they can fix this quickly.
    Message was edited by: AardvarkPrime

  • Printing List of Artists then Albums

    Some time ago, I was able to obtain a nice list from iTunes of artists, followed by their albums.   I am using iTunes 11 under OS 10.6.8, and I suspect this was an earlier version of iTunes.  The format was:
    Artist Name
         Album 1
         Album 2
         Album 3
    Next Artist Name
         Album 1
         Album 2
    No songs.  No time length.  Nothing else.
    This gave me a nice compact listing.
    When I go to File/Print and select "Album List", then "List of Albums", I get way more information than I need, plus each artist is repeated over and over again, with lots of room between each line.   The result is far too large an output.
    I suspect I exported something before, perhaps to Word or Excel.  But the Export option appears to have been removed from iTunes 11.
    Anyone have any ideas how to get what I am looking for?

    As I see it you have a few possible options…
    See if dougscripts can help http://dougscripts.com/itunes/scripts/ss.php?sp=makeatextlist (there probably are other scripts on there that may help - search for 'export' on the site - some others are mentioned at Parsing iTunes XML).
    Parse the .xml into the fields you desire (probably via a Python script or similar). I suspect there will be something around if you are willing to search & try running them. This should give the best output but may take some work.
    Parse the output of a directory listing (assuming iTunes manages the location of the media), the next commands will create a list based on the folder structure of the iTunes Library - it does not list compilations correctly, you will need to handle them separately. This may not be what you want, especially if you want a subset of the library.
    cd  ~/Music/iTunes/iTunes\ Music/Music
    find . -type d -maxdepth 1 -exec find {} -type d -mindepth 1 \; | sed -e 's|./||' -e 's|/|    |'
    NOTE: You may need to provide a different path to the music folder, mine has been migrated over many years & may not be the same as yours (drag & drop to get the Terminal to auto fill correcting any spaces in the path).
    It outputs like …
    A Tribe Called Quest    The Anthology
    Add N to (X)    Add Insult to Injury
    Add N to (X)    Avant Hard
    In short it finds folders one level deep, then inside those find the next folder names and parse out the leading './' and convert the next slash to 4 spaces.
    You may want to change the spaces to commas so you can import to a spreadsheet, however that will need careful handling when Albums or Artists contain commas.
    This next one is cleaner, again run it from inside the music folder
    cd  ~/Music/iTunes/iTunes\ Music/Music
    ls */ | sed -e  '/^$/d' -e 's/\(.*[^/\:]\)$/     \1/'   -e 's|\/\:||'
    It looks more like your original aim
    Orbital
         Blue Album
         In Sides
         Orbital II
    Orchestral Manoeuvres in the Dark
         Peel Sessions 1979-1983
    Hope that's some food for thought.

  • List All artists....please?

    Hey.
    Great as it is to now have all my music on one little player why does some of iTunes seem less organised or adaptable than my old phone's music interface?
    Is there any way I can get iTunes to list all the artists seperately, including those that appear on compilations, in the 'Artists' column?
    That would be a start and then I'll move on to why does it break up albums that are by the same artist but may 'feature' another on some songs?
    Thanks.

    Is there any way I can get iTunes to list all the artists seperately, including those that appear on compilations, in the 'Artists' column?
    *Edit > Preferences... > Advanced*, remove tick from *Group compilations when browsing*.
    <hr>
    *HowTo: Grouping Tracks Into Albums*
    Excuse the long post, but hopefully covering all the bases (that I can think of) will help you fix the other issues you are likely to run into as you try to organise your iTunes library.
    *Use an album friendly view*
    iTunes will let you sort music on many columns, some of which are unlikely to group albums together or put the tracks in their normal order. The most useful order for editing the library is probably *Album by Artist*. If you're not already there, select the list view and click on the column heading for Artist until it reads Album by Artist.
    *One cover, too many tracks*
    The iPod (and iTunes to a lesser extent) conflates two or more albums with the same title, most obviously with *Greatest Hits*. On the iPod this can result in one album acting as a combination of two or more. Selecting any cover gives all the tracks of all albums with the same title. The workaround for this "Greatest Hits" bug is to give each album a unique title - I tend to go for *Album - Album Artist* as this reads clearly in the iTunes browser. Alternatively you could use the wording as it appears on the cover or append different numbers of spaces for each different album. Somewhat oddly, setting different values for Sort Album doesn't work.
    *Album not with others by same artist*
    iTunes relies on the Gracenote CDDB database when identifying CD's. This often marks collections or anthologies of an artist's work as a compilation. In iTunes, however, the compilation flag has the logical function of grouping together tracks with the same album name, but different artists on each track, e.g. "Now That's What I Call Metal 666!". These compilations are then all grouped together at the end of cover flow. Most of us however, would expect "Greatest Hits" albums to be listed with the other albums by the same album artist. For albums which are essentially by a single album artist or group it is best to set the appropriate value for the album artist and clear the compilation flag.
    *One album, too many covers*
    For true compilations, where each track is by a different artist, the answer is to set the compilation flag to true and enable the iTunes preference to *Group compilations when browsing*. Otherwise tracks which list guest artists will be treated as separate items. Filling in the Album Artist field is enough to link things in iTunes. Sadly, however, the iPod ignores the Album Artist field when grouping albums so this is only a partial solution. You can simply mark the entire album as a compilation which seems to be the way iTMS handles it, however that's not an ideal fix. Short of waiting for Apple to address this issue (and as far as I can tell it goes back to the 1st gen. of iPods) we need a workaround. What I do is to put any additional artist info. in square brackets after the song name. E.g. *Track \[Feat. Guest\]* and then set *Artist=Album Artist* for each track. For anthologies where the Album Artist is credited as part of another group, e.g. for Cream tracks on an Eric Clapton anthology, I use *Track \[As Group\]*. For a track where the main Album Artist doesn't receive a credit, e.g. the first track of the Slim Shady LP credited to Jeff Bass, I just set the track name to *Track \[Guest\]* while still setting the artist to the album artist. N.b. I use square brackets to indicate this is not part of the actual song title and also use this style for Mix/Live/Bonus info.
    *One album, still too many covers*
    iTunes may split albums into two or more sections if some tracks from the album have different values for Artist, Album Artist, Album, No. of Discs or Part of a Compilation. Tiny differences such as trailing spaces, accented characters or variants of symbols can sometimes be quite hard to spot. The iPod is also more sensitive to case variations and may split or reorder an album that looks okay in iTunes. Normally overtyping the desired value for each shared field will complete the grouping of the album into one entity. Occasionally, however, this method seems to fail. When this happens I've found that you can force every field to update properly by adding some extra text - e.g. a trailing X, which once applied seems to complete the joining of the tracks into one album. Once this has happened the extra data can be removed and the album should remain properly grouped.
    *Tried that, there are STILL too many covers!*
    The Sort Artist, Sort Album & Sort Album Artist fields can be used to override the normal sort order. For example iTunes automatically drops leading articles (a/an/the) so "The Beatles" are arranged under "B" instead of "T". Occasionally different tracks from the same album can have different values in these sort fields which can also break up the grouping. Making the sort columns visible in iTunes can help with spotting & correcting such problems.
    *One cover for multi-disc album*
    Multi-disc albums are often listed as *Album (CD1)* for CD 1, *Album (CD2)* for CD 2 etc. To display these properly using just one cover, each disc should have the correct *Disc X of Y* values set, and then the entire album should be given the single title Album. Being somewhat obsessive I also renumber the tracks sequentially, working backwards from the last track (so that no two tracks ever have the same number) until I reach disc 1. BTW You can still give the individual discs different artwork should it be relevant so that the correct artwork will be displayed as the album progresses.
    *One artist, many names*
    With some artists, particularly classical composers, you should be aware of alternative representations of their names. E.g. 2Pac vs. Tupac. The menus will work best if for each artist you standardise on just one form of their name. E.g. make a choice between Mozart, W.A. Mozart or Wolfgang Amadeus Mozart, and then apply it consistently. For classical music I tend also to use the Composer as the Artist & Album Artist and either discard the performer details or place these into the Comments field.
    tt2

  • REST API Query for file Versions - current version

    Hi,
    I have referred to the list of API query options from this link:
    https://msdn.microsoft.com/en-us/library/office/dn450841.aspx .
    As described in the post, the query  goes as below
    url: "<app web url>/_api/SP.AppContextSite(@target)/web
        /getfilebyserverrelativeurl('/Shared Documents/filename.docx')/versions
        ?@target='<host web url>'",
    This does not return the current file version details. Is there a way to get those details in the same query or should we place another query to get the current version file details as below
    url: "<app web url>/_api/SP.AppContextSite(@target)/web
        /getfilebyserverrelativeurl('/Shared Documents/filename.docx')
    Thanks,
    Meena

    Hi Meena,
    In FileVersion endpoint, it will only return the old versions of a file.
    If you want to retrieve all versions(including) of a file, there will be a need to run another request for the current version only, though which might cause extra workload.
    Thanks
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Export list of artists and their albums?

    I am trying to export a list of artists and albums on my classic. I can find the Library/Export Library to xml which is way more data than I need in a format I don't, and the Library/Export Playlist to txt which is also way more data and in such an unformatted manner I don't know how to use it.
    Is there a way to just get a list of the Artists and which Albums are in iTunes? Either by using the methods above in some way you'll need to explain, or another way?
    Thank you.

    I figured out how to bring the txt into Excel and clean it up so it only has what I want.

  • ITunes API returning incorrect price

    Hello,
    I've discovered some inconsistencies when it comes to collection pricing being returned by the iTunes Search API.
    As an example, I'm searching for The Blacklist using the iTunes API in the AU store with the following parameters: http://itunes.apple.com/search?term=the%20blacklist&country=AU  The results being returned are:
    "collectionPrice":71.76, "trackPrice":2.99, "collectionHdPrice":83.76000, "trackHdPrice":3.49000
    Note that the price being returned for the whole season is AU$71.76
    But when I access the actual iTunes website though the link provided in the search result (https://itunes.apple.com/au/tv-season/pilot/id686768825?i=710673278&ign-mpt=uo%3 D4), the price being shown for the whole season is AU$44.99.  http://puu.sh/bpjjY/4db69f3a13.png
    Those prices are a pretty different! Am I missing something here?  Maybe collection price isn't the same as the season price?  Help would be appreciated!
    Thanks,
    - Ken

    I'm having exactly the same problem!
    Really frustrating. I hope someone here can shine some light on this as it seems too fundamental to be a bug:
    loads of people must share this requirement for a list of only audio tracks...
    **EDIT**
    Seems like we've been wasting our time on out of date documentation
    If you check this out - http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web- service-search-api.html
    Seems like you need to use &entity=song instead of &entity=musicTrack
    It states:  Please note that "musicTrack" can include both songs and music videos in the results

  • ITunes missing from Media Browser -- "open itunes to populate list"

    I am on a MacBook Pro 10.7.3 running GarageBand '11 6.0.4 and all of the sudden no tracks will display under Audio in the Media Browser (Photos and Movies still appear). No tracks from either iTunes or GB show up. This is confusing as I have been using GB to make podcast/music mixes for more than 5 years and I haven't changed any settings or done anything different, but now I get the message "open itunes to populate list" or "To see GB songs here, open GB to edit and save your music."
    Also, for quite some time I have been unable to go the alternative route of dragging tracks directly from iTunes and dropping them on to the timeline in GB -- that used to work, but mysteriously stopped, so I am dependent on the Media Browser for importing music.
    I read thru the forums and tried the advice given to someone this was happening to in Final Cut -- recreating iTunes .xml file. Did that, still no tracks display.
    Other advice says to reinstall GB or iLife altogether -- I hope to avoid this, but if I need to go this route, how do I reinstall GB w/o a disk? Can I do it through App Store and will it recognize that I have already purchased it?
    I am dying to be able to get back in to my music mix making in GB, so thanks in advance.

    moontroll wrote:
    unable to go the alternative route of dragging tracks directly from iTunes {...} I am dependent on the Media Browser for importing music.
    another way:
    http://www.bulletsandbones.com/GB/GBFAQ.html#importfromitunes
    (Let the page FULLY load. The link to your answer is at the top of your screen)
    moontroll wrote:
    how do I reinstall GB w/o a disk?
    you can't, you'd need to find the DVD
    moontroll wrote:
    Can I do it through App Store and will it recognize that I have already purchased it?
    no, it'll only recognize your purchase if it was through the app store

  • Hi I do not want iTunes to open up automatically when I turn on my macbook pro.  I tried going to System Preferences Users and Groups Login Items and then I took iTunes off the list but it still opens up automatically when I turn on my laptop.

    Hi I do not want iTunes to open up automatically when I turn on my macbook pro.  I tried going to System Preferences>Users and Groups>Login Items and then I took iTunes off the list but it still opens up automatically when I turn on my laptop. What should I do?

    Hi r,
    Make sure you close iTunes before shutdown.  And you're quite welcome.

  • I have DELETED calendars showing in my iTunes Sync Calendars list!?

    iMac late 2009
    OSx 10.10.2
    iPhone 6 Plus
    iOS 8.1.3
    Completely Up to Date!
    no clouds involved, no calendar subscriptions.
    I have had a major problem with my Calendar's calendars, which I have completely repaired using Calendar.  During that process, I had to rename a number of calendars in order to keep track of what I was doing - an intermediate diagnostic step.  Once I'd gotten everything right, exported all the "good" calendars to .ics files, and deleted ALL CALENDARS - both the good ones and the intermediately named ones -  then imported the .ics files back into Calendar... leaving me with ONE FULL SET OF CLEAN CALENDAR data.  When I open Calendars on my mac, I see 33 calendars listed on the left side of the window.
    My problem now that I'm ready to put my calendars back onto my phone, is that my Calendars Library (library/calendars) still has many of the intermediate calendar files (that have NOT been DELETED) and in iTunes, the list of Calendars includes all these same intermediate calendars, as well as the new calendars that I want to transfer to my phone.  I would prefer to "select" "ALL CALENDARS" but I can't do that until I can remove the calendars that were supposed to be deleted/removed in the first place.  In other words, I have 33 good, clean Calendars, but there are 71 Calendars in my Calendar Library.
    What are the correct steps to remove the Library/Calendars folder so that the iTunes "Sync Calendars" list only shows the 33 good calendars, and not the 38 unwanted (deleted) calendars.
    What do I have to do to finish the job?

    I have/had the same problem. I tried deleting all the "Library" "Calendar" preference files I could find and like others nothing worked. Like others they would just recreate themselves.
    BUT, I did find the solution. Not sure which part worked, but this is what I did.
    I quit all the apps, Calendar, and iTunes.
    I went into the folder pointed to by job-seeker above:
                   <user>
                   Library
                   Containers
                   com.aple.CalendarAgent
                   Data
                   Library
                   Calendars
    Manually went through each cached calendar folder and looked in the info.plist for the calendar title listed below "<key>Title</key>" and deleted the parent folders of no longer existent calendars.
    Then find an app called "Reminders", open it and you will find all the deleted calendars that you have deleted over the years, they seem to get cached in it, delete them and quit.
    Relaunch iTunes and find the deleted calendars in question are gone.
    I think you could skip all the above and just try deleting the old calendars from this Reminder app and it may work, but the above is what I did when it worked for me and I do not want to recreate the problem just to verify my theory. ;-)
    Hope this helps,
    Michael

Maybe you are looking for