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

⌈⌋ ⎇ branch:  streamtuner2


Diff

Differences From Artifact [43771b8835]:

To Artifact [7f3b7c5cee]:


30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#
# In this module only iTunes will be queried for now.
#

import re
from config import *
from channels import *
import ahttp as http


# Surfmusik sharing site
class itunes (ChannelPlugin):

    # control attribues
    has_search = False







|







30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#
# In this module only iTunes will be queried for now.
#

import re
from config import *
from channels import *
import ahttp


# Surfmusik sharing site
class itunes (ChannelPlugin):

    # control attribues
    has_search = False
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
    # static list for iTunes
    def update_categories(self):
        pass

    # Just copy over stream URLs and station titles
    def update_streams(self, cat):
    
        m3u = http.get(self.base, {"category": cat.lower()})
        if len(m3u) < 256:
            log.ERR(m3u)
        
        rx_m3u = re.compile(r"""
            ^File(\d+)\s*=\s*(http://[^\s]+)\s*$\s*
            ^Title\1\s*=\s*([^\r\n]+)\s*$\s*
        """, re.M|re.I|re.X)







|







80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
    # static list for iTunes
    def update_categories(self):
        pass

    # Just copy over stream URLs and station titles
    def update_streams(self, cat):
    
        m3u = ahttp.get(self.base, {"category": cat.lower()})
        if len(m3u) < 256:
            log.ERR(m3u)
        
        rx_m3u = re.compile(r"""
            ^File(\d+)\s*=\s*(http://[^\s]+)\s*$\s*
            ^Title\1\s*=\s*([^\r\n]+)\s*$\s*
        """, re.M|re.I|re.X)