INTERACT FORUM
Windows => Plug-in Development => Topic started by: gappie on February 24, 2009, 11:59:00 am
-
is there a way to set the rules for a smartlist using automation?
i looked but could not find any..
:)
gab
-
would it not be a nice addition. for now i can run a 'smartlist' inside a script, and move all files to a playlist. making a smartlist that way could be much easier.
:)
gab
-
I haven't tried it yet but it may be possible to do it via the Set() method on MJPlaylistAutomation as discussed here:
http://yabb.jriver.com/interact/index.php?topic=47659.0
-
oh.. thanks a lot for that link. i have a look at that and see what i can make of it. and you are not 'pretty much on your own with this one" anymore.
:)
gab
-
for when somebody is interested. it turned out to be not so complex. i just tested a bit here is the script. the examples changes the search in two different smartlists. one to show just the song that is playing (i did this before by cleaning a playlist and adding it) and one that gives all the songs that have the same genre (genres is a list field).
Sub PLNSong(ByVal Nummer As String)
Dim PlaylistNo As Integer
Dim Regel As String
PlaylistNo = 172836362
Regel = "[Filename]=[" & Nummer & "]"
Dim PlayL As MediaCenter.IMJPlaylistAutomation
PlayL = mediaCenterRef.GetPlaylistByID(PlaylistNo)
PlayL.Set("Search", Regel)
End Sub
Sub PLNGenre(ByVal genre As String)
Dim PlaylistNo As Integer
Dim Regel As String
PlaylistNo = 805778929
Regel = "[Media Type]=[Audio] [genres]=" & genre
Dim PlayL As MediaCenter.IMJPlaylistAutomation
PlayL = mediaCenterRef.GetPlaylistByID(PlaylistNo)
PlayL.Set("Search", Regel)
End Sub
:)
gab