Internet radio browser GUI for music/video streams from various directory services.

⌈⌋ branch:  streamtuner2


Diff

Differences From Artifact [b00bb5a675]:

To Artifact [436f001346]:


37
38
39
40
41
42
43
44

45
46
47
48
49
50
51

52
53
54
55
56






57
58
59

60
61
62
63
64
65
66
37
38
39
40
41
42
43

44
45
46
47
48
49
50

51
52
53
54


55
56
57
58
59
60
61
62

63
64
65
66
67
68
69
70







-
+






-
+



-
-
+
+
+
+
+
+


-
+






    # channel plugins
    channel_modules = ["shoutcast", "xiph", "internet_radio", "jamendo", "myoggradio", "live365"]
    current_channel = "cli"
    plugins = {} # only populated sparsely by .stream()
    
    
    # start
    def __init__(self):
    def __init__(self, actions):

        # fake init    
        action.action.main = empty_parent()
        action.action.main.current_channel = self.current_channel

        # check if enough arguments, else  help
        if len(sys.argv)<3:
        if not actions:
            a = self.help
        # first cmdline arg == action
        else:
            command = sys.argv[1]
            a = self.__getattribute__(command)
            command = actions[0]
            if command in self.__dict__:
                cmd = self.__getattribute__(command)
            else:
                print "No such command:", command
                return

        # run
        result = a(*sys.argv[2:])
        result = cmd(*actions[1:])
        if result:
            self.json(result)
        
        
    # show help
    def help(self, *args): 
        print("""