# Path: app/resources/directories.py
# MUSIC_DIR = os.path.join(DATA_DIR, "music")


import pygame
import os
from app.resources.directories import MUSIC_DIR

class MusicManager:

    class __MusicManager:
        def __init__(self, settings):
            self.music = {}
            self.now_playing = ""

            if settings == None:
                self.settings = {
                    "sound" :
                    {
                        "sound_volume":0.3,
                        "sound_enabled" : True
                    }
                }
            else:
                self.settings = settings

            self.track_no     = 0
            self.cur_playlist = []
            self.default_volume = self.settings['sound']['music_volume']
            self.volume         = self.default_volume
            self.enabled        = self.settings['sound']['music_enabled']

            pygame.mixer.init()

# Path: app/resources/directories.py
# MUSIC_DIR = os.path.join(DATA_DIR, "music")


# Path: app/resources/music.py
import pygame
import os
from app.resources.directories import MUSIC_DIR


class MusicManager:

    class __MusicManager:
        def __init__(self, settings):
            self.music = {}
            self.now_playing = ""

            if settings == None:
                self.settings = {
                    "sound" :
                    {
                        "sound_volume":0.3,
                        "sound_enabled" : True
                    }
                }
            else:
                self.settings = settings

            self.track_no     = 0
            self.cur_playlist = []
            self.default_volume = self.settings['sound']['music_volume']
            self.volume         = self.default_volume
            self.enabled        = self.settings['sound']['music_enabled']

            pygame.mixer.init()

            music_files = os.listdir(MUSIC_DIR)