add missing files; improve dashboard; rewrite urls
This commit is contained in:
		
							
								
								
									
										19
									
								
								aircox_streamer/conf.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								aircox_streamer/conf.py
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,19 @@
 | 
			
		||||
import os
 | 
			
		||||
import tempfile
 | 
			
		||||
 | 
			
		||||
from aircox.conf import BaseSettings
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
__all__ = ("Settings", "settings")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Settings(BaseSettings):
 | 
			
		||||
    WORKING_DIR = os.path.join(tempfile.gettempdir(), "aircox")
 | 
			
		||||
    """Parent working directory for all stations."""
 | 
			
		||||
 | 
			
		||||
    def get_dir(self, station, *paths):
 | 
			
		||||
        """Return working directory for the provided station."""
 | 
			
		||||
        return os.path.join(self.WORKING_DIR, station.slug.replace("-", "_"), *paths)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
settings = Settings("AIRCOX_STREAMER")
 | 
			
		||||
		Reference in New Issue
	
	Block a user