Apple Music URL Scheme - url-scheme

I need to know the URL Scheme of Apple Music to open a specific song. Up to now I was using the link like this:
https://itunes.apple.com/us/album/monsieur-cousteau/id496076893?i=496076903&uo=4
That link, was working perfectly in iTunes Store, but now is not working any more. That's because the link is opened by Apple Music, and it seems to work because it opens the album, but not the specific song.

The structure of the links has changed there is now a flag in there for the open method:
iTunes:
https://geo.itunes.apple.com/au/album/monsieur-cousteau/id496076893?i=496076903&app=itunes
Apple music:
https://geo.itunes.apple.com/au/album/monsieur-cousteau/id496076893?i=496076903&mt=1&app=music
Note the app= at the end
There is a link generator here: https://tools.applemediaservices.com/ but I would imaging that you are generating these from your own log of apple ID's yes?
Also you will need to change the store, I am /au/ because I am in australia, these links don't always automatically forward the user and can give "Not available on your store" errors.
To get to a specific track you use this:
https://itunes.apple.com/au/album/monsieur-cousteau/id496076893?i=496076903&app=itunes&ign-mpt=uo%3D4#
Note the change in uo part, I am not sure how this particular part is generated as I got out of the industry a year ago but there is more information here: https://www.apple.com/itunes/affiliates/resources/documentation/tools_en.html unfortunately being I no longer work in the industry I am not classed as an affiliate any more.

Related

Trying to connect "favorite" pages to member profiles

Ok so - I recently started a business and have to be frugal this first year. I reached out to several developers but I just don't have the funds to pay for this at the moment. I'm alright with code - as long as I have a base or snippet to go off of. So this is what I need to build:
I currently have a website built for my students. In it, they have their own personal "member" page. On my website, I have about 300 different pages (with unique URLs) that they use to study content from. What I would like to do is make it to where they can add "favorites" to their member page and it automatically drops the link of that favorited URL into the correct category. For example:
Say a student wants to favorite "Types of Clouds" which is in the category of "Weather Theory" - they can click a button on the "Types of Clouds" page which will automatically add the link of that page to their favorited section of their member page under the correct category of "Weather Theory." It would look something like this once they have a few favorites:
Username Study Guide
Category: Weather Theory
Types of Clouds <--clicking on that would take the student to the saved page
Storms
Fronts
Category: Weather Tools
Forecasts
Winds Aloft
I think I may need to build some sort of database, but I have no idea. Any ideas of where to even begin? Thanks for reading!

Sonos Api: Is there a way to understand which Sonos favorite is playing?

I want to understand which favorite playlist is currently playing on my Sonos speaker.
I've tried the following options:
There's no favorite ID in playbackMetadata and in playbackStatus. So, matching with favorite ID doesn't work
There's containerId in playbackMetadata, which sort of gives information about provider-specific playlist identifiers. Yet, there's no same identifiers in getFavorites response. So, matching containerId won't work either.
Tried loadingFavorite (both with and without playOnComplete set), then getting playbackMetadata in order to build a mapping of favorite ID to containerId. No luck either. Even with 2s delay between two calls to give some space for favorite to be loaded, playlistMetadata returns old containerId (or it might be new, only it doesn't get changed for a new favorite).
Is there a straightforward option? Or not that straightforward, but working?
It is not possible, at least at the UPnP level. When a Favorite is submitted for playback, nothing is included that would allow tracking it back to its origin.

Set the company name - itunes connect

I recently added a new app to itunes connect (haven't uploaded yet) and as I saw in few videos and tutorials I should be able to set the company name once I'm trying to add the app. This option simply haven't be offered to me. How can I set the company name now? Was there any change in the apple developers tools?
Looks like it's not possible anymore to set a company name when using Personal Developer Program. I've search on apple developers forum and found this:
...For a personal account, your developer name on the store is always
your name. (It didn't used to be, in the early days of the app store,
but it is now.) For a company account, it's always the legal name of
your company...
What a pitty!
link: https://devforums.apple.com/message/907715#907715
It's never been possible to add a company name for a personal user account.
In case your account is a company account, then, the first time you create an app, iTunes Connect lets you choose the company name that will be displayed forever more.
You may found the documentation from Apple here, at the end of the page (Setting Your Company Name section).

Detecting iTunes playlist folders on a device

Through iTunes, you can create playlist folders that are nested arbitrarily deep. When you copy those playlist folders to your iOS device, iTunes is able to detect that they're folders, and allows you to drill down to the point where you ultimately get songs. Any idea how they do that?? I've been trying to figure this out for days.
When I query for a specific persistentID of a known folder, the only things I can see about it that are different from a playlist that contains songs are:
playlist.mediaTypes = 4359 (this is
Music|Podcast|Audiobook|Movie|VideoiTunes) whereas a normal playlist
will not mix audio types and video types
value for property
MPMediaPlaylistPropertyPlaylistAttributes contains 2
(MPMediaPlaylistAttributeSmart), whereas a normal playlist contains 0
the item count will be equal to the total number of items on the
device
But, that's it! I don't see any way to get at the sub-folders. Or, when interrogating a playlist or subfolder that's contained within a folder, I don't see any way to tie it to the parent.
Apple does it in iTunes, so there must be a way. Are they using some private API?
There are the following undocumented properties that can get you what you are looking for using MPMediaPlaylist's valueForProperty method: #"isFolder", and #"parentPersistentID".
Note, these are not documented and do not appear in any header files, so use of them might be considered use of a 'private API' according to Apple's application submission rules.
I've opened a bug report to Apple asking that those be made available in header files, and also asking to clarify whether they are considered to be part of a private API.

YouTube API: How can I get the date/time in which a user marked video as favorite?

I'm accessing the feed of a user's favorite videos through the YouTube API. How can I get the date/time in which he marked each video as favorite?
Update:
Someone pointed out that the YouTube API documentation says that the "Published" date on a user's favorite feed will have the time in which the user marked the video as favorite. But that seems to be false.
For example, check out this video entry:
http://gdata.youtube.com/feeds/api/videos/g2981r_MtHQ
It has a "published" date of 2008-03-19T21:09:09.000Z.
Now let's see the same video in the favorite feed of some user:
http://gdata.youtube.com/feeds/api/users/KeepWatchingTheSkies/favorites
It has a "published" date of 2008-03-19T21:09:09.000Z. Identical.
Here is a different way to get the favorites feed:
http://gdata.youtube.com/feeds/base/users/KeepWatchingTheSkies/favorites
And still we have a "published" date of 2008-03-19T21:09:09.000Z.
Assuming the user was not quick enough to favorite the video on the same millisecond it was published, what's written in the YouTube documentation is probably wrong, and this is not the time in which the user marked the video as favorite.
So my question is: How can I get the time at which a user marked a video as favorite?
I figured it out: The URLs must specify ?v=2 so version 2 of the API will be used.
Here's the fixed URL:
http://gdata.youtube.com/feeds/api/users/KeepWatchingTheSkies/favorites?v=2
Now it shows a correct "published" time of 2010-09-03T08:59:53.000Z.
It's easy.
The <published> tag in a favorite
videos feed entry identifies the time
that the video was marked as a
favorite and not the time that the
video was published.
from http://code.google.com/apis/youtube/2.0/developers_guide_protocol.html#Favorite_Videos