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

Method addM3UProfile

frontend/src/api.js:1859–1879  ·  view source on GitHub ↗
(accountId, values)

Source from the content-addressed store, hash-verified

1857 }
1858
1859 static async addM3UProfile(accountId, values) {
1860 try {
1861 const response = await request(
1862 `${host}/api/m3u/accounts/${accountId}/profiles/`,
1863 {
1864 method: 'POST',
1865 body: values,
1866 }
1867 );
1868
1869 // Refresh the playlist
1870 const playlist = await API.getPlaylist(accountId);
1871 usePlaylistsStore
1872 .getState()
1873 .updateProfiles(playlist.id, playlist.profiles);
1874
1875 return response;
1876 } catch (e) {
1877 errorNotification(`Failed to add profile to account ${accountId}`, e);
1878 }
1879 }
1880
1881 static async deleteM3UProfile(accountId, id) {
1882 try {

Callers 1

addM3UProfileFunction · 0.80

Calls 3

requestFunction · 0.85
errorNotificationFunction · 0.85
getPlaylistMethod · 0.80

Tested by

no test coverage detected