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

⌈⌋ ⎇ branch:  streamtuner2


Diff

Differences From Artifact [f52ff49900]:

  • File channels/youtube.py — part of check-in [ac8632bc29] at 2014-06-03 00:29:43 on branch trunk — Search dialog offers (x) all channels or (x) just current for server+cache scan again. Removed search="" parameter from channels that don't implement it. (To remove extraneous .has_search channel attribute again somewhen..)

    External: Xiph IO cache ?search= should be changed to work on station titles instead of genres. (user: mario, size: 11060) [annotate] [blame] [check-ins using]

To Artifact [bb7a58a931]:


108
109
110
111
112
113
114







115
116
117
118
119
120
121
          "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",
       },







    ]    

    # from GET https://www.googleapis.com/youtube/v3/videoCategories?part=id%2Csnippet&
    videocat_id = {
        "Film & Animation": 1,
        "Autos & Vehicles": 2,
        "Music": 10,







>
>
>
>
>
>
>







108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
          "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",
       },
    ]    

    # from GET https://www.googleapis.com/youtube/v3/videoCategories?part=id%2Csnippet&
    videocat_id = {
        "Film & Animation": 1,
        "Autos & Vehicles": 2,
        "Music": 10,
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
                id = id["videoId"]
        # for /playlistItems
        elif "resourceId" in row["snippet"]:
            id = row["snippet"]["resourceId"]["videoId"]

        data.update(dict(
            url = "http://youtube.com/v/" + id,
            homepage = "https://youtube.com/watch?v=" + id,
            format = self.fmt,
            title = row["snippet"]["title"],
        ))
        
        # optional values
        if "playing" not in data:
            data["playing"] = row["snippet"]["channelTitle"]







|







305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
                id = id["videoId"]
        # for /playlistItems
        elif "resourceId" in row["snippet"]:
            id = row["snippet"]["resourceId"]["videoId"]

        data.update(dict(
            url = "http://youtube.com/v/" + id,
            homepage = "https://youtube.com/watch?v=" + id + ("&wadsworth=1" if conf.youtube_wadsworth else ""),
            format = self.fmt,
            title = row["snippet"]["title"],
        ))
        
        # optional values
        if "playing" not in data:
            data["playing"] = row["snippet"]["channelTitle"]