banshee r3326 - in trunk/musicbrainz-sharp/src/MusicBrainz: . MusicBrainz
- From: scottp svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3326 - in trunk/musicbrainz-sharp/src/MusicBrainz: . MusicBrainz
- Date: Mon, 25 Feb 2008 18:52:00 +0000 (GMT)
Author: scottp
Date: Mon Feb 25 18:52:00 2008
New Revision: 3326
URL: http://svn.gnome.org/viewvc/banshee?rev=3326&view=rev
Log:
* src/MusicBrainz/MusicBrainz/LocalDisc.cs: Added SubmissionUrl
property.
Modified:
trunk/musicbrainz-sharp/src/MusicBrainz/ChangeLog
trunk/musicbrainz-sharp/src/MusicBrainz/MusicBrainz/LocalDisc.cs
Modified: trunk/musicbrainz-sharp/src/MusicBrainz/MusicBrainz/LocalDisc.cs
==============================================================================
--- trunk/musicbrainz-sharp/src/MusicBrainz/MusicBrainz/LocalDisc.cs (original)
+++ trunk/musicbrainz-sharp/src/MusicBrainz/MusicBrainz/LocalDisc.cs Mon Feb 25 18:52:00 2008
@@ -77,6 +77,32 @@
get { return track_durations; }
}
+ string submission_url;
+ public string SubmissionUrl {
+ get {
+ if (submission_url == null) {
+ StringBuilder builder = new StringBuilder ();
+ builder.Append ("http://mm.musicbrainz.org/bare/cdlookup.html");
+ builder.Append ("?id=");
+ builder.Append (Id);
+ builder.Append ("&tracks=");
+ builder.Append (last_track);
+ builder.Append ("&toc=");
+ builder.Append (first_track);
+ builder.Append ('+');
+ builder.Append (last_track);
+ builder.Append ('+');
+ builder.Append (track_offsets [0]);
+ for (int i = first_track; i <= last_track; i++) {
+ builder.Append ('+');
+ builder.Append (track_offsets [i]);
+ }
+ submission_url = builder.ToString ();
+ }
+ return submission_url;
+ }
+ }
+
public static LocalDisc GetFromDevice (string device)
{
if (device == null) throw new ArgumentNullException ("device");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]