-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMAIN.py
36 lines (23 loc) · 928 Bytes
/
MAIN.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import BROADCAST
import SYSTEM
def main():
# Create instance for SystemSettings
system_settings = SYSTEM.SystemSettings()
# Check if devices can be found in network
# If not, then terminate program immediately
system_settings.isDeviceFound()
# Check if SETTINGS.txt exists
system_settings.isSettingsFileFound()
# Search device in network, then add to device_list
system_settings.addDevicesToDictionary()
# Save user's device choice
device_chosen = system_settings.selectLocalDevice()
# Create instance of MediaPlayer class to control what to play
media_player = BROADCAST.MediaPlayer(device_chosen)
# Add media files to list
media_player.addMediaFiles()
# Allow user to select streaming file
media_player.chooseMediaFile()
# Give user the 'remote' to control the device (ex. pause, play, stop)
media_player.remoteControlForDevice()
main()