blob: af3f59cf1d88b5e9d558aedd3845872c8daeef7d (
plain)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
|
import os
import sys
from pandora import clientbuilder
from .utils import Screen
class EditorApp(object):
def __init__(self):
self.client = None
self.screen = Screen()
def get_client(self):
cfg_file = os.environ.get("PYDORA_CFG", "")
builder = clientbuilder.PydoraConfigFileBuilder(cfg_file)
if builder.file_exists:
return builder.build()
builder = clientbuilder.PianobarConfigFileBuilder()
if builder.file_exists:
return builder.build()
if not self.client:
self.screen.print_error("No valid config found")
sys.exit(1)
# Search (music.search)
# Create Station (station.createStation)
# List Stations (user.getStationList)
# Describe Station (station.getStation)
# - View Info
# - View Feedback
# - View Seeds
# - Get Share Link
# Modify Station
# - Change Name (station.renameStation)
# - Change Description (???)
# - Remove Feedback (station.deleteFeedback)
# - Add Seed (station.addMusic)
# - Remove Seed (station.deleteMusic)
# - Enable/Disable Artist Messages (???)
# Delete Station
# List Feedback
# List Bookmarks (Album, Track, Artist) (user.getBookmarks)
# Delete Bookmarks
# (bookmark.deleteArtistBookmark, bookmark.deleteSongBookmark)
def run(self):
self.client = self.get_client()
def main():
EditorApp().run()
|