feat(auto): surface favorite groups as Android Auto sub-folders
Favoritos now renders non-empty custom groups as grupo:<id> sub-folders (hidden when empty) with ungrouped stations left as direct leaves, reusing the existing hijos() path so the zero-groups case stays byte-identical to today's flat list.
This commit is contained in:
@@ -739,6 +739,18 @@ class PluriWaveAudioHandler extends BaseAudioHandler
|
||||
}
|
||||
final fuente = _fuenteNavegacionGlobal;
|
||||
if (fuente == null) return const [];
|
||||
if (parentMediaId == ConstructorArbolAuto.idFavoritos) {
|
||||
return constructor.carpetasFavoritos(
|
||||
grupos: await fuente.grupos(),
|
||||
favoritos: await fuente.favoritos(),
|
||||
);
|
||||
}
|
||||
if (constructor.esCarpetaGrupo(parentMediaId)) {
|
||||
return constructor.hijosGrupo(
|
||||
parentMediaId,
|
||||
favoritos: await fuente.favoritos(),
|
||||
);
|
||||
}
|
||||
final emisoras = await _listaParaCarpeta(fuente, parentMediaId);
|
||||
return constructor.hijos(parentMediaId, emisoras: emisoras);
|
||||
} catch (_) {
|
||||
@@ -789,7 +801,6 @@ class PluriWaveAudioHandler extends BaseAudioHandler
|
||||
FuenteEmisorasAuto fuente,
|
||||
String parentId,
|
||||
) => switch (parentId) {
|
||||
ConstructorArbolAuto.idFavoritos => fuente.favoritos(),
|
||||
ConstructorArbolAuto.idMisEmisoras => fuente.misEmisoras(),
|
||||
ConstructorArbolAuto.idTodas => fuente.todas(),
|
||||
_ => Future.value(const []),
|
||||
|
||||
Reference in New Issue
Block a user