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

⌈⌋ ⎇ branch:  streamtuner2


Check-in [c8c55c79da]

Overview
Comment:Trim down plugin comment.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c8c55c79da3189ef32444862ddaba69995840adb
User & Date: mario on 2015-04-01 15:49:35
Other Links: manifest | tags
Context
2015-04-01
17:39
Add conf.get_data() alias, which automatically fetches resource relative to config module (that is, works on the global path, or within pyzip archive). Move module_list() from channels. into config, as it combines plugins and config management anyway. check-in: 07d2a291cd user: mario tags: trunk
15:49
Trim down plugin comment. check-in: c8c55c79da user: mario tags: trunk
15:47
Moved add_plugin_defaults from main into GenericChannel constructor. Check for percentage>=0 in progress indicator of statusbar. check-in: 9a4aa0b793 user: mario tags: trunk
Changes

Modified channels/youtube.py from [73f9e85160] to [cc1c8191ad].

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
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










-
+



-
+









+
+
+
+
+
+
+
+
+
+
+







# encoding: UTF-8
# api: streamtuner2
# title: Youtube
# description: Channel, playlist and video browsing for youtube.
# type: channel
# version: 0.2
# url: http://www.youtube.com/
# category: video
# config:
#    { name: youtube_channels,  type: text,  value: "Key Of Awesome, Pentatonix",  description: "Preferred channels to list videos from.",  category: select }
#    { name: youtube_region,  type: select,  select: "=No Region|AR=Argentina|AU=Australia|AT=Austria|BE=Belgium|BR=Brazil|CA=Canada|CL=Chile|CO=Colombia|CZ=Czech Republic|EG=Egypt|FR=France|DE=Germany|GB=Great Britain|HK=Hong Kong|HU=Hungary|IN=India|IE=Ireland|IL=Israel|IT=Italy|JP=Japan|JO=Jordan|MY=Malaysia|MX=Mexico|MA=Morocco|NL=Netherlands|NZ=New Zealand|PE=Peru|PH=Philippines|PL=Poland|RU=Russia|SA=Saudi Arabia|SG=Singapore|ZA=South Africa|KR=South Korea|ES=Spain|SE=Sweden|CH=Switzerland|TW=Taiwan|AE=United Arab Emirates|US=United States",  value: UK,  description: "Filter by region id.,  category: auth }
#    { name: youtube_region,  type: select,  select: "=No Region|AR=Argentina|AU=Australia|AT=Austria|BE=Belgium|BR=Brazil|CA=Canada|CL=Chile|CO=Colombia|CZ=Czech Republic|EG=Egypt|FR=France|DE=Germany|GB=Great Britain|HK=Hong Kong|HU=Hungary|IN=India|IE=Ireland|IL=Israel|IT=Italy|JP=Japan|JO=Jordan|MY=Malaysia|MX=Mexico|MA=Morocco|NL=Netherlands|NZ=New Zealand|PE=Peru|PH=Philippines|PL=Poland|RU=Russia|SA=Saudi Arabia|SG=Singapore|ZA=South Africa|KR=South Korea|ES=Spain|SE=Sweden|CH=Switzerland|TW=Taiwan|AE=United Arab Emirates|US=United States",  value: UK,  description: "Filter by region id.",  category: auth }
#    { name: youtube_wadsworth,  type: boolean,  value: 0,  description: "Apply Wadsworth constant.",  category: filter }
# priority: optional
# depends: bin:youtube-dl
# 
#
# 
# Lists recently popular youtube videos by category or channels.
#
# Introduces the faux MIME type "video/youtube" for player and recording
# configuration; both utilizing `youtube-dl`. But VLC can consume Youtube
# URLs directly anyhow.
#
# For now custom channel names must be configured in the settings dialog
# text entry, and applied using Channel > Update categories..


from config import *
from channels import *

import ahttp
import json



# Youtube
#
#
# INTERNA
#
# The Youtube v3.0 API is quite longwinded. Here the .api() call shadows
# a few of the details.
# While .wrap3() unpacks the various variations of where the video IDs
︙
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
56
57
58
59
60
61
62











63
64
65
66
67
68
69







-
-
-
-
-
-
-
-
-
-
-







#
# Discovery
#
#   videoCat  Music  id= 10
#   guideCat  Music  id= GCTXVzaWM   channelid= UCBR8-60-B28hp2BmDPdntcQ
#   topicId   Music  mid= /m/0kpv0g
#
#

from config import *
from channels import *

import ahttp
import json



# Youtube
class youtube (ChannelPlugin):

    # description
    title = "Youtube"
    module = "youtube"
    homepage = "http://www.youtube.com/"
    listformat = "url/youtube"
︙

Modified compat2and3.py from [13b56cb24d] to [26cc8f6b71].

1
2
3
4
5
6
7
8
9


10
11
12
13
14
15
16
17

1
2
3
4
5
6


7
8

9
10
11
12
13
14
15
-






-
-
+
+
-







#
# encoding: UTF-8
# api: python 
# type: functions
# title: Python2 and Python3 compatibility
# version: 0.1
#
#  Renames some Python3 modules into their Py2 equivalent.
#  Slim local alternative to `six` module.
# Renames some Python3 modules into their Py2 equivalent.
# Slim local alternative to `six` module.
#


import sys


# Python 2
if sys.version_info < (3,0):
︙