diff --git a/Halmap/Data/DataManager.swift b/Halmap/Data/DataManager.swift index 5c14109..96467da 100644 --- a/Halmap/Data/DataManager.swift +++ b/Halmap/Data/DataManager.swift @@ -33,10 +33,10 @@ class DataManager: ObservableObject { teamLists.forEach { teamName in fetchSong(team: teamName.rawValue, type: true) { songs in self.playerSongsAll[teamName.fetchTeamIndex()] = songs + self.setSongList(team: self.selectedTeam) } fetchSong(team: teamName.rawValue, type: false) { songs in self.teamSongsAll[teamName.fetchTeamIndex()] = songs - self.setSongList(team: self.selectedTeam) } } diff --git a/Halmap/View/SongInformation/SongPlayerView.swift b/Halmap/View/SongInformation/SongPlayerView.swift index 10459ac..629129e 100644 --- a/Halmap/View/SongInformation/SongPlayerView.swift +++ b/Halmap/View/SongInformation/SongPlayerView.swift @@ -89,7 +89,7 @@ struct SongPlayerView: View { audioManager.removePlayer() } .onAppear(){ - audioManager.AMset(song: song, selectedTeam: selectedTeam) + audioManager.AMset(song: song, selectedTeam: team) } .onReceive(timer) { _ in guard let player = AudioManager.instance.player else { return }