Compare commits
No commits in common. "5944686d1d15a19d9822adca0b82603d2f9d955b" and "f3a6b4a225d379d987373a4d0a96a4865ce445b5" have entirely different histories.
5944686d1d
...
f3a6b4a225
6 changed files with 0 additions and 59 deletions
|
@ -58,13 +58,5 @@ namespace Jellyfin.Plugin.SmartPlaylist.Api {
|
||||||
await _store.SaveSmartCollectionAsync(smartCollection);
|
await _store.SaveSmartCollectionAsync(smartCollection);
|
||||||
return Created();
|
return Created();
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpDelete]
|
|
||||||
[Route("{smartCollectionId}")]
|
|
||||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
|
||||||
public async Task<ActionResult> DeleteCollection([FromRoute, Required] SmartCollectionId smartCollectionId) {
|
|
||||||
_store.DeleteSmartCollectionById(smartCollectionId);
|
|
||||||
return NoContent();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,13 +57,5 @@ namespace Jellyfin.Plugin.SmartPlaylist.Api {
|
||||||
await _store.SaveSmartPlaylistAsync(smartPlaylist);
|
await _store.SaveSmartPlaylistAsync(smartPlaylist);
|
||||||
return Created();
|
return Created();
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpDelete]
|
|
||||||
[Route("{smartPlaylistId}")]
|
|
||||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
|
||||||
public async Task<ActionResult> DeletePlaylist([FromRoute, Required] SmartPlaylistId smartPlaylistId) {
|
|
||||||
_store.DeleteSmartPlaylistById(smartPlaylistId);
|
|
||||||
return NoContent();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,9 +37,6 @@
|
||||||
<button is="emby-button" type="submit" class="raised button-submit block emby-button">
|
<button is="emby-button" type="submit" class="raised button-submit block emby-button">
|
||||||
<span>Save</span>
|
<span>Save</span>
|
||||||
</button>
|
</button>
|
||||||
<button is="emby-button" type="reset" class="raised button-reset block emby-button">
|
|
||||||
<span>Delete</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -73,15 +73,6 @@ ApiClient.setSmartCollection = function (c) {
|
||||||
data: JSON.stringify(c),
|
data: JSON.stringify(c),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiClient.deleteSmartCollection = function (id) {
|
|
||||||
const url = ApiClient.getUrl(`SmartCollection/${id}`)
|
|
||||||
return this.ajax({
|
|
||||||
type: 'DELETE',
|
|
||||||
url: url,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function initial_load(selectedId) {
|
function initial_load(selectedId) {
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
ApiClient.getSmartCollections().then(function (collections) {
|
ApiClient.getSmartCollections().then(function (collections) {
|
||||||
|
@ -121,14 +112,4 @@ export default function (view, params) {
|
||||||
});
|
});
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
document.querySelector('#SmartCollectionConfigForm')
|
|
||||||
.addEventListener('reset', function (e) {
|
|
||||||
Dashboard.showLoadingMsg();
|
|
||||||
const selection = document.querySelector('#SmartcollectionSelection');
|
|
||||||
const selectedId = COLLECTIONS[selection.selectedIndex].Id;
|
|
||||||
ApiClient.deleteSmartCollection(selectedId).then(function () {
|
|
||||||
initial_load(null);
|
|
||||||
});
|
|
||||||
e.preventDefault();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,9 +43,6 @@
|
||||||
<button is="emby-button" type="submit" class="raised button-submit block emby-button">
|
<button is="emby-button" type="submit" class="raised button-submit block emby-button">
|
||||||
<span>Save</span>
|
<span>Save</span>
|
||||||
</button>
|
</button>
|
||||||
<button is="emby-button" type="reset" class="raised button-reset block emby-button">
|
|
||||||
<span>Delete</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -97,14 +97,6 @@ ApiClient.setSmartPlaylist = function (p) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiClient.deleteSmartPlaylist = function (id) {
|
|
||||||
const url = ApiClient.getUrl(`SmartPlaylist/${id}`)
|
|
||||||
return this.ajax({
|
|
||||||
type: 'DELETE',
|
|
||||||
url: url,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function initial_load(selectedId) {
|
function initial_load(selectedId) {
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
ApiClient.getSmartPlaylists().then(function (playlists) {
|
ApiClient.getSmartPlaylists().then(function (playlists) {
|
||||||
|
@ -147,14 +139,4 @@ export default function (view, params) {
|
||||||
});
|
});
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
document.querySelector('#SmartPlaylistConfigForm')
|
|
||||||
.addEventListener('reset', function (e) {
|
|
||||||
Dashboard.showLoadingMsg();
|
|
||||||
const selection = document.querySelector('#SmartplaylistSelection');
|
|
||||||
const selectedId = PLAYLISTS[selection.selectedIndex].Id;
|
|
||||||
ApiClient.deleteSmartPlaylist(selectedId).then(function () {
|
|
||||||
initial_load(null);
|
|
||||||
});
|
|
||||||
e.preventDefault();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue