2012-05-04 48 views
7

當該曲目是收音機時,如何獲取iTunes中當前曲目的歌曲名稱?使用Applescript在iTunes中獲取流媒體曲目的歌曲名稱

我的意思是正好出現無線電名字:)

enter image description here

Quering它的名字一樣列出了我的無線電(Trance Channel - DIGGITALLY IMPORTED - we can't define it!)的名稱下面的字符串(一個或多個),但不是歌曲

tell application "iTunes" 
    set thisTrack to current track 
    set trackName to the name of thisTrack 
    set trackTime to thisTrack's time 
end tell 

這是意料之中的,因爲在我的庫中的信息是: enter image description here 但有一種方式來應對特殊此流的軌道?並像iTunes一樣在第一張照片中正確獲取他們的信息?我知道當前的曲目是收音機,因爲它的時間將是missing value而不是MM:SS,如果這有幫助。

這可能嗎?

回答

5

我看着在AppleScript字典爲iTunes和搜索「流」 ......

tell application "iTunes" 
    current stream title 
end tell 
+0

我需要了解這些字典...... :) 感謝工作就像一個魅力! – nacho4d

+0

似乎不適用於Beats 1收音機。 –

1

並非所有的綵帶將格式化數據流一樣,所以從當前流title屬性結果可能不是一致的。

1

看來,在iTunes 12.2中,各種有趣的事情正在發生。

  1. current stream title回報missing value請求來自何處流的名稱時,「爲您」(例如一些在當前的音樂庫不)。 name of the current track不存在。例如,我現在正在從「For You」(Yay-grad學校時間)收聽「Alternative Gems:1994」,我無法獲得任何關於正在播放的內容的信息。如果我去專輯曲目播放其他東西,missing value和錯誤-1728在name of current track也。

  2. 在聽節拍1個無線電按上述@ivan,我也得到missing valuename of the current track我得到「節拍1」。正如@dougscripts指出的那樣,stream title的東西在整個地圖上都有所不同。

  3. 收聽電臺通過「For You」創建的電臺似乎給了我正確的name of the current track

總之,混亂。

相關問題