# Listening to AudioListener reached\_end\_of\_stream

**URL:** <https://discourse.mopidy.com/t/listening-to-audiolistener-reached-end-of-stream/4727>\
**Category:** Help and support\
**Created:** [February 5, 2021, 6:13pm UTC](https://discourse.mopidy.com/t/listening-to-audiolistener-reached-end-of-stream/4727 "2021-02-05T18:13:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![StefanMinke](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/stefanminke/32/1946_2.png) [@StefanMinke](https://discourse.mopidy.com/u/StefanMinke)\
**Post date:** [February 5, 2021, 6:13pm UTC](https://discourse.mopidy.com/t/listening-to-audiolistener-reached-end-of-stream/4727/1 "2021-02-05T18:13:53Z")

</div>

Hi.

I am new in scirpting with mopidy and did not find way to listen to an end of stream event.  
I would like to react on reaching the end of a playlist.  
The Audio API gives a solution by using the AudioListener (reached\_end\_of\_stream)  
But how can I access this Listener by using Python?  
The MopidyAPI or JSON RPC API can handle event listening but just for some core events, not for audio events.

Could you give me some useful hints?

Thanks in advance!

---

<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:** [February 5, 2021, 7:01pm UTC](https://discourse.mopidy.com/t/listening-to-audiolistener-reached-end-of-stream/4727/2 "2021-02-05T19:01:05Z")

</div>

Yes, the Mopidy Core API only exposes the Core API. I am not sure why we don’t have a Core `tracklist_ended` event but it sounds like a good [feature request](https://github.com/mopidy/mopidy/issues/new?assignees=&labels=&template=feature.md&title=). As it stands, you cannot access that event.

---

<div class="post-metadata">

**Author:** ![StefanMinke](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/stefanminke/32/1946_2.png) [@StefanMinke](https://discourse.mopidy.com/u/StefanMinke)\
**Post date:** [February 5, 2021, 7:30pm UTC](https://discourse.mopidy.com/t/listening-to-audiolistener-reached-end-of-stream/4727/3 "2021-02-05T19:30:31Z")

</div>

Yes. The core API is no solution atm.

But is it possible to work with the Audio API esp. the AudioListener in any way with python?

Otherwise I habe to wait for implememting this feature after requesting for it.

---

<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:** [February 5, 2021, 8:25pm UTC](https://discourse.mopidy.com/t/listening-to-audiolistener-reached-end-of-stream/4727/4 "2021-02-05T20:25:15Z")

</div>

You could probably do so if you were writing a Mopidy frontend. But only the Core API is accessible via JSON RPC. If you want to reduce the wait, you could also implement the feature? Presumably there isn’t much to it.

---

<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:** [August 7, 2021, 8:25am UTC](https://discourse.mopidy.com/t/listening-to-audiolistener-reached-end-of-stream/4727/5 "2021-08-07T08:25:44Z")

</div>

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