MCPcopy Create free account
hub / github.com/Dispatcharr/Dispatcharr / updateM3UGroupSettings

Method updateM3UGroupSettings

frontend/src/api.js:1382–1405  ·  view source on GitHub ↗
(
    playlistId,
    groupSettings = [],
    categorySettings = []
  )

Source from the content-addressed store, hash-verified

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 {

Callers 1

updateM3UGroupSettingsFunction · 0.80

Calls 4

requestFunction · 0.85
errorNotificationFunction · 0.85
getPlaylistMethod · 0.80
updatePlaylistMethod · 0.80

Tested by

no test coverage detected