Commit 7dd545fd authored by Gabriel Burt's avatar Gabriel Burt Committed by Gabriel Burt

Slightly more useful job status, shows how many total downloads in the job

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).


svn path=/trunk/banshee/; revision=4475
parent 1fdd2fc0
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).
2008-09-05 Gabriel Burt <gabriel.burt@gmail.com>
* src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodSource.cs: Create a
......@@ -70,7 +70,10 @@ DEPENDENCIES
* 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
......
......@@ -9,9 +9,13 @@ AC_DEFUN([BANSHEE_CHECK_DAP_MTP],
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
......
......@@ -139,7 +139,7 @@ namespace Banshee.Podcasting.Gui
Application.Invoke (delegate {
lock (sync) {
if (downloadJob != null) {
downloadJob.UpdateStatus (args.RunningTasks, args.BytesPerSecond);
downloadJob.UpdateStatus (args.RunningTasks, args.RemainingTasks, args.CompletedTasks, args.BytesPerSecond);
}
}
});
......
......@@ -102,10 +102,10 @@ namespace Banshee.Podcasting.Gui
}
}
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 @@ namespace Banshee.Podcasting.Gui
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);
}
}
......
......@@ -178,6 +178,10 @@ namespace Mtp
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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment