feat: integrato il supporto ai canti personalizzati (non validati) della parrocchia
- Recuperato il campo 'canti_personali' dalle tabelle dell'API parrocchiale. - Mappato ed integrato il segnale 'comunitaCantiPersonali' in locale e salvato su localStorage. - Permesso il caricamento e l'interrogazione corretta dei brani custom in HomePage, PlayerPage, DisplayPage, YoutubePlayerService e MediaSessionService. - Risolto il disallineamento per cui la parrocchia 123456 mostrava 196 brani anziché 208.
This commit is contained in:
@@ -4,6 +4,7 @@ import { SettingsService } from './settings.service';
|
||||
import { MediaSessionService } from './media-session.service';
|
||||
import { MyCantiService } from './my-canti.service';
|
||||
import { ConnectivityService } from './connectivity.service';
|
||||
import { ComunitaService } from './comunita.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -14,6 +15,7 @@ export class YoutubePlayerService {
|
||||
private mediaSessionService = inject(MediaSessionService);
|
||||
private myCantiService = inject(MyCantiService);
|
||||
private connectivityService = inject(ConnectivityService);
|
||||
private comunitaService = inject(ComunitaService);
|
||||
|
||||
public isPlayerSupported = computed<boolean>(() => {
|
||||
// Check if offline
|
||||
@@ -128,6 +130,9 @@ export class YoutubePlayerService {
|
||||
if (!canto) {
|
||||
canto = this.myCantiService.myCanti().find(c => c.id === cantoId);
|
||||
}
|
||||
if (!canto) {
|
||||
canto = this.comunitaService.comunitaCantiPersonali().find(c => c.id === cantoId);
|
||||
}
|
||||
if (!canto) return;
|
||||
|
||||
const videoId = this.cantiService.getYoutubeId(canto.link_youtube);
|
||||
|
||||
Reference in New Issue
Block a user