banshee r3434 - in trunk/banshee: . src/Core/Banshee.Core/Banshee.Base src/Core/Banshee.Services/Banshee.Database src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler
- From: abock svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3434 - in trunk/banshee: . src/Core/Banshee.Core/Banshee.Base src/Core/Banshee.Services/Banshee.Database src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler
- Date: Wed, 12 Mar 2008 23:30:10 +0000 (GMT)
Author: abock
Date: Wed Mar 12 23:30:10 2008
New Revision: 3434
URL: http://svn.gnome.org/viewvc/banshee?rev=3434&view=rev
Log:
2008-03-12 Aaron Bockover <abock gnome org>
* src/Core/Banshee.Core/Banshee.Base/Paths.cs: Change the application
data directory to banshee-1; create the directory if it doesn't exist;
added ExtensionsData to Paths
* src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs:
Copy the old library to the new path if it exists - this will allow
both old and new Banshee series to fully coexist
* src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/Queue.cs:
Use the ExtensionsData path
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.Core/Banshee.Base/Paths.cs
trunk/banshee/src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs
trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/Queue.cs
Modified: trunk/banshee/src/Core/Banshee.Core/Banshee.Base/Paths.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Core/Banshee.Base/Paths.cs (original)
+++ trunk/banshee/src/Core/Banshee.Core/Banshee.Base/Paths.cs Wed Mar 12 23:30:10 2008
@@ -127,10 +127,20 @@
}
private static string application_data = Path.Combine (Environment.GetFolderPath (
- Environment.SpecialFolder.ApplicationData), "banshee");
+ Environment.SpecialFolder.ApplicationData), "banshee-1");
public static string ApplicationData {
- get { return application_data; }
+ get {
+ if (!Directory.Exists (application_data)) {
+ Directory.CreateDirectory (application_data);
+ }
+
+ return application_data;
+ }
+ }
+
+ public static string ExtensionsData {
+ get { return Path.Combine (ApplicationData, "extensions"); }
}
public static string DefaultLibraryPath {
Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs (original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs Wed Mar 12 23:30:10 2008
@@ -70,6 +70,11 @@
if (ApplicationContext.CommandLine.Contains ("db")) {
return ApplicationContext.CommandLine["db"];
}
+
+ string proper_dbfile = Path.Combine (Paths.ApplicationData, "banshee.db");
+ if (File.Exists (proper_dbfile)) {
+ return proper_dbfile;
+ }
string dbfile = Path.Combine (Path.Combine (Environment.GetFolderPath (
Environment.SpecialFolder.ApplicationData),
@@ -87,8 +92,11 @@
dbfile = tdbfile;
}
}
-
- return dbfile;
+
+ Log.InformationFormat ("Copying your old Banshee Database to {0}", proper_dbfile);
+ File.Copy (dbfile, proper_dbfile);
+
+ return proper_dbfile;
}
}
Modified: trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/Queue.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/Queue.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/Queue.cs Wed Mar 12 23:30:10 2008
@@ -135,8 +135,7 @@
public Queue ()
{
- string xmlfilepath = Path.Combine (Path.Combine (Banshee.Base.Paths.ApplicationData,
- "plugins"), "last.fm");
+ string xmlfilepath = Path.Combine (Banshee.Base.Paths.ExtensionsData, "last.fm");
xml_path = Path.Combine (xmlfilepath, "audioscrobbler-queue.xml");
queue = new List<QueuedTrack> ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]