# Playlists - track added - do something with track?

**URL:** <https://discourse.mopidy.com/t/playlists-track-added-do-something-with-track/5149>\
**Category:** Misc\
**Created:** [September 27, 2021, 11:00am UTC](https://discourse.mopidy.com/t/playlists-track-added-do-something-with-track/5149 "2021-09-27T11:00:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![natumbri](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/natumbri/32/1164_2.png) [@natumbri](https://discourse.mopidy.com/u/natumbri)\
**Post date:** [September 27, 2021, 11:00am UTC](https://discourse.mopidy.com/t/playlists-track-added-do-something-with-track/5149/1 "2021-09-27T11:00:55Z")

</div>

Is there a way for an Extension to know when a track is added to or removed from a playlist (including knowing which track)?

CoreListener.playlist\_changed looks like a start, but is it possible to know what the change was?

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [September 27, 2021, 11:45am UTC](https://discourse.mopidy.com/t/playlists-track-added-do-something-with-track/5149/2 "2021-09-27T11:45:54Z")

</div>

[https://docs.mopidy.com/en/latest/api/core/#mopidy.core.CoreListener.playlist\_changed](https://docs.mopidy.com/en/latest/api/core/#mopidy.core.CoreListener.playlist_changed)

It provides the updated playlist but it does not tell you specifically what changed.

---

<div class="post-metadata">

**Author:** ![natumbri](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/natumbri/32/1164_2.png) [@natumbri](https://discourse.mopidy.com/u/natumbri)\
**Post date:** [September 27, 2021, 9:29pm UTC](https://discourse.mopidy.com/t/playlists-track-added-do-something-with-track/5149/3 "2021-09-27T21:29:03Z")

</div>

Thanks - that’s what I thought. Sounds like it’s not possible, then?

Cheers  
Nik

---

<div class="post-metadata">

**Author:** ![jjok](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/jjok/32/448_2.png) [@jjok](https://discourse.mopidy.com/u/jjok)\
**Post date:** [September 28, 2021, 12:29pm UTC](https://discourse.mopidy.com/t/playlists-track-added-do-something-with-track/5149/4 "2021-09-28T12:29:55Z")

</div>

The playback state change receives both the old and new state. It would be nice if this worked the same way.  
Or maybe is could take some additional information with what was added or removed.

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/system/32/1_2.png) [@system](https://discourse.mopidy.com/u/system)\
**Post date:** [March 30, 2022, 12:30am UTC](https://discourse.mopidy.com/t/playlists-track-added-do-something-with-track/5149/5 "2022-03-30T00:30:12Z")

</div>

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
