[Banshee-List] Auto Scoring



This is a bit hackish but it works. I'm sure there are some things that I included that weren't necessary just because I don't really understand all of the goings on in banshee source. But it works!
Index: src/Clients/Booter/Booter/Entry.cs
===================================================================
--- src/Clients/Booter/Booter/Entry.cs	(revision 4650)
+++ src/Clients/Booter/Booter/Entry.cs	(working copy)
@@ -186,6 +186,7 @@
                     new LayoutOption ("query-track-count", Catalog.GetString ("Track Count")),
                     new LayoutOption ("query-disc", Catalog.GetString ("Disc Number")),
                     new LayoutOption ("query-year", Catalog.GetString ("Year")),
+	            new LayoutOption ("query-score", Catalog.GetString ("Score")),
                     new LayoutOption ("query-rating", Catalog.GetString ("Rating"))
                 ),
                 
Index: src/Core/Banshee.ThickClient/Banshee.Collection.Gui/DefaultColumnController.cs
===================================================================
--- src/Core/Banshee.ThickClient/Banshee.Collection.Gui/DefaultColumnController.cs	(revision 4650)
+++ src/Core/Banshee.ThickClient/Banshee.Collection.Gui/DefaultColumnController.cs	(working copy)
@@ -72,6 +72,7 @@
                 AlbumColumn,
                 CommentColumn,
                 RatingColumn,
+	        ScoreColumn,
                 DurationColumn,
                 GenreColumn,
                 YearColumn,
@@ -90,7 +91,7 @@
                 BpmColumn,
                 BitRateColumn,
                 ConductorColumn,
-                GroupingColumn
+                GroupingColumn     
             );
         }
 
@@ -131,7 +132,8 @@
             bitrate_column      = Create (BansheeQuery.BitRateField, 0.10, false, br_cell);
             
             rating_column       = Create (BansheeQuery.RatingField, 0.15, false, new ColumnCellRating (null, true));
-            composer_column     = CreateText (BansheeQuery.ComposerField, 0.25);
+	    score_column        = Create (BansheeQuery.ScoreField, 0.15, false, new ColumnCellPositiveInt (null, true, 2, 5));
+	    composer_column     = CreateText (BansheeQuery.ComposerField, 0.25);
             conductor_column    = CreateText (BansheeQuery.ConductorField, 0.25);
             grouping_column     = CreateText (BansheeQuery.GroupingField, 0.25);
             comment_column      = CreateText (BansheeQuery.CommentField, 0.25);
@@ -250,6 +252,11 @@
         public SortableColumn RatingColumn {
             get { return rating_column; }
         }
+		
+	private SortableColumn score_column;
+	public SortableColumn ScoreColumn {
+	    get { return score_column; }
+	}
         
         private SortableColumn last_played_column;
         public SortableColumn LastPlayedColumn {
Index: src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/StatisticsPage.cs
===================================================================
--- src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/StatisticsPage.cs	(revision 4650)
+++ src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/StatisticsPage.cs	(working copy)
@@ -144,6 +144,7 @@
                 ? track.LastSkipped.ToString () : Catalog.GetString ("Unknown"));
             AddItem (Catalog.GetString ("Play Count:"), track.PlayCount);
             AddItem (Catalog.GetString ("Skip Count:"), track.SkipCount);
+	    AddItem (Catalog.GetString ("Score:"), track.Score);
         }
         
         private void AddFileSizeItem (long bytes)
Index: src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs
===================================================================
--- src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs	(revision 4650)
+++ src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs	(working copy)
@@ -82,7 +82,7 @@
         {
             if (ProviderRefresh ()) {
                 base.IncrementPlayCount ();
-                Save (true, BansheeQuery.PlayCountField, BansheeQuery.LastPlayedField);
+                Save (true, BansheeQuery.PlayCountField, BansheeQuery.LastPlayedField, BansheeQuery.ScoreField);
             }
         }
 
@@ -90,7 +90,7 @@
         {
             if (ProviderRefresh ()) {
                 base.IncrementSkipCount ();
-                Save (true, BansheeQuery.SkipCountField, BansheeQuery.LastSkippedField);
+                Save (true, BansheeQuery.SkipCountField, BansheeQuery.LastSkippedField, BansheeQuery.ScoreField);
             }
         }
 
@@ -493,6 +493,12 @@
             get { return rating; }
             set { rating = value; }
         }
+	
+	[DatabaseColumn]
+	public override int Score {
+	    get { return base.Score; }
+	    set { base.Score = value; }
+	}
 
         public int SavedRating {
             get { return rating; }
@@ -503,6 +509,7 @@
                 }
             }
         }
+		
         
         [DatabaseColumn]
         public override int PlayCount {
Index: src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs
===================================================================
--- src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs	(revision 4650)
+++ src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs	(working copy)
@@ -52,7 +52,7 @@
         // NOTE: Whenever there is a change in ANY of the database schema,
         //       this version MUST be incremented and a migration method
         //       MUST be supplied to match the new version number
-        protected const int CURRENT_VERSION = 22;
+        protected const int CURRENT_VERSION = 23;
         protected const int CURRENT_METADATA_VERSION = 4;
         
 #region Migration Driver
@@ -549,7 +549,19 @@
         }
         
 #endregion
+		
+#region Version 23
+	[DatabaseVersion (23)]
+	private bool Migrate_23 ()
+	{
+	    Execute ("ALTER TABLE CoreTracks ADD COLUMN Score INTEGER DEFAULT 0");
+	    Execute ("ALTER TABLE CoreArtists ADD COLUMN Score INTEGER DEFAULT 0");
+	    Execute ("ALTER TABLE CoreAlbums ADD COLUMN Score INTEGER DEFAULT 0");
+	    return true;
+	}
 
+#endregion
+
 #pragma warning restore 0169
         
 #region Fresh database setup
@@ -629,6 +641,7 @@
 
                     Comment             TEXT,
                     Rating              INTEGER,
+		    Score		INTEGER,
                     PlayCount           INTEGER,
                     SkipCount           INTEGER,
                     LastPlayedStamp     INTEGER,
@@ -666,7 +679,8 @@
                     ArtistName          TEXT,
                     ArtistNameLowered   TEXT,
                     
-                    Rating              INTEGER
+                    Rating              INTEGER,
+                    Score		INTEGER
                 )
             ");
             Execute("CREATE INDEX CoreAlbumsIndex       ON CoreAlbums(ArtistID, TitleLowered)");
@@ -679,7 +693,8 @@
                     MusicBrainzID       TEXT,
                     Name                TEXT,
                     NameLowered         TEXT,
-                    Rating              INTEGER
+                    Rating              INTEGER,
+		    Score		INTEGER
                 )
             ");
             Execute("CREATE INDEX CoreArtistsIndex ON CoreArtists(NameLowered)");
@@ -758,7 +773,7 @@
         {
             Execute(@"
                 INSERT INTO CoreArtists 
-                    SELECT DISTINCT null, 0, null, Artist, NULL, 0 
+                    SELECT DISTINCT null, 0, null, Artist, NULL, 0, 0 
                         FROM Tracks 
                         ORDER BY Artist
             ");
@@ -770,7 +785,7 @@
                             FROM CoreArtists 
                             WHERE Name = Tracks.Artist
                             LIMIT 1),
-                        0, null, AlbumTitle, NULL, ReleaseDate, 0, 0, 0, Artist, NULL, 0
+                        0, null, AlbumTitle, NULL, ReleaseDate, 0, 0, 0, Artist, NULL, 0, 0
                         FROM Tracks
                         ORDER BY AlbumTitle
             ");
@@ -806,6 +821,7 @@
                         Genre,
                         NULL, NULL, NULL, NULL, NULL, NULL,
                         Rating,
+			Score,
                         NumberOfPlays,
                         0,
                         LastPlayedStamp,
Index: src/Core/Banshee.Services/Banshee.Query/BansheeQuery.cs
===================================================================
--- src/Core/Banshee.Services/Banshee.Query/BansheeQuery.cs	(revision 4650)
+++ src/Core/Banshee.Services/Banshee.Query/BansheeQuery.cs	(working copy)
@@ -69,6 +69,9 @@
             CreateQueryOrder ("Rating",     desc, Catalog.GetString ("Highest Rating"), RatingField),
             CreateQueryOrder ("Rating",     asc,  Catalog.GetString ("Lowest Rating"), RatingField),
             null,
+	    CreateQueryOrder ("Score",      desc, Catalog.GetString ("Highest Score"), ScoreField),
+	    CreateQueryOrder ("Score",      asc,  Catalog.GetString ("Lowest Score"), ScoreField),
+	    null,
             CreateQueryOrder ("PlayCount",  desc, Catalog.GetString ("Most Often Played"), PlayCountField),
             CreateQueryOrder ("PlayCount",  asc,  Catalog.GetString ("Least Often Played"), PlayCountField),
             null,
@@ -309,14 +312,22 @@
             "CoreTracks.TrackID {2} IN (SELECT TrackID FROM CoreSmartPlaylistEntries WHERE SmartPlaylistID = {1})", typeof(SmartPlaylistQueryValue),
             "smartplaylistid", "smartplaylist"
         );
-        
+		
+        public static QueryField ScoreField = new QueryField (
+            "score", "Score",
+            Catalog.GetString ("Score"), "CoreTracks.Score", typeof(IntegerQueryValue),
+            // Translators: These are unique search fields (and nouns).  Please, no spaces. Blank ok.
+            Catalog.GetString ("score"),
+            "score"
+        );
+	
 #endregion
 
         public static QueryFieldSet FieldSet = new QueryFieldSet (
             ArtistField, AlbumField, AlbumArtistField, TitleField, TrackNumberField, TrackCountField, DiscNumberField, DiscCountField,
             YearField, GenreField, ComposerField, ConductorField, GroupingField, CommentField, RatingField, PlayCountField,
             SkipCountField, FileSizeField, UriField, DurationField, MimeTypeField, LastPlayedField, LastSkippedField,
-            BpmField, BitRateField, DateAddedField, PlaylistField, SmartPlaylistField
+            BpmField, BitRateField, DateAddedField, PlaylistField, SmartPlaylistField, ScoreField
         );
 
         // Type Initializer
@@ -411,6 +422,7 @@
                 case "genre":
                 case "duration":
                 case "rating":
+		case "score":
                 case "playcount":
                 case "skipcount":
                 case "filesize":
@@ -421,6 +433,7 @@
                 case "mimetype":
                 case "composer":
                 case "comment":
+		
                     sort_query = String.Format (
                         "CoreTracks.{0} {1}, {2}",
                         column ?? key, ascDesc, default_sort
Index: src/Core/Banshee.Services/Banshee.SmartPlaylist/Migrator.cs
===================================================================
--- src/Core/Banshee.Services/Banshee.SmartPlaylist/Migrator.cs	(revision 4650)
+++ src/Core/Banshee.Services/Banshee.SmartPlaylist/Migrator.cs	(working copy)
@@ -92,6 +92,8 @@
             order_hash.Add ("Title",                BansheeQuery.FindOrder ("Title", true));
             order_hash.Add ("Rating DESC",          BansheeQuery.FindOrder ("Rating", false));
             order_hash.Add ("Rating ASC",           BansheeQuery.FindOrder ("Rating", true));
+	    order_hash.Add ("Score DESC",           BansheeQuery.FindOrder ("Score", false));
+	    order_hash.Add ("Score ASC",            BansheeQuery.FindOrder ("Score", true));
             order_hash.Add ("NumberOfPlays DESC",   BansheeQuery.FindOrder ("PlayCount", false));
             order_hash.Add ("NumberOfPlays ASC",    BansheeQuery.FindOrder ("PlayCount", true));
             order_hash.Add ("DateAddedStamp DESC",  BansheeQuery.FindOrder ("DateAddedStamp", false));
Index: src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs
===================================================================
--- src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs	(revision 4650)
+++ src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs	(working copy)
@@ -84,6 +84,7 @@
         private int disc_count;
         private int year;
         private int rating;
+	private int score;
         private int bpm;
         private int bit_rate;
 
@@ -106,13 +107,32 @@
         public virtual void IncrementPlayCount ()
         {
             LastPlayed = DateTime.Now;
-            PlayCount++;
+	    int totalPlays = PlayCount + SkipCount;
+            if (totalPlays <= 0)
+		Score = ((Score + 100) / 2);
+	    else
+		Score = (int) Math.Ceiling(((((double)Score * (double)totalPlays) + 100.0) / (double)(totalPlays + 1)));
+	    
+	    if (Score <= 0){
+		Score = 1;
+	    }
+	    PlayCount++;
+            
         }
 
         public virtual void IncrementSkipCount ()
         {
             LastSkipped = DateTime.Now;
-            SkipCount++;
+	    int totalPlays = PlayCount + SkipCount;
+            if (totalPlays <= 0)
+		Score = ((Score + 1) / 2);
+	    else
+		Score = (((Score * totalPlays) + 1) / (totalPlays + 1));
+	    
+	    if (Score <= 0){
+		Score = 1;
+	    }
+	    SkipCount++;
         }
 
         public override string ToString ()
@@ -355,6 +375,12 @@
             get { return rating; }
             set { rating = value; }
         }
+		
+	[Exportable]
+	public virtual int Score {
+	    get { return score; }
+	    set { score = value; }
+	}
         
         [Exportable]
         public virtual int Bpm {
Index: src/Core/Banshee.Core/Banshee.Core.csproj
===================================================================
--- src/Core/Banshee.Core/Banshee.Core.csproj	(revision 4650)
+++ src/Core/Banshee.Core/Banshee.Core.csproj	(working copy)
@@ -1,132 +1,141 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>8.0.50727</ProductVersion>
-    <ProjectGuid>{2ADB831A-A050-47D0-B6B9-9C19D60233BB}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <UseParentDirectoryAsNamespace>true</UseParentDirectoryAsNamespace>
-    <AssemblyName>Banshee.Core</AssemblyName>
-    <SchemaVersion>2.0</SchemaVersion>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>..\..\..\bin</OutputPath>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
-    <AssemblyKeyFile>.</AssemblyKeyFile>
-  </PropertyGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\..\Libraries\Hyena\Hyena.csproj">
-      <Project>{95374549-9553-4C1E-9D89-667755F90E12}</Project>
-      <Name>Hyena</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\Libraries\Lastfm\Lastfm.csproj">
-      <Project>{C1F63FC5-4B96-48B2-B7F7-5B33FCC4F2A2}</Project>
-      <Name>Lastfm</Name>
-      <Private>False</Private>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
-    <Reference Include="Mono.Posix" />
-    <Reference Include="Mono.Addins, Version=0.3.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
-    <Reference Include="taglib-sharp, Version=2.0.3.0, Culture=neutral, PublicKeyToken=db62eba44689b5b0" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="Banshee.Kernel\IInstanceCriticalJob.cs" />
-    <Compile Include="Banshee.Kernel\IJob.cs" />
-    <Compile Include="Banshee.Kernel\Job.cs" />
-    <Compile Include="Banshee.Kernel\JobPriority.cs" />
-    <Compile Include="Banshee.Kernel\Scheduler.cs" />
-    <Compile Include="Banshee.Configuration\SchemaEntry.cs" />
-    <Compile Include="Banshee.Base\FileNamePattern.cs" />
-    <Compile Include="Banshee.Base\Paths.cs" />
-    <Compile Include="Banshee.Base\SafeUri.cs" />
-    <Compile Include="Banshee.Base\UriList.cs" />
-    <Compile Include="Banshee.Collection\AlbumInfo.cs" />
-    <Compile Include="Banshee.Collection\ArtistInfo.cs" />
-    <Compile Include="Banshee.Collection\ITrackInfo.cs" />
-    <Compile Include="Banshee.Collection\TrackInfo.cs" />
-    <Compile Include="Banshee.IO\IProvider.cs" />
-    <Compile Include="Banshee.IO\Provider.cs" />
-    <Compile Include="Banshee.IO\Utilities.cs" />
-    <Compile Include="Banshee.Base\ApplicationContext.cs" />
-    <Compile Include="Banshee.Collection\FileTrackInfo.cs" />
-    <Compile Include="Banshee.Collection\SampleTrackInfo.cs" />
-    <Compile Include="Banshee.Collection\UnknownTrackInfo.cs" />
-    <Compile Include="Banshee.Collection\TrackAttributes.cs" />
-    <Compile Include="Banshee.Collection\TrackFilterType.cs" />
-    <Compile Include="Banshee.Base\PlatformHacks.cs" />
-    <Compile Include="Banshee.Streaming\CommonTags.cs" />
-    <Compile Include="Banshee.Streaming\SaveTrackMetadataJob.cs" />
-    <Compile Include="Banshee.Streaming\StreamTag.cs" />
-    <Compile Include="Banshee.Streaming\StreamTagger.cs" />
-    <Compile Include="Banshee.Streaming\StreamPlaybackError.cs" />
-    <Compile Include="Banshee.Collection\IBasicTrackInfo.cs" />
-    <Compile Include="Banshee.Configuration.Schema\ImportSchema.cs" />
-    <Compile Include="Banshee.Configuration.Schema\LibrarySchema.cs" />
-    <Compile Include="Banshee.Base\ProductInformation.cs" />
-    <Compile Include="Banshee.Base\Localization.cs" />
-    <Compile Include="Banshee.Configuration\XmlConfigurationClient.cs" />
-    <Compile Include="Banshee.Base\CoverArtSpec.cs" />
-    <Compile Include="Banshee.I18n\AssemblyCatalogAttribute.cs" />
-    <Compile Include="Banshee.I18n\Catalog.cs" />
-    <Compile Include="Banshee.IO\IFile.cs" />
-    <Compile Include="Banshee.IO\IDirectory.cs" />
-    <Compile Include="Banshee.IO\Directory.cs" />
-    <Compile Include="Banshee.IO.SystemIO\Directory.cs" />
-    <Compile Include="Banshee.IO.SystemIO\File.cs" />
-    <Compile Include="Banshee.IO.SystemIO\Provider.cs" />
-    <Compile Include="Banshee.IO\IDemuxVfs.cs" />
-    <Compile Include="Banshee.IO\File.cs" />
-    <Compile Include="Banshee.IO.SystemIO\DemuxVfs.cs" />
-    <Compile Include="Banshee.Base\Resource.cs" />
-    <Compile Include="Banshee.IO\DemuxVfs.cs" />
-    <Compile Include="Banshee.IO\StreamAssist.cs" />
-    <Compile Include="Banshee.Base\NamingUtil.cs" />
-    <Compile Include="Banshee.Configuration\ConfigurationClient.cs" />
-    <Compile Include="Banshee.Configuration\IConfigurationClient.cs" />
-    <Compile Include="Banshee.Collection\TrackMediaAttributes.cs" />
-    <Compile Include="Banshee.Base\XdgBaseDirectorySpec.cs" />
-    <Compile Include="Banshee.Base\Tests\FileNamePatternTests.cs" />
-    <Compile Include="Banshee.Base\Tests\TaglibReadWriteTests.cs" />
-    <Compile Include="Banshee.Kernel\DelegateJob.cs" />
-    <Compile Include="Banshee.Collection\CacheableItem.cs" />
-    <Compile Include="Banshee.IO\DirectoryScannerPipelineElement.cs" />
-    <Compile Include="Banshee.Configuration\MemoryConfigurationClient.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <EmbeddedResource Include="Resources\contributors.xml">
-      <LogicalName>contributors.xml</LogicalName>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Resources\translators.xml">
-      <LogicalName>translators.xml</LogicalName>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Resources\COPYING">
-      <LogicalName>COPYING</LogicalName>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Banshee.Core.addin.xml" />
-  </ItemGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-  <ProjectExtensions>
-    <MonoDevelop>
-      <Properties>
-        <GtkDesignInfo />
-        <MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="true" RelativeMakefileName="./Makefile.am">
-          <BuildFilesVar Sync="true" Name="SOURCES" />
-          <DeployFilesVar />
-          <ResourcesVar Sync="true" Name="RESOURCES" />
-          <OthersVar />
-          <GacRefVar />
-          <AsmRefVar />
-          <ProjectRefVar />
-        </MonoDevelop.Autotools.MakefileInfo>
-      </Properties>
-    </MonoDevelop>
-  </ProjectExtensions>
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.50727</ProductVersion>
+    <ProjectGuid>{2ADB831A-A050-47D0-B6B9-9C19D60233BB}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <UseParentDirectoryAsNamespace>true</UseParentDirectoryAsNamespace>
+    <AssemblyName>Banshee.Core</AssemblyName>
+    <SchemaVersion>2.0</SchemaVersion>
+    <RootNamespace>
+    </RootNamespace>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>..\..\..\bin\</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
+    <AssemblyKeyFile>.</AssemblyKeyFile>
+    <OutputType>Library</OutputType>
+    <AssemblyName>Banshee.Core</AssemblyName>
+    <RootNamespace>
+    </RootNamespace>
+    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+    <DefineConstants>
+    </DefineConstants>
+  </PropertyGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\Libraries\Hyena\Hyena.csproj">
+      <Project>{95374549-9553-4C1E-9D89-667755F90E12}</Project>
+      <Name>Hyena</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\Libraries\Lastfm\Lastfm.csproj">
+      <Project>{C1F63FC5-4B96-48B2-B7F7-5B33FCC4F2A2}</Project>
+      <Name>Lastfm</Name>
+      <Private>False</Private>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Include="Mono.Posix" />
+    <Reference Include="Mono.Addins, Version=0.3.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
+    <Reference Include="taglib-sharp, Version=2.0.3.0, Culture=neutral, PublicKeyToken=db62eba44689b5b0" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Banshee.Kernel\IInstanceCriticalJob.cs" />
+    <Compile Include="Banshee.Kernel\IJob.cs" />
+    <Compile Include="Banshee.Kernel\Job.cs" />
+    <Compile Include="Banshee.Kernel\JobPriority.cs" />
+    <Compile Include="Banshee.Kernel\Scheduler.cs" />
+    <Compile Include="Banshee.Configuration\SchemaEntry.cs" />
+    <Compile Include="Banshee.Base\FileNamePattern.cs" />
+    <Compile Include="Banshee.Base\Paths.cs" />
+    <Compile Include="Banshee.Base\SafeUri.cs" />
+    <Compile Include="Banshee.Base\UriList.cs" />
+    <Compile Include="Banshee.Collection\AlbumInfo.cs" />
+    <Compile Include="Banshee.Collection\ArtistInfo.cs" />
+    <Compile Include="Banshee.Collection\ITrackInfo.cs" />
+    <Compile Include="Banshee.Collection\TrackInfo.cs" />
+    <Compile Include="Banshee.IO\IProvider.cs" />
+    <Compile Include="Banshee.IO\Provider.cs" />
+    <Compile Include="Banshee.IO\Utilities.cs" />
+    <Compile Include="Banshee.Base\ApplicationContext.cs" />
+    <Compile Include="Banshee.Collection\FileTrackInfo.cs" />
+    <Compile Include="Banshee.Collection\SampleTrackInfo.cs" />
+    <Compile Include="Banshee.Collection\UnknownTrackInfo.cs" />
+    <Compile Include="Banshee.Collection\TrackAttributes.cs" />
+    <Compile Include="Banshee.Collection\TrackFilterType.cs" />
+    <Compile Include="Banshee.Base\PlatformHacks.cs" />
+    <Compile Include="Banshee.Streaming\CommonTags.cs" />
+    <Compile Include="Banshee.Streaming\SaveTrackMetadataJob.cs" />
+    <Compile Include="Banshee.Streaming\StreamTag.cs" />
+    <Compile Include="Banshee.Streaming\StreamTagger.cs" />
+    <Compile Include="Banshee.Streaming\StreamPlaybackError.cs" />
+    <Compile Include="Banshee.Collection\IBasicTrackInfo.cs" />
+    <Compile Include="Banshee.Configuration.Schema\ImportSchema.cs" />
+    <Compile Include="Banshee.Configuration.Schema\LibrarySchema.cs" />
+    <Compile Include="Banshee.Base\ProductInformation.cs" />
+    <Compile Include="Banshee.Base\Localization.cs" />
+    <Compile Include="Banshee.Configuration\XmlConfigurationClient.cs" />
+    <Compile Include="Banshee.Base\CoverArtSpec.cs" />
+    <Compile Include="Banshee.I18n\AssemblyCatalogAttribute.cs" />
+    <Compile Include="Banshee.I18n\Catalog.cs" />
+    <Compile Include="Banshee.IO\IFile.cs" />
+    <Compile Include="Banshee.IO\IDirectory.cs" />
+    <Compile Include="Banshee.IO\Directory.cs" />
+    <Compile Include="Banshee.IO.SystemIO\Directory.cs" />
+    <Compile Include="Banshee.IO.SystemIO\File.cs" />
+    <Compile Include="Banshee.IO.SystemIO\Provider.cs" />
+    <Compile Include="Banshee.IO\IDemuxVfs.cs" />
+    <Compile Include="Banshee.IO\File.cs" />
+    <Compile Include="Banshee.IO.SystemIO\DemuxVfs.cs" />
+    <Compile Include="Banshee.Base\Resource.cs" />
+    <Compile Include="Banshee.IO\DemuxVfs.cs" />
+    <Compile Include="Banshee.IO\StreamAssist.cs" />
+    <Compile Include="Banshee.Base\NamingUtil.cs" />
+    <Compile Include="Banshee.Configuration\ConfigurationClient.cs" />
+    <Compile Include="Banshee.Configuration\IConfigurationClient.cs" />
+    <Compile Include="Banshee.Collection\TrackMediaAttributes.cs" />
+    <Compile Include="Banshee.Base\XdgBaseDirectorySpec.cs" />
+    <Compile Include="Banshee.Base\Tests\FileNamePatternTests.cs" />
+    <Compile Include="Banshee.Base\Tests\TaglibReadWriteTests.cs" />
+    <Compile Include="Banshee.Kernel\DelegateJob.cs" />
+    <Compile Include="Banshee.Collection\CacheableItem.cs" />
+    <Compile Include="Banshee.IO\DirectoryScannerPipelineElement.cs" />
+    <Compile Include="Banshee.Configuration\MemoryConfigurationClient.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Resources\contributors.xml">
+      <LogicalName>contributors.xml</LogicalName>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Resources\translators.xml">
+      <LogicalName>translators.xml</LogicalName>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Resources\COPYING">
+      <LogicalName>COPYING</LogicalName>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Banshee.Core.addin.xml" />
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <ProjectExtensions>
+    <MonoDevelop>
+      <Properties>
+        <GtkDesignInfo />
+        <MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="true" RelativeMakefileName="./Makefile.am">
+          <BuildFilesVar Sync="true" Name="SOURCES" />
+          <DeployFilesVar />
+          <ResourcesVar Sync="true" Name="RESOURCES" />
+          <OthersVar />
+          <GacRefVar />
+          <AsmRefVar />
+          <ProjectRefVar />
+        </MonoDevelop.Autotools.MakefileInfo>
+      </Properties>
+    </MonoDevelop>
+  </ProjectExtensions>
 </Project>
\ No newline at end of file
Index: src/Libraries/Mtp/Mtp/Track.cs
===================================================================
--- src/Libraries/Mtp/Mtp/Track.cs	(revision 4650)
+++ src/Libraries/Mtp/Mtp/Track.cs	(working copy)
@@ -108,6 +108,13 @@
 				trackStruct.rating = value;
 			}
 		}
+		
+		public ushort Score {
+			get { return trackStruct.score; }
+			set {
+				trackStruct.score = value;
+			}
+		}
 
 		public uint SampleRate {
 			get { return trackStruct.samplerate; }
@@ -296,6 +303,7 @@
 		public uint bitrate;
 		public ushort bitratetype;
 		public ushort rating;    // 0 -> 100
+		public ushort score;
 		public uint usecount;
 		public ulong filesize;
 		public FileType filetype;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]