Ejemplo n.º 1
0
        public static AlbumBrowse Create(SpotifySession session, Album album, AlbumBrowseComplete callback, object userdata)
        {
            IntPtr      listenerToken = ListenerTable.PutUniqueObject(callback, userdata);
            IntPtr      ptr           = NativeMethods.sp_albumbrowse_create(session._handle, album._handle, AlbumBrowseCompleteDelegate, listenerToken);
            AlbumBrowse browse        = BrowseTable.GetUniqueObject(ptr);

            browse.ListenerToken = listenerToken;
            return(browse);
        }
Ejemplo n.º 2
0
 public static void PrintAlbumBrowse(SpotifySession aSession, AlbumBrowse aResult)
 {
     Console.WriteLine("Album browse of \"{0}\" ({1})", aResult.Album().Name(), aResult.Album().Year());
     for (int i = 0; i != aResult.NumCopyrights(); ++i)
     {
         Console.WriteLine("  Copyright: {0}", aResult.Copyright(i));
     }
     Console.WriteLine("  Tracks: {0}", aResult.NumTracks());
     Console.WriteLine("  Review: {0}", Truncate(aResult.Review(), 60));
     Console.WriteLine();
     for (int i = 0; i != aResult.NumTracks(); ++i)
     {
         PrintTrack(aSession, aResult.Track(i));
     }
     Console.WriteLine();
 }
Ejemplo n.º 3
0
 void PrintAlbumBrowse(AlbumBrowse aAlbumBrowse)
 {
     Printing.PrintAlbumBrowse(iSession, aAlbumBrowse);
 }
Ejemplo n.º 4
0
 void BrowseAlbumCallback(AlbumBrowse aResult, object aUserdata)
 {
     try
     {
         aResult.Error();
         PrintAlbumBrowse(aResult);
     }
     catch (SpotifyException e)
     {
         Console.Error.WriteLine("Failed to browse album: {0}", e.Message);
     }
     aResult.Dispose();
     iConsoleReader.RequestInput("> ");
 }
Ejemplo n.º 5
0
 private void AlbumBrowseCallBack(AlbumBrowse browse, object userdata)
 {
     //Implentation not required, but method must exist.
 }