public Playlist(IPlayEngine Engine, string Name, MediaChrome.MainForm d) { Songs = new List<Song>(); this.Engine = Engine; this.Title = Name; this.MainForm = d; Thread ds = new Thread(RetrieveData); ds.Start(); }
public EditMetadata(MediaChrome.Song EdSong) { CurrentSong=EdSong; // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); // // TODO: Add constructor code after the InitializeComponent() call. // }
public List<Song> LoadPlaylist(String ID, ref MediaChrome.Views.Playlist playlist) { return new List<Song>(); }
public String RawFind(MediaChrome.Song _Song) { return null; }
public Song RawFind(MediaChrome.Song _Song2) { WebClient CN = new WebClient(); List<Song> songs = new List<Song>(); XmlDocument D = new XmlDocument(); D.Load("http://gdata.youtube.com/feeds/api/videos?q=" + (_Song2.Title+" "+_Song2.Artist).Replace(" ", "+") + "&v=1"); var Items = D.GetElementsByTagName("entry"); foreach (XmlElement Item in Items) { MediaChrome.Song _Song = new MediaChrome.Song(); String Name = Item.GetElementsByTagName("title")[0].InnerText; _Song.Title = Name; _Song.Artist = "Youtube"; if (Name.Contains("-")) { String[] markup = Name.Split('-'); _Song.Title = markup[1].Trim(' '); _Song.Artist = markup[0].Trim(' '); } // http://www.youtube.com/apiplayer?enablejsapi=1&version=3 _Song.Path="youtube:"+((XmlElement)Item.GetElementsByTagName("link")[3]).GetAttribute("href").Replace("http://gdata.youtube.com/feeds/api/videos/","").Replace("?v=1",""); // _Song.Path = "youtube:" + ((XmlElement)Item.GetElementsByTagName("link")[0]).GetAttribute("href"); _Song.Engine = "youtube"; _Song.Store = "Youtube"; if (_Song.Title.Contains(_Song2.Title) && _Song.Title.Contains(_Song2.Artist)) return _Song; } return null; }