Index: _package.epm
==================================================================
--- _package.epm
+++ _package.epm
@@ -88,10 +88,12 @@
f 644 root root /usr/share/doc/streamtuner2/help/channel_internetradioorguk.page ./help/channel_internetradioorguk.page
f 644 root root /usr/share/doc/streamtuner2/help/channel_jamendo.page ./help/channel_jamendo.page
f 644 root root /usr/share/doc/streamtuner2/help/channel_myoggradio.page ./help/channel_myoggradio.page
f 644 root root /usr/share/doc/streamtuner2/help/channel_shoutcast.page ./help/channel_shoutcast.page
f 644 root root /usr/share/doc/streamtuner2/help/channel_xiph.page ./help/channel_xiph.page
+f 644 root root /usr/share/doc/streamtuner2/help/channel_youtube.page ./help/channel_youtube.page
+f 644 root root /usr/share/doc/streamtuner2/help/channel_surfmusik.page ./help/channel_surfmusik.page
f 644 root root /usr/share/doc/streamtuner2/help/channels.page ./help/channels.page
f 644 root root /usr/share/doc/streamtuner2/help/cli.page ./help/cli.page
f 644 root root /usr/share/doc/streamtuner2/help/config_apps.page ./help/config_apps.page
f 644 root root /usr/share/doc/streamtuner2/help/configuration.page ./help/configuration.page
f 644 root root /usr/share/doc/streamtuner2/help/extending.page ./help/extending.page
Index: channels/itunes.py
==================================================================
--- channels/itunes.py
+++ channels/itunes.py
@@ -78,11 +78,11 @@
# static list for iTunes
def update_categories(self):
pass
# Just copy over stream URLs and station titles
- def update_streams(self, cat, search=None):
+ def update_streams(self, cat):
m3u = http.get(self.base, {"category": cat.lower()})
if len(m3u) < 256:
__print__(dbg.ERR, m3u)
Index: channels/live365.py
==================================================================
--- channels/live365.py
+++ channels/live365.py
@@ -36,10 +36,11 @@
# desc
module = "live365"
title = "Live365"
homepage = "http://www.live365.com/"
base_url = "http://www.live365.com/"
+ has_search = True
listformat = "url/http"
mediatype = "audio/mpeg"
# content
categories = ['Alternative', ['Britpop', 'Classic Alternative', 'College', 'Dancepunk', 'Dream Pop', 'Emo', 'Goth', 'Grunge', 'Indie Pop', 'Indie Rock', 'Industrial', 'Lo-Fi', 'Modern Rock', 'New Wave', 'Noise Pop', 'Post-Punk', 'Power Pop', 'Punk'], 'Blues', ['Acoustic Blues', 'Chicago Blues', 'Contemporary Blues', 'Country Blues', 'Delta Blues', 'Electric Blues', 'Cajun/Zydeco'], 'Classical', ['Baroque', 'Chamber', 'Choral', 'Classical Period', 'Early Classical', 'Impressionist', 'Modern', 'Opera', 'Piano', 'Romantic', 'Symphony'], 'Country', ['Alt-Country', 'Americana', 'Bluegrass', 'Classic Country', 'Contemporary Bluegrass', 'Contemporary Country', 'Honky Tonk', 'Hot Country Hits', 'Western'], 'Easy Listening', ['Exotica', 'Lounge', 'Orchestral Pop', 'Polka', 'Space Age Pop'], 'Electronic/Dance', ['Acid House', 'Ambient', 'Big Beat', 'Breakbeat', 'Disco', 'Downtempo', "Drum 'n' Bass", 'Electro', 'Garage', 'Hard House', 'House', 'IDM', 'Jungle', 'Progressive', 'Techno', 'Trance', 'Tribal', 'Trip Hop'], 'Folk', ['Alternative Folk', 'Contemporary Folk', 'Folk Rock', 'New Acoustic', 'Traditional Folk', 'World Folk'], 'Freeform', ['Chill', 'Experimental', 'Heartache', 'Love/Romance', 'Music To ... To', 'Party Mix', 'Patriotic', 'Rainy Day Mix', 'Reality', 'Shuffle/Random', 'Travel Mix', 'Trippy', 'Various', 'Women', 'Work Mix'], 'Hip-Hop/Rap', ['Alternative Rap', 'Dirty South', 'East Coast Rap', 'Freestyle', 'Gangsta Rap', 'Old School', 'Turntablism', 'Underground Hip-Hop', 'West Coast Rap'], 'Inspirational', ['Christian', 'Christian Metal', 'Christian Rap', 'Christian Rock', 'Classic Christian', 'Contemporary Gospel', 'Gospel', 'Praise/Worship', 'Sermons/Services', 'Southern Gospel', 'Traditional Gospel'], 'International', ['African', 'Arabic', 'Asian', 'Brazilian', 'Caribbean', 'Celtic', 'European', 'Filipino', 'Greek', 'Hawaiian/Pacific', 'Hindi', 'Indian', 'Japanese', 'Jewish', 'Mediterranean', 'Middle Eastern', 'North American', 'Soca', 'South American', 'Tamil', 'Worldbeat', 'Zouk'], 'Jazz', ['Acid Jazz', 'Avant Garde', 'Big Band', 'Bop', 'Classic Jazz', 'Cool Jazz', 'Fusion', 'Hard Bop', 'Latin Jazz', 'Smooth Jazz', 'Swing', 'Vocal Jazz', 'World Fusion'], 'Latin', ['Bachata', 'Banda', 'Bossa Nova', 'Cumbia', 'Latin Dance', 'Latin Pop', 'Latin Rap/Hip-Hop', 'Latin Rock', 'Mariachi', 'Merengue', 'Ranchera', 'Salsa', 'Tango', 'Tejano', 'Tropicalia'], 'Metal', ['Extreme Metal', 'Heavy Metal', 'Industrial Metal', 'Pop Metal/Hair', 'Rap Metal'], 'New Age', ['Environmental', 'Ethnic Fusion', 'Healing', 'Meditation', 'Spiritual'], 'Oldies', ['30s', '40s', '50s', '60s', '70s', '80s', '90s'], 'Pop', ['Adult Contemporary', 'Barbershop', 'Bubblegum Pop', 'Dance Pop', 'JPOP', 'Soft Rock', 'Teen Pop', 'Top 40', 'World Pop'], 'R&B/Urban', ['Classic R&B', 'Contemporary R&B', 'Doo Wop', 'Funk', 'Motown', 'Neo-Soul', 'Quiet Storm', 'Soul', 'Urban Contemporary'], 'Reggae', ['Contemporary Reggae', 'Dancehall', 'Dub', 'Pop-Reggae', 'Ragga', 'Reggaeton', 'Rock Steady', 'Roots Reggae', 'Ska'], 'Rock', ['Adult Album Alternative', 'British Invasion', 'Classic Rock', 'Garage Rock', 'Glam', 'Hard Rock', 'Jam Bands', 'Prog/Art Rock', 'Psychedelic', 'Rock & Roll', 'Rockabilly', 'Singer/Songwriter', 'Surf'], 'Seasonal/Holiday', ['Anniversary', 'Birthday', 'Christmas', 'Halloween', 'Hanukkah', 'Honeymoon', 'Valentine', 'Wedding'], 'Soundtracks', ['Anime', "Children's/Family", 'Original Score', 'Showtunes'], 'Talk', ['Comedy', 'Community', 'Educational', 'Government', 'News', 'Old Time Radio', 'Other Talk', 'Political', 'Scanner', 'Spoken Word', 'Sports']]
@@ -95,17 +96,18 @@
self.categories.append(last)
# extract stream infos
- def update_streams(self, cat, search=""):
+ def update_streams(self, cat, search=None):
- # search / url
- if (not search):
- url = "http://www.live365.com/cgi-bin/directory.cgi?first=1&rows=200&mode=2&genre=" + self.cat2tag(cat)
+ # search
+ if search:
+ url = "http://www.live365.com/cgi-bin/directory.cgi?site=..&searchdesc=" + urllib.quote(search) + "&searchgenre=" + self.cat2tag(cat) + "&x=0&y=0"
+ # genre
else:
- url = "http://www.live365.com/cgi-bin/directory.cgi?site=..&searchdesc=" + urllib.quote(search) + "&searchgenre=" + self.cat2tag(cat) + "&x=0&y=0"
+ url = "http://www.live365.com/cgi-bin/directory.cgi?first=1&rows=200&mode=2&genre=" + self.cat2tag(cat)
html = http.get(url, feedback=self.parent.status)
# we only need to download one page, because live365 always only gives 200 results
# terse format
rx = re.compile(r"""
Index: channels/musicgoal.py
==================================================================
--- channels/musicgoal.py
+++ channels/musicgoal.py
@@ -56,11 +56,11 @@
def update_categories(self):
pass
# request json API
- def update_streams(self, cat, search=""):
+ def update_streams(self, cat):
# category type: podcast or radio
if cat in self.podcast:
grp = "podcast"
url = self.api_podcast % (grp, self.podcast.index(cat)+1)
Index: channels/shoutcast.py
==================================================================
--- channels/shoutcast.py
+++ channels/shoutcast.py
@@ -87,11 +87,11 @@
conf.save("cache/categories_shoutcast", self.categories)
pass
# downloads stream list from shoutcast for given category
- def update_streams(self, cat, search=""):
+ def update_streams(self, cat):
if (not cat or cat == self.empty):
__print__( dbg.ERR, "nocat" )
return []
Index: channels/xiph.py
==================================================================
--- channels/xiph.py
+++ channels/xiph.py
@@ -84,11 +84,11 @@
def update_categories(self):
pass
# downloads stream list from xiph.org for given category
- def update_streams(self, cat, search=""):
+ def update_streams(self, cat, search=None):
# With the new JSON cache API on I-O, we can load categories individually:
params = {}
if cat:
params["cat"] = cat.lower()
Index: channels/youtube.py
==================================================================
--- channels/youtube.py
+++ channels/youtube.py
@@ -1,15 +1,14 @@
# encoding: UTF-8
# api: streamtuner2
# title: Youtube
# description: Channel, playlist and video browsing for youtube.
# type: channel
-# version: 0.1
+# version: 0.2
# category: video
# priority: optional
# suggests: youtube-dl
-# requires: ahttp
#
#
# Lists recently popular youtube videos by category or channels.
#
# Introduces the faux MIME type "video/youtube" for player and recording
@@ -184,11 +183,11 @@
channels = self.categories[self.categories.index("my channels") + 1]
# plain search request for videos
if search is not None:
for row in self.api("search", type="video", regionCode=conf.youtube_region, q=search):
- entries.append( self.wrap3(row, {"genre": "Youtube"}) )
+ entries.append( self.wrap3(row, {"genre": ""}) )
# Most Popular
elif cat == "mostPopular":
#for row in self.api("feeds/api/standardfeeds/%s/most_popular"%conf.youtube_region, ver=2):
# entries.append(self.wrap2(row))
Index: gtk2.xml
==================================================================
--- gtk2.xml
+++ gtk2.xml
@@ -1078,18 +1078,19 @@
True
False
gtk-add