forked from external/yambar
Audio CDs are special, in that they don’t (usually) have any data partitions. They also don’t have a volume label. They just have tracks. Before this patch, we ignored all optical mediums that did *not* have a filesystem (that includes audio CDs). Now, instead of using the ID_FS_USAGE property to determine whether there’s media present in the CD-ROM or not, we use the ID_CDROM_MEDIA. This property is set to ‘1’ for both audio CDs and data CDs. Then, we read the ID_CDROM_MEDIA_TRACK_COUNT_AUDIO property to determine how many audio tracks there are. If the CD has a filesystem, we treat it as a data CD, and use the already existing add_partition() function to track it. If the CD does _not_ have a filesystem, but it _does_ have at least one audio track, we treat it as an audio CD and use the new add_audio_cd() function to track it. This function is almost identical to add_partition(), but instead of reading the ID_FS_LABEL property, it reads the ID_CDROM_MEDIA_TRACK_COUNT_AUDIO property and synthesizes a label on the form “Audio CD - N tracks”. Finally, a new boolean tag, “audio”, has been added. It is set to true for audio CD “partitions”, and to false in all other cases. |
||
---|---|---|
.. | ||
alsa.c | ||
backlight.c | ||
battery.c | ||
clock.c | ||
cpu.c | ||
foreign-toplevel.c | ||
i3-common.c | ||
i3-common.h | ||
i3-ipc.h | ||
i3.c | ||
label.c | ||
mem.c | ||
meson.build | ||
mpd.c | ||
network.c | ||
removables.c | ||
river.c | ||
script.c | ||
sway-xkb.c | ||
xkb.c | ||
xwindow.c |