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 SortProgram { get; set; }
|
||||||
public string? Filename { get; set; }
|
public string? Filename { get; set; }
|
||||||
public bool Enabled { get; set; }
|
public bool Enabled { get; set; }
|
||||||
public bool CollectionInsteadOfPlaylist { get; set; }
|
|
||||||
|
|
||||||
public SmartPlaylistDto() {
|
public SmartPlaylistDto() {
|
||||||
Id = "";
|
Id = "";
|
||||||
|
@ -60,7 +59,6 @@ namespace Jellyfin.Plugin.SmartPlaylist {
|
||||||
SortProgram = DEFAULT_SORT_PROGRAM;
|
SortProgram = DEFAULT_SORT_PROGRAM;
|
||||||
Filename = null;
|
Filename = null;
|
||||||
Enabled = true;
|
Enabled = true;
|
||||||
CollectionInsteadOfPlaylist = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected SmartPlaylistDto(SerializationInfo info, StreamingContext context) {
|
protected SmartPlaylistDto(SerializationInfo info, StreamingContext context) {
|
||||||
|
@ -99,11 +97,6 @@ namespace Jellyfin.Plugin.SmartPlaylist {
|
||||||
} else {
|
} else {
|
||||||
Enabled = true;
|
Enabled = true;
|
||||||
}
|
}
|
||||||
if (info.GetValue("CollectionInsteadOfPlaylist", typeof(bool)) is bool _CollectionInsteadOfPlaylist) {
|
|
||||||
Enabled = _CollectionInsteadOfPlaylist;
|
|
||||||
} else {
|
|
||||||
Enabled = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void GetObjectData(SerializationInfo info, StreamingContext context) {
|
public void GetObjectData(SerializationInfo info, StreamingContext context) {
|
||||||
|
@ -113,7 +106,6 @@ namespace Jellyfin.Plugin.SmartPlaylist {
|
||||||
info.AddValue("Program", Program);
|
info.AddValue("Program", Program);
|
||||||
info.AddValue("Filename", Filename);
|
info.AddValue("Filename", Filename);
|
||||||
info.AddValue("Enabled", Enabled);
|
info.AddValue("Enabled", Enabled);
|
||||||
info.AddValue("CollectionInsteadOfPlaylist", CollectionInsteadOfPlaylist);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,19 +44,6 @@
|
||||||
<div class="fieldDescription">Is the playlist enabled.</div>
|
<div class="fieldDescription">Is the playlist enabled.</div>
|
||||||
<input id="SmartplaylistEditEnabled" type="checkbox" class="emby-input"/>
|
<input id="SmartplaylistEditEnabled" type="checkbox" class="emby-input"/>
|
||||||
</div>
|
</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>
|
<div>
|
||||||
<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>
|
||||||
|
@ -82,8 +69,6 @@
|
||||||
const editSortProgram = document.querySelector('#SmartplaylistEditSortProgram');
|
const editSortProgram = document.querySelector('#SmartplaylistEditSortProgram');
|
||||||
const editUsers = document.querySelector('#SmartplaylistEditUsers');
|
const editUsers = document.querySelector('#SmartplaylistEditUsers');
|
||||||
const editEnabled = document.querySelector('#SmartplaylistEditEnabled');
|
const editEnabled = document.querySelector('#SmartplaylistEditEnabled');
|
||||||
const editPlaylistChoice = document.querySelector('#SmartplaylistEditPlaylistChoice');
|
|
||||||
const editCollectionChoice = document.querySelector('#SmartplaylistEditCollectionChoice');
|
|
||||||
if (id === null) {
|
if (id === null) {
|
||||||
selection.selectedIndex = 0;
|
selection.selectedIndex = 0;
|
||||||
editName.value = 'My New Smartplaylist';
|
editName.value = 'My New Smartplaylist';
|
||||||
|
@ -98,8 +83,6 @@
|
||||||
editUsers.appendChild(o);
|
editUsers.appendChild(o);
|
||||||
}
|
}
|
||||||
editEnabled.checked = true;
|
editEnabled.checked = true;
|
||||||
editPlaylistChoice.checked = true;
|
|
||||||
editCollectionChoice.checked = false;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
function matchId(p) {
|
function matchId(p) {
|
||||||
|
@ -122,8 +105,6 @@
|
||||||
editUsers.appendChild(o);
|
editUsers.appendChild(o);
|
||||||
}
|
}
|
||||||
editEnabled.checked = p.Enabled;
|
editEnabled.checked = p.Enabled;
|
||||||
editPlaylistChoice.checked = !p.CollectionInsteadOfPlaylist;
|
|
||||||
editCollectionChoice.checked = p.CollectionInsteadOfPlaylist;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function fillPlaylistSelect(config) {
|
function fillPlaylistSelect(config) {
|
||||||
|
@ -173,8 +154,6 @@
|
||||||
const editSortProgram = document.querySelector('#SmartplaylistEditSortProgram');
|
const editSortProgram = document.querySelector('#SmartplaylistEditSortProgram');
|
||||||
const editUsers = document.querySelector('#SmartplaylistEditUsers');
|
const editUsers = document.querySelector('#SmartplaylistEditUsers');
|
||||||
const editEnabled = document.querySelector('#SmartplaylistEditEnabled');
|
const editEnabled = document.querySelector('#SmartplaylistEditEnabled');
|
||||||
const editPlaylistChoice = document.querySelector('#SmartplaylistEditPlaylistChoice');
|
|
||||||
const editCollectionChoice = document.querySelector('#SmartplaylistEditCollectionChoice');
|
|
||||||
var index = selection.selectedIndex;
|
var index = selection.selectedIndex;
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
const o = {
|
const o = {
|
||||||
|
@ -187,7 +166,6 @@
|
||||||
return m;
|
return m;
|
||||||
}),
|
}),
|
||||||
Enabled: editEnabled.checked,
|
Enabled: editEnabled.checked,
|
||||||
CollectionInsteadOfPlaylist: !editPlaylistChoice.checked,
|
|
||||||
};
|
};
|
||||||
config.Playlists.push(o);
|
config.Playlists.push(o);
|
||||||
} else {
|
} else {
|
||||||
|
@ -201,7 +179,6 @@
|
||||||
return m;
|
return m;
|
||||||
}),
|
}),
|
||||||
config.Playlists[index-1].Enabled = editEnabled.checked;
|
config.Playlists[index-1].Enabled = editEnabled.checked;
|
||||||
config.Playlists[index-1].CollectionInsteadOfPlaylist = !editPlaylistChoice.checked;
|
|
||||||
}
|
}
|
||||||
ApiClient.updatePluginConfiguration(SmartPlaylistConfig.pluginUniqueId, config).then(function (result) {
|
ApiClient.updatePluginConfiguration(SmartPlaylistConfig.pluginUniqueId, config).then(function (result) {
|
||||||
Dashboard.processPluginConfigurationUpdateResult(result);
|
Dashboard.processPluginConfigurationUpdateResult(result);
|
||||||
|
|
Loading…
Add table
Reference in a new issue