-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
39 lines (27 loc) · 848 Bytes
/
main.py
File metadata and controls
39 lines (27 loc) · 848 Bytes
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
37
38
39
# Create a new playlist and save it in the database
#
# It can be of two types:
#
# 1. Playlist for a specific user
# 2. General Playlist that will be shown to all users
import sys
from data_writer import save_new_playlist
def save_new_playlist_user(uid):
"""Playlist for a specific user"""
print('Creating a New Playlist to {}'.format(uid))
print('Please Wait for a moment')
print('.' * 50)
save_new_playlist(uid)
def save_new_playlist_general():
"""General Playlist that will be shown to all users"""
print('Creating a General New Playlist')
print('Please Wait for a moment')
print('.' * 50)
save_new_playlist()
if __name__ == '__main__':
print(sys.argv)
if len(sys.argv) == 1:
save_new_playlist_general()
else:
uid = sys.argv[1]
save_new_playlist_user(uid)