Browse Source

Suppression de code inutile concernant les langues

pull/22/head
Louis 11 years ago
parent
commit
bd76f7ffc6
  1. 2
      songbook_core/build.py
  2. 9
      songbook_core/songs.py

2
songbook_core/build.py

@ -90,7 +90,7 @@ class Songbook(object):
'*.sg', '*.sg',
) )
] ]
self.songslist = SongsList(self.config['datadir'], self.config["lang"]) self.songslist = SongsList(self.config['datadir'])
self.songslist.append_list(self.config['songs']) self.songslist.append_list(self.config['songs'])
# Ensure self.config['authwords'] contains all entries # Ensure self.config['authwords'] contains all entries

9
songbook_core/songs.py

@ -88,9 +88,8 @@ def unprefixed_title(title, prefixes):
class SongsList(object): class SongsList(object):
"""Manipulation et traitement de liste de chansons""" """Manipulation et traitement de liste de chansons"""
def __init__(self, library, language): def __init__(self, library):
self._songdir = os.path.join(library, 'songs') self._songdir = os.path.join(library, 'songs')
self._language = language
# Liste triée des chansons # Liste triée des chansons
self.songs = [] self.songs = []
@ -128,8 +127,4 @@ class SongsList(object):
def languages(self): def languages(self):
"""Renvoie la liste des langues utilisées par les chansons""" """Renvoie la liste des langues utilisées par les chansons"""
languages = set().union(*[set(song.languages) for song in self.songs]) return set().union(*[set(song.languages) for song in self.songs])
if languages:
return languages
else:
return set(['english'])

Loading…
Cancel
Save