caleb531/play-song

playplaylist doesn't list Apple Music playlists

Closed this issue · 22 comments

spott commented

I can't play playlists that were created by apple music. They don't show up in the search.

Hi, @spott. I have not used Apple Music before, but I have started a free trial so I can help fix this issue.

I am not too familiar with how creating an Apple Music playlists works, so I will need your help. I tried creating a new playlist from a song in Apple Music, but I can still play it from Alfred.

screen shot 2016-10-07 at 12 26 51 pm


screen shot 2016-10-07 at 12 27 44 pm

What steps should I take to create an actual Apple Music playlist so I can reproduce this issue?

Thanks,
Caleb

spott commented

Go to "browse", "curated playlists" and add one of them to your library (click on the title of the playlist , then in the next screen "add to library")

Here is a link to a playlist: https://itunes.apple.com/us/playlist/onerepublic-essentials/idpl.89286092fbd6403d8ed3a35a66ee9fbe that you can add to skip some of the steps.

These show up in your library on the left hand side under "apple music playlists"

Let me know if I can help anymore.

I think I got it, actually: ;)

screen shot 2016-10-07 at 1 46 58 pm

Anyway, I believe I have implemented the proper fix for this issue, and so I have attached the patched release of the workflow below. I'd like your feedback on it before I push an official release (i.e.* does this fix the issue for you).

Thanks,
Caleb

Play Song v4.3.0-beta.2.alfredworkflow.zip

spott commented

Awesome, it works!

That was quick.

I'll let you close this when you merge the changes.

spott commented

i may have spoken too soon... It appears only a few songs get played. 3 songs were added to the playlist, rather than the whole playlist.

spott commented

Give me a few hours to check... I'm not sure what is going on.

I actually experienced the same anomaly in my testing—when I chose to play "OneRepublic Essentials" via playplaylist, all songs were queued originally, but a moment after the first song started playing, the rest disappeared from the list.

spott commented

Yea, I'm getting similar issues. It changes with the playlist. "Trance Essentials" empties the playlist (and stops the song) soon after it starts, "Daft Punk Essentials" loses 3 songs from the list, going from 12 to 9. "Disclosure Essentials" drops down to 3 songs (from 13).

That is very weird...

Alright, let's try a few things:

  1. Delete the "Alfred Play Song" playlist and let Play Song recreate it when you run playplaylist
  2. If that doesn't fix the sporadic playlist behavior, trythis third beta of the workflow. I made a few tweaks to how playlists are dealt with, though I admittedly don't know how much they will help. I am currently at the second song of the OneRepublic playlist, and all the other songs are still there, so maybe something I did fixed it.

That's all I have to suggest for now.

spott commented

I deleted the playlist, and tried, and it still collapsed down to a only a few songs.

I then installed the new beta, and tried again, and it collapsed down to only a few songs.

I then tried to delete the playlist, and tried again (this time with the new beta), and the same problem happened...

This was all with the disclosure essentials playlist.

I see. Maybe you need to restart iTunes? I restarted at least once since investigating this issue, and I'm already into the third song of the "OneRepublic Essentials" playlist without issue. I know correlation doesn't imply causation, but it's worth a shot if you haven't done so already.

spott commented

That might have fixed it... I'll be let you know in a few hours, less if it comes back :).

spott commented

Almost!

I tried queuing another playlist after the one that I was listening to, and there is weirdness happening. It appears the same songs that were left over the last time are available in the playlist.

Now it is back to the old behavior, even when I'm not queuing playlists. And deleting the playlist and restarting itunes isn't fixing it anymore (I have also restarted alfred, but that didn't have an effect).

let me know if there is anything I should try.

Hmm, maybe you could try signing out of your iTunes account, restarting iTunes, and signing in again?

spott commented

I can give that a shot. I'll try later however, I have some work I need to get done right now.

spott commented

So, I tried to sign out, restart itunes, and then sign back in, and that didn't fix it. I'm not sure what else to try. Any Ideas?

I don't have many more ideas. As far as I can tell, it's definitely an iTunes bug. The only idea I have left is to modify your copy of Play Song directly so that a chosen playlist is played directly (i.e. without copying its contents to the Play Song playlist and playing that).

spott commented

That sounds like it will work for the moment. Where should I look to make that modification?

On second thought, you don't need to modify Play Song yourself. I've decided to make you a custom build of Play Song (since I was going to add similar functionality anyway—this custom build is only slightly different).

Please let me know how it works for you.
Caleb

Play Song v4.3.0-custom.alfredworkflow.zip

spott commented

Thanks! That is working well. I'll try to keep an eye on the iTunes bug, and
see if it ever fixes itself.
-Andrew

@spott I am reopening this issue because I have identified the root cause of the disappearing-Apple-Music-playlist issue.

You can follow #49 for updates (though I'll notify you here when the fix is ready).

@spott I just pushed out the fix, but I realized that since the original issue (not listing Apple Music playlists) has already been fixed, this issue should remain closed. Discussion of your successive issue (unable to play Apple Music playlists) now belongs in #49.