import System
import System.IO
import Banshee.ServiceStack
import Banshee.PlaybackController
def AutoPlay() as bool:
ServiceManager.PlaybackController.ShuffleMode = PlaybackShuffleMode.Song
ServiceManager.PlayerEngine.Play()
ServiceManager.PlaybackController.ShuffleMode = PlaybackShuffleMode.Linear
def OnClientStarted( client as Client ):
Hyena.Log.Information( "engine is playing now..." )
GLib.Timeout.Add(1500, AutoPlay)
Banshee.ServiceStack.Application.ClientStarted -= OnClientStarted
Hyena.Log.Information( "autoplay script is loaded." )
Banshee.ServiceStack.Application.ClientStarted += OnClientStarted
p.s. 上次有提到要作自動記錄播放與自動播放記錄曲目的功能,我的確是做了,只是在播放完指定曲目後,又跳回第一首,這表示我還得繼續研究原始碼才行,所以暫時不釋出。
沒有留言:
張貼留言