(
playlistId,
groupSettings = [],
categorySettings = []
)
| 1380 | } |
| 1381 | |
| 1382 | static async updateM3UGroupSettings( |
| 1383 | playlistId, |
| 1384 | groupSettings = [], |
| 1385 | categorySettings = [] |
| 1386 | ) { |
| 1387 | try { |
| 1388 | const response = await request( |
| 1389 | `${host}/api/m3u/accounts/${playlistId}/group-settings/`, |
| 1390 | { |
| 1391 | method: 'PATCH', |
| 1392 | body: { |
| 1393 | group_settings: groupSettings, |
| 1394 | category_settings: categorySettings, |
| 1395 | }, |
| 1396 | } |
| 1397 | ); |
| 1398 | // Fetch the updated playlist and update the store |
| 1399 | const updatedPlaylist = await API.getPlaylist(playlistId); |
| 1400 | usePlaylistsStore.getState().updatePlaylist(updatedPlaylist); |
| 1401 | return response; |
| 1402 | } catch (e) { |
| 1403 | errorNotification('Failed to update M3U group settings', e); |
| 1404 | } |
| 1405 | } |
| 1406 | |
| 1407 | static async addPlaylist(values) { |
| 1408 | try { |
no test coverage detected