ios - MPMedia Query to filter playlists for songs not working -


I am trying to retrieve the playlist on iOS, but to remove any non-music content it was the original code, Which was returning some video items. MPMediaEizine * query = [[MPMDIECTIC ALLOCK] INIT]; [Query addFilterPredicate: [MPMDAPPropertyPrintEdview: _playlistIdentifier forProperty: MPMediaPlaylistPropertyPersistentID]]; [QuerySetSumming Type: MPMIDMplayplaylist];

So I changed it to:

  MPMediaQuery * query = [[MPMDIActic alloc] init]; [Query addFilterPredicate: [MPMDAPPropertyPrintEdview: _playlistIdentifier forProperty: MPMediaPlaylistPropertyPersistentID]]; [Query addFilterPredicate: [MPMDAPPertyDPDITED WITH VALYUE: [NSNumber NumberWithIntagger: MPMDiIPIP Music] For Property: MPMITTOPPartemediaType]]; [QuerySetSumming Type: MPMIDMplayplaylist]; However, no luck - one of our customers, who have video on the playlist (which are not locally available, just on iCloud) are still complaining that they can watch the video. Is there any reason why these non-music files are not being removed from this query?   

As you mentioned in your question that the videos that are not available on that device but on iCloud Showing in archived playlists. Exclude Icod items can solve the problem. Therefore, by adding the filter as

  [query addFilterPredicate: [MPMediaPropertyPredicatePredicateVithValue: [NSNumber number is different: NO] for property: MPMediaItemPropertyIsCloudItem]];   

This will leave the iCloud item which is not yet available. Hope this will work.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -