It’s quite simply by adding just reverse=True
, like:
media.children.sort(key=lambda child: (child.can_play, child.title), reverse=True)
In my HAOS system the path is:
/usr/src/homeassistant/homeassistant/components/media_source/local_source.py
Of course it will not survive updating HA