Exemplo n.º 1
0
        public Result Toplist(Sharpotify.Enums.ToplistType type, string region, string username)
        {
            ISpotify connection = GetConnection();

            Result result = connection.Toplist(type, region, username);

            ReleaseConnection(connection);

            return result;
        }
Exemplo n.º 2
0
 public MusicStream GetMusicStream(Track track, Sharpotify.Media.File file, TimeSpan timeout)
 {
     ChannelCallback listener = new ChannelCallback();
     ChannelHeaderCallback callback2 = new ChannelHeaderCallback();
     try
     {
         this.protocol.SendPlayRequest();
     }
     catch (ProtocolException)
     {
         return null;
     }
     try
     {
         this.protocol.SendAesKeyRequest(listener, track, file);
     }
     catch (ProtocolException)
     {
         return null;
     }
     byte[] key = listener.Get(timeout);
     MusicStream output = new MusicStream();
     try
     {
         ChannelStreamer streamer = new ChannelStreamer(this.protocol, file, key, output);
     }
     catch (Exception)
     {
         /* Ignore */
     }
     return output;
 }