Revert "feat: add collection or playlist choice to config page and dto."
This reverts commit 457755d743
.
This commit is contained in:
parent
457755d743
commit
dcdee2403c
2 changed files with 0 additions and 31 deletions
|
@ -50,7 +50,6 @@ namespace Jellyfin.Plugin.SmartPlaylist {
|
|||
public string SortProgram { get; set; }
|
||||
public string? Filename { get; set; }
|
||||
public bool Enabled { get; set; }
|
||||
public bool CollectionInsteadOfPlaylist { get; set; }
|
||||
|
||||
public SmartPlaylistDto() {
|
||||
Id = "";
|
||||
|
@ -60,7 +59,6 @@ namespace Jellyfin.Plugin.SmartPlaylist {
|
|||
SortProgram = DEFAULT_SORT_PROGRAM;
|
||||
Filename = null;
|
||||
Enabled = true;
|
||||
CollectionInsteadOfPlaylist = false;
|
||||
}
|
||||
|
||||
protected SmartPlaylistDto(SerializationInfo info, StreamingContext context) {
|
||||
|
@ -99,11 +97,6 @@ namespace Jellyfin.Plugin.SmartPlaylist {
|
|||
} else {
|
||||
Enabled = true;
|
||||
}
|
||||
if (info.GetValue("CollectionInsteadOfPlaylist", typeof(bool)) is bool _CollectionInsteadOfPlaylist) {
|
||||
Enabled = _CollectionInsteadOfPlaylist;
|
||||
} else {
|
||||
Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void GetObjectData(SerializationInfo info, StreamingContext context) {
|
||||
|
@ -113,7 +106,6 @@ namespace Jellyfin.Plugin.SmartPlaylist {
|
|||
info.AddValue("Program", Program);
|
||||
info.AddValue("Filename", Filename);
|
||||
info.AddValue("Enabled", Enabled);
|
||||
info.AddValue("CollectionInsteadOfPlaylist", CollectionInsteadOfPlaylist);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,19 +44,6 @@
|
|||
<div class="fieldDescription">Is the playlist enabled.</div>
|
||||
<input id="SmartplaylistEditEnabled" type="checkbox" class="emby-input"/>
|
||||
</div>
|
||||
<div class="inputContainer">
|
||||
<fieldset>
|
||||
<legend>Should a playlist or a collection be generated:</legend>
|
||||
<div>
|
||||
<input id="SmartplaylistEditPlaylistChoice" type="radio" name="PlaylistOrCollection" class="emby-input" checked/>
|
||||
<label class="inputLabel inputLabelUnfocused" for="SmartplaylistEditPlaylistChoice">Playlist</label>
|
||||
</div>
|
||||
<div>
|
||||
<input id="SmartplaylistEditCollectionChoice" type="radio" name="PlaylistOrCollection" class="emby-input"/>
|
||||
<label class="inputLabel inputLabelUnfocused" for="SmartplaylistEditCollectionChoice">Collection</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div>
|
||||
<button is="emby-button" type="submit" class="raised button-submit block emby-button">
|
||||
<span>Save</span>
|
||||
|
@ -82,8 +69,6 @@
|
|||
const editSortProgram = document.querySelector('#SmartplaylistEditSortProgram');
|
||||
const editUsers = document.querySelector('#SmartplaylistEditUsers');
|
||||
const editEnabled = document.querySelector('#SmartplaylistEditEnabled');
|
||||
const editPlaylistChoice = document.querySelector('#SmartplaylistEditPlaylistChoice');
|
||||
const editCollectionChoice = document.querySelector('#SmartplaylistEditCollectionChoice');
|
||||
if (id === null) {
|
||||
selection.selectedIndex = 0;
|
||||
editName.value = 'My New Smartplaylist';
|
||||
|
@ -98,8 +83,6 @@
|
|||
editUsers.appendChild(o);
|
||||
}
|
||||
editEnabled.checked = true;
|
||||
editPlaylistChoice.checked = true;
|
||||
editCollectionChoice.checked = false;
|
||||
return;
|
||||
}
|
||||
function matchId(p) {
|
||||
|
@ -122,8 +105,6 @@
|
|||
editUsers.appendChild(o);
|
||||
}
|
||||
editEnabled.checked = p.Enabled;
|
||||
editPlaylistChoice.checked = !p.CollectionInsteadOfPlaylist;
|
||||
editCollectionChoice.checked = p.CollectionInsteadOfPlaylist;
|
||||
}
|
||||
|
||||
function fillPlaylistSelect(config) {
|
||||
|
@ -173,8 +154,6 @@
|
|||
const editSortProgram = document.querySelector('#SmartplaylistEditSortProgram');
|
||||
const editUsers = document.querySelector('#SmartplaylistEditUsers');
|
||||
const editEnabled = document.querySelector('#SmartplaylistEditEnabled');
|
||||
const editPlaylistChoice = document.querySelector('#SmartplaylistEditPlaylistChoice');
|
||||
const editCollectionChoice = document.querySelector('#SmartplaylistEditCollectionChoice');
|
||||
var index = selection.selectedIndex;
|
||||
if (index === 0) {
|
||||
const o = {
|
||||
|
@ -187,7 +166,6 @@
|
|||
return m;
|
||||
}),
|
||||
Enabled: editEnabled.checked,
|
||||
CollectionInsteadOfPlaylist: !editPlaylistChoice.checked,
|
||||
};
|
||||
config.Playlists.push(o);
|
||||
} else {
|
||||
|
@ -201,7 +179,6 @@
|
|||
return m;
|
||||
}),
|
||||
config.Playlists[index-1].Enabled = editEnabled.checked;
|
||||
config.Playlists[index-1].CollectionInsteadOfPlaylist = !editPlaylistChoice.checked;
|
||||
}
|
||||
ApiClient.updatePluginConfiguration(SmartPlaylistConfig.pluginUniqueId, config).then(function (result) {
|
||||
Dashboard.processPluginConfigurationUpdateResult(result);
|
||||
|
|
Loading…
Add table
Reference in a new issue