[banshee/stable-1.8] [Dap] Fix not transcoding some files when we should
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee/stable-1.8] [Dap] Fix not transcoding some files when we should
- Date: Sun, 7 Nov 2010 23:05:35 +0000 (UTC)
commit 3ba2eadba36955dbb30e48ea2f75aa05a793b583
Author: MichaÅ? Sawicz <michal sawicz net>
Date: Tue Nov 2 02:31:23 2010 +0100
[Dap] Fix not transcoding some files when we should
When a source file to be transferred to a DAP did not match any
available profile, it was not transcoded due to the fact that the
extension returned was null and many in AcceptableMimeTypes for a
device suffered the same. In that case null == null and no transcoding
was performed.
https://bugzilla.gnome.org/show_bug.cgi?id=633764
Signed-off-by: Gabriel Burt <gabriel burt gmail com>
src/Dap/Banshee.Dap/Banshee.Dap/DapSource.cs | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/Dap/Banshee.Dap/Banshee.Dap/DapSource.cs b/src/Dap/Banshee.Dap/Banshee.Dap/DapSource.cs
index 12078eb..e889bc8 100644
--- a/src/Dap/Banshee.Dap/Banshee.Dap/DapSource.cs
+++ b/src/Dap/Banshee.Dap/Banshee.Dap/DapSource.cs
@@ -337,10 +337,12 @@ namespace Banshee.Dap
protected bool TrackNeedsTranscoding (TrackInfo track)
{
- foreach (string mimetype in AcceptableMimeTypes) {
- if (ServiceManager.MediaProfileManager.GetExtensionForMimeType (track.MimeType) ==
- ServiceManager.MediaProfileManager.GetExtensionForMimeType (mimetype)) {
- return false;
+ string extension = ServiceManager.MediaProfileManager.GetExtensionForMimeType (track.MimeType);
+ if (extension != null) {
+ foreach (string mimetype in AcceptableMimeTypes) {
+ if (extension == ServiceManager.MediaProfileManager.GetExtensionForMimeType (mimetype)) {
+ return false;
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]