summaryrefslogtreecommitdiffstats
path: root/multimedia/flowblade/gnomevfs.patch
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/flowblade/gnomevfs.patch')
-rw-r--r--multimedia/flowblade/gnomevfs.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/multimedia/flowblade/gnomevfs.patch b/multimedia/flowblade/gnomevfs.patch
new file mode 100644
index 0000000000..0dc747c4d8
--- /dev/null
+++ b/multimedia/flowblade/gnomevfs.patch
@@ -0,0 +1,43 @@
+--- ./flowblade-0.10.0/Flowblade/sequence.py 2013-09-14 09:49:39.000000000 -0400
++++ sequence.py 2013-11-28 22:34:02.454226123 -0500
+@@ -24,7 +24,7 @@
+ """
+
+ import copy
+-import gnomevfs
++import urllib, mimetypes
+ import mlt
+ import time #added when testing
+ import types
+@@ -914,8 +914,13 @@
+ """
+ Returns media type of file.
+ """
++ # using urllib and mimetype for non gnome environments
+ try:
+- mime_type = gnomevfs.get_mime_type(file_path)
++ url = urllib.pathname2url(file_path)
++ mime_guess = mimetypes.guess_type(url)
++ mime_string = mime_guess[0]
++ mime_type = str.split(mime_string, "/")
++
+ except Exception, err:
+ if not os.path.exists(file_path):
+ # We're doing a heuristic here to identify image sequence file_paths.
+@@ -932,13 +937,13 @@
+ else:
+ return UNKNOWN
+
+- if mime_type.startswith("video"):
++ if mime_type[0] == "video":
+ return VIDEO
+
+- if mime_type.startswith("audio"):
++ if mime_type[0] == "audio":
+ return AUDIO
+
+- if mime_type.startswith("image"):
++ if mime_type[0] == "image":
+ return IMAGE
+
+ return UNKNOWN