SetId() private method

private SetId ( int id ) : void
id int
return void
Example #1
0
        public string GetSongUrl(string externalId)
        {
            string format;
            int databaseId, trackId;

            ToDaap(externalId, out databaseId, out trackId, out format);

            var database = this._client.Databases.FirstOrDefault(d => d.Id == databaseId);

            var track = new Track();
            track.SetId(trackId);
            track.Format = format;

            database.DownloadTrack(track, _tempFilename);

            return _tempFilename;
        }
Example #2
0
        public void AddTrack(Track track)
        {
            if (track.Id == 0)
                track.SetId (nextTrackId++);

            tracks.Add (track);
            basePlaylist.AddTrack (track);

            if (TrackAdded != null)
                TrackAdded (this, new TrackArgs (track));
        }