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

⌈⌋ ⎇ branch:  streamtuner2


Diff

Differences From Artifact [12a6d46476]:

To Artifact [1923204c8e]:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
# encoding: UTF-8
# api: streamtuner2
# type: functions
# category: io
# title: play/record actions
# description: Starts audio applications, guesses MIME types for URLs
# version: 1.2.0
# priority: core
#
# Multimedia interface for starting audio players, recording app,
# or web browser (listed as "url/http" association in players).
# It maps audio MIME types, and extracts/converts playlist types
# (PLS, M3U, XSPF, SMIL, JSPF, ASX, raw urls).
#






|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
# encoding: UTF-8
# api: streamtuner2
# type: functions
# category: io
# title: play/record actions
# description: Starts audio applications, guesses MIME types for URLs
# version: 1.2.1
# priority: core
#
# Multimedia interface for starting audio players, recording app,
# or web browser (listed as "url/http" association in players).
# It maps audio MIME types, and extracts/converts playlist types
# (PLS, M3U, XSPF, SMIL, JSPF, ASX, raw urls).
#
39
40
41
42
43
44
45

46
47
48
49
50
51
52
import json
import subprocess, pipes
from datetime import datetime
from xml.sax.saxutils import escape as xmlentities, unescape as xmlunescape

import ahttp
from config import *



# Coupling to main window
#
main = None









>







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import json
import subprocess, pipes
from datetime import datetime
from xml.sax.saxutils import escape as xmlentities, unescape as xmlunescape

import ahttp
from config import *
import sys


# Coupling to main window
#
main = None


133
134
135
136
137
138
139
140
141
142
143
144
145
146
147


# Exec wrapper
def run(cmd):
    if "cmd" in conf:
        cmd = conf.cmd % cmd
    elif conf.windows:
        cmd = "start " + cmd
    else:
        cmd = cmd + " &"
    try:
        log.EXEC(cmd)
        os.system(cmd)
    except:
        log.ERR("Command not found:", cmd)







|







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148


# Exec wrapper
def run(cmd):
    if "cmd" in conf:
        cmd = conf.cmd % cmd
    elif conf.windows:
        cmd = "start " + cmd.encode(sys.getfilesystemencoding())
    else:
        cmd = cmd + " &"
    try:
        log.EXEC(cmd)
        os.system(cmd)
    except:
        log.ERR("Command not found:", cmd)