Questions tagged [mpmediaquery]

A media query specifies a set of media items (instances of MPMediaItem) from the iPod library by way of a filter and a grouping type. Filter and grouping type are both optional; an unqualified query matches the entire library.

A media query specifies a set of media items (instances of MPMediaItem) from the iPod library by way of a filter and a grouping type. Filter and grouping type are both optional; an unqualified query matches the entire library.

170 questions
2
votes
1 answer

Get Album titles for indexed uitableview using MPMediaQuery in swift?

I'm finding the deeply nested structure of the MPMediaQuery difficult to navigate. I'm trying to get the title(s) of albums for each Section to display in an indexed UITableView. The basic query and code to get all albums: let myQuery:MPMediaQuery =…
wayneh
  • 4,393
  • 9
  • 35
  • 70
2
votes
1 answer

Is it possible to access music downloaded via Apple Music?

I'm able to access the music that is downloaded on my iPhone THAT I PURCHASED before Apple Music existed. However, I can't seem to find the URLs of the songs that I've downloaded through Apple Music. Does anybody know anything about Apple Music when…
swiftyboi
  • 2,965
  • 4
  • 25
  • 52
2
votes
1 answer

Get all songs from music library on iOS

I am writing small app that can play music. To get all songs I am using code below var songsArray: [MPMediaItem] = [MPMediaItem]() var mediaQuery = MPMediaQuery() songsArray = MPMediaQuery.songsQuery().items as [MPMediaItem] for songItem in…
metal_man
  • 580
  • 1
  • 9
  • 22
2
votes
1 answer

MPMusicPlayerController doesn't skip to the next item automatically after using a predicate

i'm developing a music player app.I have a tableView that contains the songs names of the ipod library.My problem is that when i select a cell it plays a specific song but when that song is completed it doesn't skip to the next item…
2
votes
1 answer

MPMediaQuery playlistQuery with iCloud filter predicate returning incorrect number of items in a collection

I've successfully filtered out all items in the iCloud for every part of my app except the playlists. Upon showing the list of playlists, there is a sub-header inside each cell which reads the number of tracks in that playlist. The problem is that…
sooper
  • 5,991
  • 6
  • 40
  • 65
2
votes
1 answer

Problems with MPMediaQuery and iTunes Match

I need to display a list of all of the playlists currently on the device. The problem is, on a device with iTunes Match turned on, any number of playlists could have zero items saved on the phone. Since (as far as I can tell) there's no reliable way…
fritter
  • 23
  • 3
2
votes
2 answers

Search for multiple types with MPMediaPropertyPredicate

I have the following: MPMediaPropertyPredicate *titlePredicate = [MPMediaPropertyPredicate predicateWithValue:textString forProperty:MPMediaItemPropertyTitle …
daihovey
  • 3,485
  • 13
  • 66
  • 110
1
vote
1 answer

Get unique artist names from MPMediaQuery

I am using MPMediaQuery to get all artists from library. Its returning unique names I guess but the problem is I have artists in my library like "Alice In Chains" and "Alice In Chains ". The second "Alice In Chains" has some white…
Akash Malhotra
  • 1,106
  • 1
  • 17
  • 30
1
vote
1 answer

iOS query audiobooks in iPod library grouped by book

I'm trying to replicate the iOS music app's audiobook functionality. I want to query all audiobooks in the iPod library. It shouldn't show each individual part but should show each book. Tapping a book should then show the parts inside it. I've…
Christian Schlensker
  • 21,708
  • 19
  • 73
  • 121
1
vote
1 answer

UILocalizedIndexedCollation - MPMediaQuery

The following code, is used to partition and add sections to a list of songs. query = [MPMediaQuery songsQuery]; [query addFilterPredicate: artistNamePredicate]; NSArray *itemsFromArtistQuery = [query items]; …
topLayoutGuide
  • 1,407
  • 11
  • 22
1
vote
2 answers

Getting the most played track out of the iPod library (MPMediaQuery)

I need to get out the 25 most Played Songs out from my iPod Library with my iPhone app. i am using a MPMediaQuery. One solutions would be to loop through all tracks and them comparing by MPMediaItemPropertyAlbumTrackCount. But i think thats a bit…
grobald
  • 155
  • 2
  • 14
1
vote
3 answers

Text overlays the box in mobile view, how can i implement Media Query in my Code?

I tried different Ways to implement Media Query or other Options to to adjust the Size of the Font to fit the View to different Devices but I'm an absolute Beginner who threw together a few Codesnippets. Please help me to adjust the Code so that it…
1
vote
1 answer

Problem: resize of elements with "onclick" function at certain screen width

I would need some help regarding media queries applied to javascript. Is it possible to resize an object starting from the javascript code with a screen width other than the "default" one? Example: I have a button, and when I click on it, it opens…
Internetto
  • 11
  • 1
1
vote
1 answer

Widget change only in Main page

I'm trying to add some margin on a Widget, but I want this to apply only on main page(html.site-main) and only on specific pixels. I guess I should use a media query.I searched for others with the same question but there was not any with the same…
1
vote
1 answer

Splitting a row of tabs in the Navigation Bar at the top of the website into 2 rows

I am a coding noob here so I really appreciate any help that I can get here. So I am coding a website and I have a navigation bar at the top of my website. This is the code.