From: Roman Bazalevsky <rvb@rvb.name>
Date: Thu, 22 Oct 2015 10:32:00 +0000 (+0300)
Subject: Исправлена ошибка в генерации список в случае записей с пустыми именами.
X-Git-Url: https://git.rvb.name/vpproxy.git/commitdiff_plain/7bb418d8c7787d1ed6fcd421de8a49fc2738a36e?ds=sidebyside

Исправлена ошибка в генерации список в случае записей с пустыми именами.
---

diff --git a/plugins/m3u_plugin.py b/plugins/m3u_plugin.py
index 00a6193..90f529f 100644
--- a/plugins/m3u_plugin.py
+++ b/plugins/m3u_plugin.py
@@ -152,10 +152,11 @@ class M3u(VPProxyPlugin):
             playlistgen = PlaylistGenerator()
 
             for record in playlist:
-                channel=dict()
-                channel['name']=record.title.decode('utf-8')
-                channel['url']=record.path.decode('utf-8')            
-                playlistgen.addItem(channel)
+                if record.title:
+                    channel=dict()
+                    channel['name']=record.title.decode('utf-8')
+                    channel['url']=record.path.decode('utf-8')            
+                    playlistgen.addItem(channel)
 
             exported = playlistgen.exportm3u(hostport,prefix)