Commits on Source (7)
-
LIBMTP_Get_Friendlyname() may return an empty string. Since it is not NULL, this name was used as the device name. Instead, in that case, fallback to the model name.
20b82357 -
d91e3439
-
No functional changes.
d1ca62de -
Do not leak the remaining items.
e5e20a5e -
Allocating the pp_items array required to know the number of items in advance. To do so, the mtp module hijacked the progression callback to know the number of items on listing (which was called once for each item, but in the end the total value was correct). This callback function accepts a "userdata" having type `void const *`, so it not intended to write to it, but it still worked without ugly cast due to an additional redirection (p_sys). To prepare further refactors (multi-device support), remove this callback hack and use a vlc_vector to append items on-the-fly.
8a9d595a -
Refactor to use a list of devices, and use a device node, parent of all discovered media for the device. This also prepares to add support for several MTP devices at the same time. Fixes #26085
1533bef8 -
The implementation of the MTP service discovery could only support one device at a time. Now that the structures to store a list of devices is in place, perform a diff between the known devices and the detected devices to update the list accordingly.
ea53570b