banshee r3393 - in trunk/banshee: . src/Core/Banshee.Core/Banshee.Collection src/Core/Banshee.Core/Banshee.Streaming src/Core/Banshee.Services/Banshee.Collection.Database src/Core/Banshee.Services/Banshee.Database src/Core/Banshee.Services/Banshee.Query
- From: gburt svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3393 - in trunk/banshee: . src/Core/Banshee.Core/Banshee.Collection src/Core/Banshee.Core/Banshee.Streaming src/Core/Banshee.Services/Banshee.Collection.Database src/Core/Banshee.Services/Banshee.Database src/Core/Banshee.Services/Banshee.Query
- Date: Fri, 7 Mar 2008 00:11:32 +0000 (GMT)
Author: gburt
Date: Fri Mar 7 00:11:32 2008
New Revision: 3393
URL: http://svn.gnome.org/viewvc/banshee?rev=3393&view=rev
Log:
2008-03-06 Gabriel Burt <gabriel burt gmail com>
* src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs:
* src/Core/Banshee.Core/Banshee.Streaming/CommonTags.cs:
* src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs:
* src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs:
* src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs:
Add Composer, Copyright, LicenseUri, and Comment columns to CoreTracks.
* src/Core/Banshee.Services/Banshee.Query/BansheeQuery.cs: Add Composer
field.
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs
trunk/banshee/src/Core/Banshee.Core/Banshee.Streaming/CommonTags.cs
trunk/banshee/src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs
trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs
trunk/banshee/src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs
trunk/banshee/src/Core/Banshee.Services/Banshee.Query/BansheeQuery.cs
Modified: trunk/banshee/src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs (original)
+++ trunk/banshee/src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs Fri Mar 7 00:11:32 2008
@@ -49,7 +49,11 @@
private string album_title;
private string track_title;
private string genre;
+ private string composer;
+ private string copyright;
+ private string license_uri;
+ private string comment;
private int track_number;
private int track_count;
private int disc;
@@ -193,6 +197,26 @@
set { year = value; }
}
+ public virtual string Composer {
+ get { return composer; }
+ set { composer = value; }
+ }
+
+ public virtual string Copyright {
+ get { return copyright; }
+ set { copyright = value; }
+ }
+
+ public virtual string LicenseUri {
+ get { return license_uri; }
+ set { license_uri = value; }
+ }
+
+ public virtual string Comment {
+ get { return comment; }
+ set { comment = value; }
+ }
+
public virtual int Rating {
get { return rating; }
set { rating = value; }
Modified: trunk/banshee/src/Core/Banshee.Core/Banshee.Streaming/CommonTags.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Core/Banshee.Streaming/CommonTags.cs (original)
+++ trunk/banshee/src/Core/Banshee.Core/Banshee.Streaming/CommonTags.cs Fri Mar 7 00:11:32 2008
@@ -39,6 +39,7 @@
public const string Genre = "genre";
public const string Disc = "disc";
public const string Comment = "comment";
+ public const string Composer = "composer";
public const string TrackNumber = "track-number";
public const string TrackCount = "track-count";
public const string AlbumVolumeNumber = "album-disc-number";
@@ -51,6 +52,7 @@
public const string Copyright = "copyright";
public const string Contact = "contact";
public const string License = "license";
+ public const string LicenseUri = "license-uri";
public const string Performer = "performer";
public const string Duration = "duration";
public const string Codec = "codec";
@@ -60,6 +62,7 @@
public const string NominalBitrate = "nominal-bitrate";
public const string MinimumBitrate = "minimum-bitrate";
public const string MaximumBitrate = "maximum-bitrate";
+ public const string BeatsPerMinute = "beats-per-minute";
public const string Serial = "serial";
public const string Encoder = "encoder";
public const string EncoderVersion = "encoder-version";
Modified: trunk/banshee/src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs (original)
+++ trunk/banshee/src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs Fri Mar 7 00:11:32 2008
@@ -92,6 +92,9 @@
track.AlbumTitle = Choose (file.Tag.Album, track.AlbumTitle, preferTrackInfo);
track.TrackTitle = Choose (file.Tag.Title, track.TrackTitle, preferTrackInfo);
track.Genre = Choose (file.Tag.FirstGenre, track.Genre, preferTrackInfo);
+ track.Composer = Choose (file.Tag.FirstComposer, track.Composer, preferTrackInfo);
+ track.Copyright = Choose (file.Tag.Copyright, track.Copyright, preferTrackInfo);
+ track.Comment = Choose (file.Tag.Comment, track.Comment, preferTrackInfo);
track.TrackNumber = Choose ((int)file.Tag.Track, track.TrackNumber, preferTrackInfo);
track.TrackCount = Choose ((int)file.Tag.TrackCount, track.TrackCount, preferTrackInfo);
@@ -119,6 +122,18 @@
case CommonTags.Genre:
track.Genre = Choose ((string)tag.Value, track.Genre);
break;
+ case CommonTags.Composer:
+ track.Composer = Choose ((string)tag.Value, track.Composer);
+ break;
+ case CommonTags.Copyright:
+ track.Copyright = Choose ((string)tag.Value, track.Copyright);
+ break;
+ case CommonTags.LicenseUri:
+ track.LicenseUri = Choose ((string)tag.Value, track.LicenseUri);
+ break;
+ case CommonTags.Comment:
+ track.Comment = Choose ((string)tag.Value, track.Comment);
+ break;
case CommonTags.TrackNumber:
int track_number = (int)tag.Value;
track.TrackNumber = track_number == 0 ? track.TrackNumber : track_number;
Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs (original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs Fri Mar 7 00:11:32 2008
@@ -251,6 +251,30 @@
get { return base.Genre; }
set { base.Genre = value; }
}
+
+ [DatabaseColumn]
+ public override string Composer {
+ get { return base.Composer; }
+ set { base.Composer = value; }
+ }
+
+ [DatabaseColumn]
+ public override string Copyright {
+ get { return base.Copyright; }
+ set { base.Copyright = value; }
+ }
+
+ [DatabaseColumn]
+ public override string LicenseUri {
+ get { return base.LicenseUri; }
+ set { base.LicenseUri = value; }
+ }
+
+ [DatabaseColumn]
+ public override string Comment {
+ get { return base.Comment; }
+ set { base.Comment = value; }
+ }
[DatabaseColumn]
public override int Rating {
Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs (original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs Fri Mar 7 00:11:32 2008
@@ -269,15 +269,8 @@
Execute ("INSERT INTO CorePrimarySources (StringID) VALUES ('Library')");
// TODO add these:
- // Comment
- // Composer
- // Copyright
- // LicenseUri
- //
// Others to consider:
// AlbumArtist (TPE2) (in CoreAlbums?)
- // Conductor (TPE3)
- // Remixer (TPE4)
Execute(@"
CREATE TABLE CoreTracks (
SourceID INTEGER NOT NULL,
@@ -300,7 +293,11 @@
Duration INTEGER,
Year INTEGER,
Genre TEXT,
+ Composer TEXT,
+ Copyright TEXT,
+ LicenseUri TEXT,
+ Comment TEXT,
Rating INTEGER,
PlayCount INTEGER,
SkipCount INTEGER,
@@ -462,6 +459,7 @@
Duration * 1000,
Year,
Genre,
+ NULL, NULL, NULL, NULL,
Rating,
NumberOfPlays,
0,
@@ -486,8 +484,6 @@
SELECT * FROM SmartPlaylists
");
- // TODO: Kick off some kind of scanner to find the file size of all the files
- // since that information was never in the old Banshee
ServiceManager.ServiceStarted += OnServiceStarted;
}
Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Query/BansheeQuery.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Query/BansheeQuery.cs (original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Query/BansheeQuery.cs Fri Mar 7 00:11:32 2008
@@ -114,6 +114,12 @@
Catalog.GetString ("genre"), "genre"
);
+ public static QueryField ComposerField = new QueryField (
+ "composer", Catalog.GetString ("Composer"), "CoreTracks.Composer", false,
+ // Translators: These are unique search fields. Please, no spaces. Blank ok.
+ Catalog.GetString ("composer"), "composer"
+ );
+
public static QueryField RatingField = new QueryField (
"rating", Catalog.GetString ("Rating"), "CoreTracks.Rating", typeof(RatingQueryValue),
// Translators: These are unique search fields. Please, no spaces. Blank ok.
@@ -190,7 +196,7 @@
);
public static QueryFieldSet FieldSet = new QueryFieldSet (
- ArtistField, AlbumField, DiscField, TitleField, YearField, GenreField, RatingField, PlayCountField,
+ ArtistField, AlbumField, DiscField, TitleField, YearField, GenreField, ComposerField, RatingField, PlayCountField,
SkipCountField, FileSizeField, UriField, DurationField, MimeTypeField, LastPlayedField,
DateAddedField, PlaylistField, SmartPlaylistField
);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]