Skip to content

Commit

Permalink
Device sync: Sanitized playlist filename (bug 1788)
Browse files Browse the repository at this point in the history
  • Loading branch information
jnwickremasinghe authored and thp committed Mar 27, 2013
1 parent 6b87dd7 commit 614f9b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gpodder/gtkui/desktop/deviceplaylist.py
Expand Up @@ -31,7 +31,7 @@ class gPodderDevicePlaylist(object):
def __init__(self, config, playlist_name):
self._config=config
self.linebreak = '\r\n'
self.playlist_file=playlist_name + '.m3u'
self.playlist_file=util.sanitize_filename(playlist_name + '.m3u')
self.playlist_folder = os.path.join(self._config.device_sync.device_folder, self._config.device_sync.playlists.folder)
self.mountpoint = util.find_mount_point(self.playlist_folder)
if self.mountpoint == '/':
Expand Down Expand Up @@ -84,7 +84,7 @@ def get_absolute_filename_for_playlist(self, episode):
"""
filename = self.get_filename_for_playlist(episode)
if self._config.device_sync.one_folder_per_podcast:
filename = os.path.join(episode.channel.title, filename)
filename = os.path.join(util.sanitize_filename(episode.channel.title), filename)
if self._config.device_sync.playlist.absolute_path:
filename = os.path.join(util.relpath(self.mountpoint, self._config.device_sync.device_folder), filename)
return filename
Expand Down

0 comments on commit 614f9b7

Please sign in to comment.