org.bluez.MediaFolder(5)

πŸ’– org.bluez.MediaFolder β€” the BlueZ D-Bus MediaFolder API, bestie edition πŸ’–

okay so this is a page from the Linux System Administration manual set β€” it's org.bluez.MediaFolder(5), and it's literally the whole BlueZ D-Bus MediaFolder API doc. no cap, that's the entire vibe. let's get into it 🫢


✨ INTERFACE ✨

the deets on what this thing actually is:

  • Service β€” unique name, and it's <purple>org.bluez</purple> in the Target role (or Controller role, depending on which side you're sitting on πŸ‘€)
  • Interface β€” <cyan>org.bluez.MediaFolder1</cyan> πŸ’…
  • Object path β€” freely definable in the Target role, or [variable prefix]/{hci0,hci1,...}/dev_{BDRADDR}/player# in the Controller role
  • Used by β€” bluetoothctl-player(1) ⭐

🌸 METHODS 🌸

object Search(string value, dict filter)

returns a folder object that's holding your search results ✨

to actually see the stuff you found, take that folder object you just got back and pass it on over to ChangeFolder. that's the move, fr fr.

possible errors (the sad paths 😭):

  • org.bluez.Error.NotSupported
  • org.bluez.Error.Failed

examples:

[player] > search <string>

array{objects, properties} ListItems(dict filter)

returns a list of the items you found πŸŽ€

possible errors:

  • org.bluez.Error.InvalidArguments
  • org.bluez.Error.NotSupported
  • org.bluez.Error.Failed

examples:

[player] > list-items [start] [end]

void ChangeFolder(object folder)

swaps out the current folder for a different one πŸ¦‹

⚠️ note, and this one matters: when you change folders, the items in your previous folder might get destroyed and you'll have to list them all over again. the one exception is the NowPlaying folder, which should always be present while the player is active. so like… don't get attached to your old folder's contents, bestie πŸ’€

possible errors:

  • org.bluez.Error.InvalidArguments
  • org.bluez.Error.NotSupported
  • org.bluez.Error.Failed

examples:

[player] > change-folder <item>

πŸ’œ PROPERTIES πŸ’œ

uint32 NumberOfItems [readonly]

how many items are chillin' in the folder. read it, don't write it πŸ‘‘

string Name [readonly]

the folder name β€” and it's giving specific vibes:

  • "/Filesystem/..." β€” filesystem scope πŸ“
  • "/NowPlaying/..." β€” NowPlaying scope 🎡
⚠️ note: the /NowPlaying folder might not show up in the list if the player is stopped. and folders created by Search are virtual β€” so the second another Search happens, or the folder gets changed via ChangeFolder, it will no longer be listed. poof, gone, iconic but temporary ✨

🧚 FILTERS 🧚

uint32 Start

offset of the first item.

default value: 0

uint32 End

offset of the last item.

default value: NumbeOfItems

array{string} Attributes

the item properties that should be included in the list πŸ‘‘

possible values:

"title", "artist", "album", "genre", "number-of-tracks", "number", "duration"

default value: All β€” literally all of them, slay 🌈


and that's the whole page, no notes. this doc is from BlueZ, dated September 2023 β€” so like, when you're citing your sources, that's the tea πŸŽ€πŸ’…

πŸ“¦ where this page comes from