banshee r4475 - in trunk/banshee: . build/m4/banshee src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/DownloadManager src/Libraries/Mtp/Mtp



Author: gburt
Date: Fri Sep  5 20:30:24 2008
New Revision: 4475
URL: http://svn.gnome.org/viewvc/banshee?rev=4475&view=rev

Log:
2008-09-05  Gabriel Burt  <gabriel burt gmail com>

	* src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/DownloadManager/DownloadUserJob.cs:
	* src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/DownloadManager/DownloadManagerInterface.cs:
	Slightly more useful job status, shows how many total downloads in the job

	* src/Libraries/Mtp/Mtp/Track.cs: Hack around .m4v issue.

	* build/m4/banshee/dap-mtp.m4:
	* NEWS: Don't allow libmtp8 for now, and clarify how packages need to
	require libmtp (to ensure users have the same version the package was
	compiled against).



Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/NEWS
   trunk/banshee/build/m4/banshee/dap-mtp.m4
   trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/DownloadManager/DownloadManagerInterface.cs
   trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/DownloadManager/DownloadUserJob.cs
   trunk/banshee/src/Libraries/Mtp/Mtp/Track.cs

Modified: trunk/banshee/NEWS
==============================================================================
--- trunk/banshee/NEWS	(original)
+++ trunk/banshee/NEWS	Fri Sep  5 20:30:24 2008
@@ -70,7 +70,10 @@
     * TagLib# (taglib-sharp) 2.0
 
     * Required to build default feature stack:
-      * libmtp >= 0.2.0 (0.2.6 recommended)
+      * libmtp >= 0.2.0 and < 0.3.0 (0.2.6 recommended)
+        * Note to packagers: since libmtp has different .so files for
+          different versions, you need to require in your package the same
+          version of libmtp you used to build Banshee.
       * ipod-sharp >= 0.8.0
       * mono-zeroconf >= 0.7.3
       * boo >= 0.8.1

Modified: trunk/banshee/build/m4/banshee/dap-mtp.m4
==============================================================================
--- trunk/banshee/build/m4/banshee/dap-mtp.m4	(original)
+++ trunk/banshee/build/m4/banshee/dap-mtp.m4	Fri Sep  5 20:30:24 2008
@@ -9,9 +9,13 @@
 	PKG_CHECK_MODULES(LIBMTP,
 		libmtp >= $LIBMTP_REQUIRED,
 		enable_libmtp="$enable_libmtp", enable_libmtp=no)
+
+	PKG_CHECK_MODULES(LIBMTP,
+		libmtp < 0.3.0,
+		enable_libmtp="$enable_libmtp", enable_libmtp=no)
 		
 	if test "x$enable_mtp" = "xyes" -a "x$enable_libmtp" = "xno"; then
-		AC_MSG_ERROR([libmtp was not found or is not up to date. Please install libmtp of at least version $LIBMTP_REQUIRED, or disable MTP support by passing --disable-mtp])
+		AC_MSG_ERROR([libmtp was not found or is not up to date. Please install libmtp of at least version $LIBMTP_REQUIRED and less than 0.3.0, or disable MTP support by passing --disable-mtp])
 	fi
 
 	if test "x$enable_libmtp" = "xyes"; then

Modified: trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/DownloadManager/DownloadManagerInterface.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/DownloadManager/DownloadManagerInterface.cs	(original)
+++ trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/DownloadManager/DownloadManagerInterface.cs	Fri Sep  5 20:30:24 2008
@@ -139,7 +139,7 @@
             Application.Invoke (delegate {            
                 lock (sync) {
                     if (downloadJob != null) {
-                        downloadJob.UpdateStatus (args.RunningTasks, args.BytesPerSecond);
+                        downloadJob.UpdateStatus (args.RunningTasks, args.RemainingTasks, args.CompletedTasks, args.BytesPerSecond);
                     }
                 }             
             });            

Modified: trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/DownloadManager/DownloadUserJob.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/DownloadManager/DownloadUserJob.cs	(original)
+++ trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/DownloadManager/DownloadUserJob.cs	Fri Sep  5 20:30:24 2008
@@ -102,10 +102,10 @@
             }
         }
         
-        public void UpdateStatus (int downloads, long bytesPerSecond)
+        public void UpdateStatus (int downloading, int remaining, int completed, long bytesPerSecond)
         {
-            if (downloads < 0) {
-                throw new ArgumentException ("downloads:  Must be positive.");                
+            if (downloading < 0) {
+                throw new ArgumentException ("downloading:  Must be positive.");                
             } else if (bytesPerSecond < 0) {
                 bytesPerSecond = 0;
             }
@@ -114,14 +114,14 @@
                 if (canceled || cancelRequested || disposed) {
                     return;
                 }
-                
-                Status = String.Format (
-                    Catalog.GetPluralString (
-                        "Currently transfering {0} file at {1} KB/s",            
-                        "Currently transfering {0} files at {1} KB/s",
-                        downloads
-                    ), downloads, (bytesPerSecond / 1000)            
-                );                 
+
+                int total = remaining + completed;
+                string fmt = Catalog.GetPluralString (
+                        "Currently transfering {0} file at {1} KB/s",
+                        "Currently transfering {0} of {2} files at {1} KB/s", total
+                );
+
+                Status = String.Format (fmt, downloading, (bytesPerSecond / 1024), total);
             }
         }   
         

Modified: trunk/banshee/src/Libraries/Mtp/Mtp/Track.cs
==============================================================================
--- trunk/banshee/src/Libraries/Mtp/Mtp/Track.cs	(original)
+++ trunk/banshee/src/Libraries/Mtp/Mtp/Track.cs	Fri Sep  5 20:30:24 2008
@@ -178,6 +178,10 @@
             if (ext.Length > 0)
                 ext = ext.Substring (1, ext.Length - 1);
 
+            // this is a hack
+            if (ext == "m4v" || ext == "M4V")
+                ext = "mp4";
+
             FileType type = (FileType) Enum.Parse (typeof(FileType), ext, true);
             //if (type == null)
             //    return FileType.UNKNOWN;



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