Start a playlist with a script #834
Replies: 10 comments 49 replies
-
@heinzma Thanks for this. This is helpful to see other examples and I see this showed up under discussions in GitHub. I think the most helpful is to see your script and then hope I can find my paths to the said playlist. The script step I looked at late yesterday asked for a URI and I assumed it was a "pathname,playlistname" This was helpful to set me off trying things on my own. Very much appreciate your taking the time. Rich |
Beta Was this translation helpful? Give feedback.
-
Is this really the easiest way to programmatically call a playlist? How is it even possible to know what playlist corresponds to which number without using the automation ui? Music Assistant has a lot of promise but the documentation is a bit lacking making it hard to figure out how to do things programmatically. |
Beta Was this translation helpful? Give feedback.
-
Maybe we should better document the "mass.queue_command" service as it is way more easier to use than the builtin services. For example you can simply start a playlist by name instead dof having to lookup the id. BTW: Next version will also accept the filepath as item_id |
Beta Was this translation helpful? Give feedback.
-
Hi, I wasnt able to get this to work, So i created playlist and i'm able to play it through MA.
But the script does nothing, it only says "playlist name triggered" This is the trace :
|
Beta Was this translation helpful? Give feedback.
-
Can someone help me to convert this service call to use with MA?
|
Beta Was this translation helpful? Give feedback.
-
Is this still somehow possible with music assistant v2? Thanks for your hard work guys, its much appreciated! |
Beta Was this translation helpful? Give feedback.
-
I'm using v2023.1 I copied the script from Buster14 in the comments above and changed it for my instance. (code below). When I run this script from an automation I get an unknown media source error. I have only 1 playlist and the playlist and all mp3 files are in the local media folder. I can however play the playlist from the web interface on the selected device. Any help greatly appreciated. Great product Script
this is the automation
and this is the script
I've also tried running the script directly without the automation and I looking in the mass folder under custom components I'm not seeing anything one other thing - I'm not seeing the mass.queue_command in the list of services |
Beta Was this translation helpful? Give feedback.
-
So what is currently supported way to do it in v2? I am getting unknown media source using following in b32.
|
Beta Was this translation helpful? Give feedback.
-
I have installed the latest beta through Hacs. service: mass.queue_command I get this error when I run the script: What have I made wrong? |
Beta Was this translation helpful? Give feedback.
-
This is mostly outdated info. See the docs https://music-assistant.io/faq/how-to/ |
Beta Was this translation helpful? Give feedback.
-
As ask by @Bachigaloupe in #820 (comment).
I can start playlists with a script just fine.
When using the UI, to create the script, use Action type: "Play media" and make sure to choose "Music Assistant" -> "Playlist" when picking the media. NOT "Local Media" -> "...".
You can also use Action type: "Call Service", Service: "Media player: Play media". Content ID:
media-source://mass/database://playlist/X
. X is a number 1, 2, 3, ... the number seems to corresponds to the order in which the playlists were created.Beta Was this translation helpful? Give feedback.
All reactions