Ejemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();

            twitter_client = new Twitter.Twitter();
            google_client = new Google.Google();

            playlist = new Playlist();
            soundcloud_client = new SoundCloud.SoundCloud(APIKeyProvider.Soundcloud_ClientId);
            youtube_client = new Youtube.Youtube();
            playlist.load(youtube_client,soundcloud_client);

            retriever = new Thread(new ThreadStart(this.retrieveEntries));
            retriever.Start();

            updater = new Thread(new ThreadStart(this.update));
            updater.Start();

            //TODO: a supprimer après les tests
            playlist.add(new PlayListEntry(youtube_client.resolveTrack("https://www.youtube.com/dsjhdsqjsjd"), "cloclo", false));
            playlist.add(new PlayListEntry(soundcloud_client.resolveTrack("https://soundcloud.com/chiptune/positive-waves"), "clocla", false));
            playlist.add(new PlayListEntry(soundcloud_client.resolveTrack("https://soundcloud.com/prep-school-recordings/eion-hyper-active-original-mix"), "cloclu", false));
            

            //this.playlist.next();
        }
Ejemplo n.º 2
0
 public ListViewBanItem(string name, Music.Playlist playlist)
 {
     this.name = name;
     this.playlist = playlist;
     InitializeComponent();
     this.user_name.Content = name;
 }
Ejemplo n.º 3
0
 public ListViewPlaylistItem(Music.PlayListEntry entry, Music.Playlist playlist)
 {
     InitializeComponent();
     this.entry = entry;
     this.title.Content = entry.getTitle();
     this.user.Content = entry.user;
     this.playlist = playlist;
 }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            Playlist playlist = new Playlist();
            Youtube.Youtube youtube_client = new Youtube.Youtube();
            SoundCloud.SoundCloud soundcloud_client = new SoundCloud.SoundCloud("bb9515b11ad6d190d296583917f534fd");


            Console.ReadLine();
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Transforme une mini playlist en réelle playlist
 /// </summary>
 /// <param name="youtube_client"></param>
 /// <param name="soundcloud_client"></param>
 /// <returns></returns>
 public Playlist expand(Youtube.Youtube youtube_client, SoundCloud.SoundCloud soundcloud_client)
 {
     Playlist p = new Playlist();
     foreach (PlayListEntryMinified e in to_play)
     {
         p.to_play.Add(e.expand(youtube_client, soundcloud_client));
     }
     foreach (PlayListEntryMinified e in played)
     {
         p.played.Add(e.expand(youtube_client, soundcloud_client));
     }
     p.banned = this.banned;
     return p;
 }
Ejemplo n.º 6
0
 public override void BeforeSerialize()
 {
     this.Directories = Plugin.Watcher.CollectedLocalDirectories.Select(d => d.FullName).ToList();
     this.Playlists   = Playlist.Where(p => p.Medium == Medium.Local).Cast <Playlist>().ToList();
     this.Tracks      = this.Playlists.SelectMany(p => p.Tracks).Cast <Track>().ToList();
 }