Closed loretoparisi closed 8 years ago
Exactly what kind of support were you thinking? Subscribed playlists have always worked just like user created playlists.
@maddox ok maybe I'm wrong how it works then
var GetPlaylists = function() {
var itunes = Application('iTunes');
var status = {};
status.playlists = {};
var radioTunerPlaylists = itunes.radioTunerPlaylists();
var userPlaylists = itunes.userPlaylists();
var subscriptionPlaylists = itunes.subscriptionPlaylists();
var libraryPlaylists = itunes.playlists();
for(var idx=0;idx<userPlaylists.length;idx++){
var pl=userPlaylists[idx];
var sTracks = pl.fileTracks();
if(!sTracks) sTracks = [];
console.log( "Playlist " + pl.name() + " streaming tracks " + sTracks.length );
}
status.playlists.radio = radioTunerPlaylists.map(function(item,index) { return { name : item.name(), count : item.tracks().length } });
status.playlists.subscription = subscriptionPlaylists.map(function(item,index) { return { name : item.name(), count : item.URLTracks().length } });
status.playlists.user = userPlaylists.map(function(item,index) { return { name : item.name(), count : item.tracks().length } }); return status;
}
I have like
{
"playlists": {
"radio": [],
"subscription": [],
"user": [
{
"name": "Libreria",
"count": 11836
},
{
"name": "Musica",
"count": 11825
},
{
"name": "Videoclip",
"count": 2
}
]
}
}
So I do not see any tracks for itunes.subscriptionPlaylists()
Btw, If I add a AppleMusic playlist in user playlist, I can see it as part of itunes.userPlaylists()
.
With
iTunes 12.4
Apple has introduced new playlists from Apple Musicsubscription playlist
- more details here:Is possible to add support for it?