-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Ulysses edited this page Dec 30, 2019
·
3 revisions
Here I'll try to explain the code architecture to you.
The main idea is what I'm trying to keep the program as lightweight and simple as possible.
It is an entity, which can handle the connections and (in the future) can connect to other servers.
The server can manage the whole of his library, play songs, has a playlist logic and can work with the requests.
Current structure:
- view.py
This is the core server paths file its main purpose is to send and receive files. - app.py
This is a flask initialization file that also contains logic for the socket methods. Sockets are made for player control. - file_manager.py
This file contains all the file manipulations. - database.py
This file contains all the database logic and database manipulations. - spotify.py
This file contains all the Spotify hooks and logic. - checker.py
Misk methods to check files and create/check forms. - converter.py
Contains converters. - downloader.py
Contains logic to download files. - player.py
Bad implementation of the player, because I have not found any lightweight music player in python.
It is an entity, which can only connect to the servers, can't handle connections.
For now, works only as a simple player, can operate server upon connection. Should be just a player with equalizer, tag redactor and playlist logic.
Current structure:
- MainActivity
Operates Main screen and initializes Sockets and Options menu. - AddSongActivity
Operates Add Song screen. - ManageUnsortedActivity
Operates Manage Unsorted screen. - Player
The whole Player logic. - ServerPipeline
The whole server connection logic. - ServerSocketApplication
Helper class for the sockets (kinda Singleton, just misc class). - ArtistsArrayAdapter
Adaper for Artists List on the Main screen. - SongsArrayAdapter
Adaper for Songs List on the Main screen. - ViewPagerAdapter
Adapter for the Main screen. That fancy shuffle buttons, lists and stuff.