1,192 bytes added
, 9 January
<pre class="header-style">This trigger fires when a media player app changes the currently playing track. Track details are available via magic text.</pre>
''' Options '''
* No configuration options - the trigger fires whenever the track changes
''' Magic Text '''
When this trigger fires, the following values are available via magic text:
* {track_name}
* {track_artist}
* {track_album}
* {track_duration}
* {track_year}
* {track_number}
* {track_genre}
''' Examples '''
''Example 1: Show a now playing notification''
<pre class="trigger-style">Triggers
Media Track Changed</pre>
<pre class="action-style">Actions
Display Notification: "Now playing {track_name} - {track_artist}"</pre>
''Example 2: Log track changes to a file''
<pre class="trigger-style">Triggers
Media Track Changed</pre>
<pre class="action-style">Actions
Write to File - Append "{track_name} - {track_artist}" to track_log.txt</pre>
''' Notes '''
* This trigger relies on standard Android media notifications and only works with apps that provide them
''' See Also '''
* [[Trigger: Music/Sound playing|Music/Sound playing]]
* [[Trigger: Spotify|Spotify]]
* [[Action: Control Media|Control Media]]