Skip to content
Ulysses edited this page Dec 30, 2019 · 3 revisions

Welcome to the Christine wiki!

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.

Server

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:

  1. view.py
    This is the core server paths file its main purpose is to send and receive files.
  2. app.py
    This is a flask initialization file that also contains logic for the socket methods. Sockets are made for player control.
  3. file_manager.py
    This file contains all the file manipulations.
  4. database.py
    This file contains all the database logic and database manipulations.
  5. spotify.py
    This file contains all the Spotify hooks and logic.
  6. checker.py
    Misk methods to check files and create/check forms.
  7. converter.py
    Contains converters.
  8. downloader.py
    Contains logic to download files.
  9. player.py
    Bad implementation of the player, because I have not found any lightweight music player in python.

Client

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:

  1. MainActivity
    Operates Main screen and initializes Sockets and Options menu.
  2. AddSongActivity
    Operates Add Song screen.
  3. ManageUnsortedActivity
    Operates Manage Unsorted screen.
  4. Player
    The whole Player logic.
  5. ServerPipeline
    The whole server connection logic.
  6. ServerSocketApplication
    Helper class for the sockets (kinda Singleton, just misc class).
  7. ArtistsArrayAdapter
    Adaper for Artists List on the Main screen.
  8. SongsArrayAdapter
    Adaper for Songs List on the Main screen.
  9. ViewPagerAdapter
    Adapter for the Main screen. That fancy shuffle buttons, lists and stuff.
Clone this wiki locally