Browse Source

Move the default_lang out of the config dict

pull/165/head
Oliverpool 9 years ago
parent
commit
f80b5a62bc
  1. 1
      patacrep/songs/__init__.py
  2. 2
      patacrep/songs/chordpro/__init__.py

1
patacrep/songs/__init__.py

@ -102,6 +102,7 @@ class Song:
self.datadir = datadir
self.fullpath = os.path.join(self.datadir, subpath)
self.encoding = config["encoding"]
self.default_lang = config["lang"]
self.config = config
if self.datadir and self.config['_cache']:

2
patacrep/songs/chordpro/__init__.py

@ -31,7 +31,7 @@ class ChordproSong(Song):
song = parse_song(song.read(), self.fullpath)
self.authors = song.authors
self.titles = song.titles
self.lang = song.get_data_argument('language', self.config['lang'])
self.lang = song.get_data_argument('language', self.default_lang)
self.data = song.meta
self.cached = {
'song': song,

Loading…
Cancel
Save