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

βŒˆβŒ‹ βŽ‡ branch:  streamtuner2


Check-in [327d2ed94c]

Overview
Comment:Not implemented: `8tracks` (plugin name suffers from identifier mismatch, and it's not quite doable in ST2, because 8tracks requires feedback shortly after playback has begun; yet streamtuner can't inspect any configured audio player for actually doing so.)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 327d2ed94c3f501ab1393bfb22e4c7a277a7e1e4
User & Date: mario on 2015-04-14 17:03:30
Other Links: manifest | tags
Context
2015-04-15
18:31
Move preprocessing from Makefile to Packfile, just runs on channels/search.py instead of all *.py files now. check-in: 9e4b52a0f5 user: mario tags: trunk
2015-04-14
17:03
Not implemented: `8tracks` (plugin name suffers from identifier mismatch, and it's not quite doable in ST2, because 8tracks requires feedback shortly after playback has begun; yet streamtuner can't inspect any configured audio player for actually doing so.) check-in: 327d2ed94c user: mario tags: trunk
16:57
Add old Compoundβ˜… example plugin, slightly updated for current meta data scheme. check-in: a4cb6da4ac user: mario tags: trunk
Changes

Added contrib/8tracks.py version [f8775355d0].

























































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
53
54
55
56
57
58
59
60
# encoding: UTF-8
# api: streamtuner2
# title: 8tracks
# description: radio created by people, not algorithms
# version: 0.1
# type: channel
# category: collection
# config:
#   { name: 8tracks_api_key,  value: "",  type: text,  description: Custom API access key. }
# priority: optional
# url: http://8tracks.com/
# documentation: https://8tracks.com/developers
#
# Requires a pingback on playing, which is near impossible to implement
# without also controlling the player. Automatic/implied notifications
# could work, or checking via dbus/mpris even.
#

import re
import json
from config import conf, dbg, __print__
from channels import *
import ahttp as http


# Surfmusik sharing site
class _8tracks (ChannelPlugin):

    # description
    title = "8tracks"
    module = "8tracks"
    homepage = "http://8tracks.com/"
    has_search = False
    listformat = "audio/x-scpls"
    titles = dict(listeners=False, playing="Location")

    categories = ["none"]
    catmap = {}
    
    base = "http://8tracks.com/mixes/1?format=json&api_key=%s" # or X-Api-Key: header
    cid = ""


    # Retrieve cat list and map
    def update_categories(self):
        self.categories = []

    # Just copy over stream URLs and station titles
    def update_streams(self, cat, search=None):
        return []

    # Patch API url together, send request, decode JSON and whathaveyou
    def api(self, *params):
        r = []
        return r


# Need to rename the class, else plugin loader won't find it.
globals()["8tracks"] = _8tracks
_8tracks = None