<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> import os . path <EOL> from playa . common . storage import load , save <EOL> class Playlists ( object ) : <EOL> def __init__ ( self , app ) : <EOL> self . app = app <EOL> self . playlists = { } <EOL> self . add_path ( os . path . join ( self . app . config [ '<STR_LIT>' ] , '<STR_LIT>' ) ) <EOL> def add_path ( self , path , base = None ) : <EOL> if not base : <EOL> base = path <EOL> for fn in os . listdir ( path ) : <EOL> if fn . startswith ( '<STR_LIT:.>' ) : <EOL> continue <EOL> full_path = os . path . join ( path , fn ) <EOL> if os . path . isdir ( full_path ) : <EOL> self . add_path ( path , base ) <EOL> continue <EOL> self . playlists [ full_path ] = load ( full_path ) </s>
