forked from openlp/openlp
string change, close file, MarkType
This commit is contained in:
parent
62643d7d5e
commit
ce0abd19bd
|
@ -35,9 +35,14 @@ from openlp.plugins.bibles.lib.db import BibleDB, BibleMeta
|
|||
|
||||
from csvbible import CSVBible
|
||||
from http import HTTPBible
|
||||
from openlp1 import OpenLP1Bible
|
||||
from opensong import OpenSongBible
|
||||
from osis import OSISBible
|
||||
# Imports that might fail.
|
||||
try:
|
||||
from openlp1 import OpenLP1Bible
|
||||
has_openlp1 = True
|
||||
except ImportError:
|
||||
has_openlp1 = False
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
@ -57,6 +62,7 @@ class BibleFormat(object):
|
|||
plus a few helper functions to facilitate generic handling of Bible types
|
||||
for importing.
|
||||
"""
|
||||
_format_availability = {}
|
||||
Unknown = -1
|
||||
OSIS = 0
|
||||
CSV = 1
|
||||
|
@ -98,6 +104,18 @@ class BibleFormat(object):
|
|||
BibleFormat.OpenLP1
|
||||
]
|
||||
|
||||
@staticmethod
|
||||
def set_availability(format, available):
|
||||
BibleFormat._format_availability[format] = available
|
||||
|
||||
@staticmethod
|
||||
def get_availability(format):
|
||||
return BibleFormat._format_availability.get(format, True)
|
||||
|
||||
BibleFormat.set_availability(BibleFormat.OpenLP1, has_openlp1)
|
||||
|
||||
__all__ = [u'BibleFormat']
|
||||
|
||||
|
||||
class BibleManager(object):
|
||||
"""
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
###############################################################################
|
||||
|
||||
import logging
|
||||
import sqlite
|
||||
import sqlitse
|
||||
|
||||
from PyQt4 import QtCore
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ class SongFormat(object):
|
|||
plus a few helper functions to facilitate generic handling of song types
|
||||
for importing.
|
||||
"""
|
||||
_format_availability = {}
|
||||
format_availability = {}
|
||||
Unknown = -1
|
||||
OpenLP2 = 0
|
||||
OpenLP1 = 1
|
||||
|
|
Loading…
Reference in New Issue