/// <summary> /// Gets a stream for a song. /// </summary> /// <returns>The stream.</returns> /// <param name="song">Song.</param> /// <param name="country">Country.</param> /// <param name="lowBitrate">Low bitrate stream</param> public Stream getStream(Song song, Country country, bool lowBitrate) { logger.Debug("get stream..."); Stream stream = this.Exexute<Stream>( new GsRequest( "getSubscriberStreamKey", new { songID = song.SongID, country = country, lowbitrate = lowBitrate } ) ); return stream; }
/// <summary> /// Marks the song stream complete. /// </summary> /// <param name="songs">The song.</param> /// <param name="stream">the stream.</param> public void MarkSongComplete(Song song, Stream stream) { logger.Debug("mark stream over 30 seconds"); this.Exexute<Response<string>>( new GsRequest( "markSongComplete", new { songID = song.SongID, streamKey = stream.StreamKey, streamServerID = stream.StreamServerID } ) ); }
/// <summary> /// Compare the specified song a and b. /// </summary> /// <param name="a">The alpha Song.</param> /// <param name="b">The blue Song.</param> public static int Compare(Song a, Song b) { if(a.Sort < b.Sort) return -1; else if(a.Sort > b.Sort) return -1; else return 0; }