feat: Load language file in lang/ instead of the ini file.
This commit is contained in:
@ -7,7 +7,7 @@ import hashlib
|
||||
|
||||
from media.item import BaseItem
|
||||
from media.item import item_builders, item_loaders, item_id_generators
|
||||
import constants
|
||||
from constants import tr_cli as tr
|
||||
|
||||
log = logging.getLogger("bot")
|
||||
|
||||
@ -147,18 +147,18 @@ class RadioItem(BaseItem):
|
||||
)
|
||||
|
||||
def format_song_string(self, user):
|
||||
return constants.tr("radio_item",
|
||||
url=self.url,
|
||||
title=get_radio_title(self.url), # the title of current song
|
||||
name=self.title, # the title of radio station
|
||||
user=user
|
||||
)
|
||||
return tr("radio_item",
|
||||
url=self.url,
|
||||
title=get_radio_title(self.url), # the title of current song
|
||||
name=self.title, # the title of radio station
|
||||
user=user
|
||||
)
|
||||
|
||||
def format_current_playing(self, user):
|
||||
return constants.tr("now_playing", item=self.format_song_string(user))
|
||||
return tr("now_playing", item=self.format_song_string(user))
|
||||
|
||||
def format_title(self):
|
||||
return self.title if self.title else self.url
|
||||
|
||||
def display_type(self):
|
||||
return constants.tr("radio")
|
||||
return tr("radio")
|
||||
|
Reference in New Issue
Block a user