Update use of media_dir following change in Libervia Media:
Libervia Media is now a Python package instead of files to put in a directory to specify in settings. The discovery is now automatic, removing the need for settings and enabling easier installation. Furthermore, it should now work even if the package is zipped. `libervia_media` can now be specified as a dependency for frontends requiring it.
This commit is contained in:
parent
2e7ada2b6d
commit
919cafc68c
1 changed files with 12 additions and 20 deletions
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
|
||||
# SAT: a jabber client
|
||||
# Libervia XMPP client.
|
||||
# Copyright (C) 2009, 2010, 2011, 2012, 2013 Jérôme Poisson (goffi@goffi.org)
|
||||
# Copyright (C) 2013 Adrien Cossa (souliane@mailoo.org)
|
||||
|
||||
|
|
@ -24,6 +24,7 @@ from libervia.backend.core import exceptions
|
|||
from libervia.backend.test import helpers, helpers_plugins
|
||||
from libervia.backend.plugins import plugin_misc_radiocol as plugin
|
||||
from libervia.backend.plugins import plugin_misc_room_game as plugin_room_game
|
||||
from libervia import media
|
||||
from .constants import Const
|
||||
|
||||
from twisted.words.protocols.jabber.jid import JID
|
||||
|
|
@ -76,8 +77,7 @@ class RadiocolTest(helpers.SatTestCase):
|
|||
self.host.get_client(profile) # init self.host.profiles[profile]
|
||||
self.songs = []
|
||||
self.playlist = []
|
||||
assert self.host.memory.config.common.media_dir is not None
|
||||
self.sound_dir = str(self.host.memory.config.common.media_dir / "/test/sound/")
|
||||
self.sound_dir = str(media.get_path() / "/test/sound/")
|
||||
try:
|
||||
for filename in os.listdir(self.sound_dir):
|
||||
if filename.endswith(".ogg") or filename.endswith(".mp3"):
|
||||
|
|
|
|||
Loading…
Reference in a new issue