1

I need to implement this functionality.Help me.I don't wan to showing up the downloaded songs in my App.And I'm getting the some songs names like "url format".How to detect that one.Thanks.

playlistsQuery = [MPMediaQuery playlistsQuery];
    playlists = [playlistsQuery collections];
    NSArray *playlistsss = [myPlaylistsQuery collections];
    for (MPMediaPlaylist *playlist in playlistsss) {
        NSLog (@"%@", [playlist valueForProperty: MPMediaPlaylistPropertyName]);
        NSArray *songs = [playlist items];

        for (MPMediaItem *song in songs) {

            NSString *songTitle =[song valueForProperty: MPMediaItemPropertyTitle];
            NSString *str_artistName =[song valueForProperty: MPMediaItemPropertyArtist];
            NSLog(@"teh artist name is --->%@",str_artistName);
            playlists=[song valueForProperty: MPMediaItemPropertyTitle];
            NSLog(@"the songs titles---->%@",array_playList);

        }
    }
Ravikumar
  • 85
  • 1
  • 16
  • Do you mean by "downloaded", the one in the cloud? – Larme Sep 23 '14 at 16:30
  • Thanks for replay.Yes,but some songs names getting like "URL Format[http://downloadedsongs/examplewebsite.com/]"how to detect that one.If I click that song App will be crashing. – Ravikumar Sep 23 '14 at 16:37
  • help me please I'm waiting for your answer. – Ravikumar Sep 23 '14 at 16:38
  • For the on in the cloud: http://stackoverflow.com/questions/14490120/problems-with-mpmediaquery-and-itunes-match/14571663#14571663. For the other ones, I don't know where is "URL Format" exactly in the name. – Larme Sep 23 '14 at 16:39

0 Answers0