Querying for ipod library podcasts, and sorting them by author/title

136 views Asked by At

I´v got these two methods that fetches the contents of the iPod library for me. I am still not proficient with the use of these classes. For example now I will get the podcast title of all the podcast in the library, but if I want to set up predicate and query to get the individual podcasts for the author/podcast title how would I do that.

/* Delegate
 * Set which media type to get */
- (MPMediaPropertyPredicate *)mediaTypeToFetchFromiPodLibrary: (AbstractTVC *) sender;
{
     MPMediaPropertyPredicate *abPredicate =
     [MPMediaPropertyPredicate predicateWithValue:[NSNumber numberWithInt:MPMediaTypePodcast]
     forProperty:MPMediaItemPropertyMediaType];
    return abPredicate;
}


/* Overriden abstract method from subclass
 * */
- (MPMediaQuery *)setMediaQueryOptions: (MPMediaQuery*)abQuery
                         withPredicate: (MPMediaPropertyPredicate*) abPredicate
{
    [abQuery addFilterPredicate:abPredicate];
    //[abQuery setGroupingType:MPMediaGroupingAlbum];
    [abQuery setGroupingType:MPMediaGroupingPodcastTitle];
    return abQuery;
}
0

There are 0 answers