Move import into methods where needed to avoid import loops when importing mopidy.models
This commit is contained in:
parent
958983113d
commit
caedac252e
@ -1,4 +1,3 @@
|
||||
from mopidy.frontends.mpd import translator
|
||||
|
||||
class ImmutableObject(object):
|
||||
"""
|
||||
@ -183,6 +182,7 @@ class Track(ImmutableObject):
|
||||
super(Track, self).__init__(*args, **kwargs)
|
||||
|
||||
def mpd_format(self, *args, **kwargs):
|
||||
from mopidy.frontends.mpd import translator
|
||||
return translator.track_to_mpd_format(self, *args, **kwargs)
|
||||
|
||||
|
||||
@ -222,4 +222,5 @@ class Playlist(ImmutableObject):
|
||||
return len(self.tracks)
|
||||
|
||||
def mpd_format(self, *args, **kwargs):
|
||||
from mopidy.frontends.mpd import translator
|
||||
return translator.playlist_to_mpd_format(self, *args, **kwargs)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user