summaryrefslogtreecommitdiff
blob: 89acf190b923c0a7ca4dae0504075df46e7a0514 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
Index: xl/media/__init__.py
===================================================================
--- xl/media/__init__.py	(revision 2146)
+++ xl/media/__init__.py	(working copy)
@@ -117,7 +117,7 @@
 
         # This would be more nicely written using conditional expressions
         # but that is Python 2.5 only
-	if type(title) is unicode:
+        if type(title) is unicode:
             self._title = title
         else:
             self._title = unicode(title, encoding)
Index: xl/player.py
===================================================================
--- xl/player.py	(revision 2146)
+++ xl/player.py	(working copy)
@@ -302,11 +302,11 @@
                 self.on_sync_message))
 
             if '://' not in uri: 
-                if not os.path.isfile(uri):
+                if not os.path.isfile(uri.encode('latin1')):
                     raise Exception('Specified file does not exist')
 
                 uri = 'file://%s' % uri
-            self.playbin.set_property('uri', uri)
+            self.playbin.set_property('uri', uri.encode('latin1'))
 
         self.playbin.set_state(gst.STATE_PLAYING)
 
Index: xl/panels.py
===================================================================
--- xl/panels.py	(revision 2146)
+++ xl/panels.py	(working copy)
@@ -378,8 +378,8 @@
             loc = ["device_%s://%s" % (driver_name, 
                 urllib.quote(l.loc)) for l in loc]
         else:
-            loc = [urllib.quote(str(l.loc)) for l in loc]
-            
+            loc = [urllib.quote(l.loc.encode('latin1')) for l in loc]
+        
         selection.set_uris(loc)
 
     def append_recursive(self, iter, add):
@@ -2721,7 +2721,7 @@
         """
 
         songs = self.get_selected_songs()
-        uris = [song.loc for song in songs]
+        uris = [urllib.quote(song.loc.encode('latin1')) for song in songs]
 
         sel.set_uris(uris)
 
Index: xl/trackslist.py
===================================================================
--- xl/trackslist.py	(revision 2146)
+++ xl/trackslist.py	(working copy)
@@ -153,7 +153,7 @@
         # first, check to see if they dropped a folder
         copy = loc[:]
         for l in copy:
-            l = urllib.unquote(l)
+            l = urllib.unquote_plus(l)
             if os.path.isdir(l.replace("file://", "")):
                 # in this case, it is a folder
                 for root, dirs, files in os.walk(l.replace("file://", '')):
@@ -174,7 +174,7 @@
 
         for l in loc:
             l = l.replace("file://", "")
-            l = urllib.unquote(l)
+            l = urllib.unquote_plus(l)
             m = re.search(r'^device_(\w+)://', l)
             if m:
                 song = self.exaile.device_panel.get_song(l)