20 lines
841 B
C#
20 lines
841 B
C#
using MediaBrowser.Model.Plugins;
|
|
|
|
namespace Jellyfin.Plugin.SmartPlaylist {
|
|
public class PluginConfiguration : BasePluginConfiguration {
|
|
public PluginConfiguration() {
|
|
InitialProgram = """
|
|
(begin
|
|
(define lower (lambda (s) (invoke s "ToLower" nil)))
|
|
(define is-genre (lambda (g g-list) (any (lambda (x) (invoke (lower x) "Contains" (list (lower g)))) g-list)))
|
|
(define is-genre-exact (lambda (g g-list) (find g g-list)))
|
|
(define genre-list (lambda nil (let (_g (getitems item "Genres")) (if (null _g) nil (car _g)))))
|
|
(define is-favorite (lambda nil (invoke item "IsFavoriteOrLiked" (list user)))))
|
|
|
|
|
|
(define is-favourite is-favorite)
|
|
""";
|
|
}
|
|
public string InitialProgram { get; set; }
|
|
}
|
|
}
|