forked from openlp/openlp
Just check for the tracks table before importing from it.
This commit is contained in:
parent
f82513f11d
commit
63139e8c3b
@ -97,6 +97,10 @@ class OpenLP1SongImport(SongImport):
|
|||||||
if self.stop_import_flag:
|
if self.stop_import_flag:
|
||||||
success = False
|
success = False
|
||||||
break
|
break
|
||||||
|
cursor.execute(u'SELECT name FROM sqlite_master '
|
||||||
|
u'WHERE type = \'table\' NAME name = \'tracks\'')
|
||||||
|
table_list = cursor.fetchall()
|
||||||
|
if len(table_list) > 0:
|
||||||
cursor.execute(u'SELECT fulltrackname FROM tracks t '
|
cursor.execute(u'SELECT fulltrackname FROM tracks t '
|
||||||
u'JOIN songtracks st ON t.trackid = st.trackid '
|
u'JOIN songtracks st ON t.trackid = st.trackid '
|
||||||
u'WHERE st.songid = %s ORDER BY st.listindex' % song_id)
|
u'WHERE st.songid = %s ORDER BY st.listindex' % song_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user