Changes On Branch 46062ce00f9371aa
Changes In Branch action-mapfmts Through [46062ce00f] Excluding Merge-Ins
This is equivalent to a diff from a61a746c31 to 46062ce00f
2015-04-10
| ||
17:35 | Rewritten action module and playlist conversion/export works okay enough. Merged into trunk. check-in: 60f5238dc8 user: mario tags: trunk | |
11:56 | Apply proper file extension to temp files (they're never cleaned up, are they?) Fix MIME type probing, strip attributes. Support Apple M3U minor type, detect GVP playlists. check-in: 59075dcc1b user: mario tags: action-mapfmts | |
11:55 | SurfMusik actually holds .m3u playlists. check-in: 46062ce00f user: mario tags: action-mapfmts | |
10:54 | Sync with trunk changes. check-in: 801ad7fd98 user: mario tags: action-mapfmts | |
10:51 | Fix parent window references. check-in: a61a746c31 user: mario tags: trunk | |
10:50 | Removed custom pls conversion code, now uses action. playlist conversion tools. check-in: c683b52003 user: mario tags: trunk | |
Modified action.py from [693e44deeb] to [666f98e53e].
| 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 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 | - + - + + + + - - - + + + + - - + - + + + + + + + + - + + + - - - - - - - - - - - + + + + + + + + + + + + + + + + - - + + - - - - - - - + + + + + + + - - + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - - + + + + + - - - - + - - + + - + + - + - + - - + + + + + + + - + + + - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + + + - + + + + + + + + + + + + - - + + - - - - - + + + + + + + + + + + + - - - + + + + + + + + - - - - - - - - - + + + + + + + + + + + + - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - - - - - - + + + + + + - - - - + + + + + + + - - - + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Modified channels/__init__.py from [e46cdc65d0] to [b6c3442f9b].
︙ | |||
56 57 58 59 60 61 62 | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | - + | # generic channel module --------------------------------------- class GenericChannel(object): # desc meta = { "config": [] } homepage = "http://fossil.include-once.org/streamtuner2/" base_url = "" |
︙ |
Modified channels/bookmarks.py from [3d2cb45781] to [c19e57d351].
︙ | |||
36 37 38 39 40 41 42 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | - + | # class bookmarks(GenericChannel): # desc module = "bookmarks" title = "bookmarks" base_url = "file:.config/streamtuner2/bookmarks.json" |
︙ |
Modified channels/exportcat.py from [88abf57ecc] to [1a24ff64fc].
︙ | |||
20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 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 | + + + - + - + + - + | # a bit more deterministically. from config import * from channels import * import ahttp from uikit import uikit import action import re # provides another export window, and custom file generation - does not use action.save() class exportcat(): module = "" meta = plugin_meta() |
Modified channels/icast.py from [9166297ac1] to [202f901cdd].
︙ | |||
40 41 42 43 44 45 46 | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | - + | # Surfmusik sharing site class icast (ChannelPlugin): # description homepage = "http://www.icast.io/" has_search = True |
︙ |
Modified channels/internet_radio.py from [2353be4e7b] to [c485fff9cd].
︙ | |||
39 40 41 42 43 44 45 | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | - + | class internet_radio (ChannelPlugin): # description title = "InternetRadio" module = "internet_radio" homepage = "http://www.internet-radio.org.uk/" |
︙ |
Modified channels/itunes.py from [fe2beb6695] to [53ab5aa446].
︙ | |||
42 43 44 45 46 47 48 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | - + | # description title = "iTunes RS" module = "itunes" #module = "rs_playlist" homepage = "http://www.itunes.com?" has_search = False |
︙ |
Modified channels/jamendo.py from [00f47620eb] to [833b488235].
︙ | |||
58 59 60 61 62 63 64 | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - + | title = "Jamendo" module = "jamendo" homepage = "http://www.jamendo.com/" version = 0.3 has_search = True base = "http://www.jamendo.com/en/" |
︙ |
Modified channels/live365.py from [d247abf501] to [e2484ab83b].
︙ | |||
55 56 57 58 59 60 61 | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | - + | # desc module = "live365" title = "Live365" homepage = "http://www.live365.com/" base_url = "http://www.live365.com/" has_search = True |
︙ |
Modified channels/modarchive.py from [34fcb77755] to [499e517889].
︙ | |||
41 42 43 44 45 46 47 48 49 50 51 52 53 54 | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | + | class modarchive (ChannelPlugin): # description title = "modarchive" module = "modarchive" homepage = "http://www.modarchive.org/" base = "http://modarchive.org/" listformat = "href" titles = dict(genre="Genre", title="Song", playing="File", listeners="Rating", bitrate=0) # keeps category titles->urls catmap = {"Chiptune": "54", "Electronic - Ambient": "2", "Electronic - Other": "100", "Rock (general)": "13", "Trance - Hard": "64", "Swing": "75", "Rock - Soft": "15", "R & B": "26", "Big Band": "74", "Ska": "24", "Electronic - Rave": "65", "Electronic - Progressive": "11", "Piano": "59", "Comedy": "45", "Christmas": "72", "Chillout": "106", "Reggae": "27", "Electronic - Industrial": "34", "Grunge": "103", "Medieval": "28", "Demo Style": "55", "Orchestral": "50", "Soundtrack": "43", "Electronic - Jungle": "60", "Fusion": "102", "Electronic - IDM": "99", "Ballad": "56", "Country": "18", "World": "42", "Jazz - Modern": "31", "Video Game": "8", "Funk": "32", "Electronic - Drum & Bass": "6", "Alternative": "48", "Electronic - Minimal": "101", "Electronic - Gabber": "40", "Vocal Montage": "76", "Metal (general)": "36", "Electronic - Breakbeat": "9", "Soul": "25", "Electronic (general)": "1", "Punk": "35", "Pop - Synth": "61", "Electronic - Dance": "3", "Pop (general)": "12", "Trance - Progressive": "85", "Trance (general)": "71", "Disco": "58", "Electronic - House": "10", "Experimental": "46", "Trance - Goa": "66", "Rock - Hard": "14", "Trance - Dream": "67", "Spiritual": "47", "Metal - Extreme": "37", "Jazz (general)": "29", "Trance - Tribal": "70", "Classical": "20", "Hip-Hop": "22", "Bluegrass": "105", "Halloween": "82", "Jazz - Acid": "30", "Easy Listening": "107", "New Age": "44", "Fantasy": "52", "Blues": "19", "Other": "41", "Trance - Acid": "63", "Gothic": "38", "Electronic - Hardcore": "39", "One Hour Compo": "53", "Pop - Soft": "62", "Electronic - Techno": "7", "Religious": "49", "Folk": "21"} categories = [] |
︙ |
Modified channels/myoggradio.py from [acc966f357] to [b090a1507b].
︙ | |||
43 44 45 46 47 48 49 | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | - + | # open source radio sharing stie class myoggradio(ChannelPlugin): # settings title ="MOR" #module = "myoggradio" api = "http://www.myoggradio.org/" |
︙ | |||
99 100 101 102 103 104 105 106 107 108 109 110 111 112 | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | + | self.parent.status("Unknown category") pass # augment result list for i,e in enumerate(entries): entries[i]["homepage"] = self.api + "c_common_details.jsp?url=" + e["url"] entries[i]["genre"] = cat entries[i]["format"] = "audio/mpeg" # send back return entries # upload a single station entry to MyOggRadio def share(self, *w): |
︙ |
Modified channels/punkcast.py from [5c675df85e] to [eea2622232].
︙ | |||
86 87 88 89 90 91 92 | 86 87 88 89 90 91 92 93 94 95 96 97 98 | - + | rx_sound = re.compile("""(http://[^"<>]+[.](mp3|ogg|m3u|pls|ram))""") html = http.get(row["homepage"]) # look up ANY audio url for uu in rx_sound.findall(html): __print__( dbg.DATA, uu ) (url, fmt) = uu |
Modified channels/radiobrowser.py from [776df88d1e] to [efa310538d].
︙ | |||
57 58 59 60 61 62 63 | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | - + | # "votes":4,"negativevotes":10}, # class radiobrowser (ChannelPlugin): # description homepage = "http://www.radio-browser.info/" has_search = True |
︙ |
Modified channels/shoutcast.py from [05b00913ff] to [e812eed775].
︙ | |||
50 51 52 53 54 55 56 | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | - + | # class shoutcast(channels.ChannelPlugin): # desc module = "shoutcast" title = "SHOUTcast" base_url = "http://shoutcast.com/" |
︙ |
Modified channels/surfmusik.py from [48d1f40b6c] to [cab3938c1e].
︙ | |||
42 43 44 45 46 47 48 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | - + | # Surfmusik sharing site class surfmusik (ChannelPlugin): # description title = "SurfMusik" module = "surfmusik" homepage = "http://www.surfmusik.de/" |
︙ |
Modified channels/timer.py from [e2f164442a] to [0abfc97e9b].
︙ | |||
93 94 95 96 97 98 99 | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | - + | # close dialog,get data def add_timer(self, *w): self.parent.timer_dialog.hide() row = self.parent.row() row = copy.copy(row) # add data |
︙ | |||
168 169 170 171 172 173 174 | 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | - + - + | return 0 # no limit # action wrapper def play(self, row, *args, **kwargs): action.play( url = row["url"], audioformat = row.get("format","audio/mpeg"), |
Modified channels/tunein.py from [becae358dd] to [6f7da7eac6].
︙ | |||
36 37 38 39 40 41 42 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | - + | class tunein (ChannelPlugin): # description title = "TuneIn" module = "tunein" homepage = "http://tunein.com/" has_search = False |
︙ |
Modified channels/xiph.py from [747e142e4c] to [87b6bef7f2].
︙ | |||
58 59 60 61 62 63 64 | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - + | # desc module = "xiph" title = "Xiph.org" homepage = "http://dir.xiph.org/" #xml_url = "http://dir.xiph.org/yp.xml" json_url = "http://api.include-once.org/xiph/cache.php" |
︙ |
Modified config.py from [ad58239673] to [39c7681328].
︙ | |||
267 268 269 270 271 272 273 | 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | - + + | return netrc[server] # Use config:-style definitions for argv extraction, # such as: { arg: -D, name: debug, type: bool } def init_args(self, ap): for opt in plugin_meta(frame=0).get("config"): |
︙ |
Modified help/config_apps.page from [eda5c4f097] to [d8a5ff9529].
︙ | |||
12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - + - + - - + | <p>On BSD/Linux systems there are a plethora of audio players. In streamtuner2 you can <link xref="configuration">configure</link> most of them as target application. Mostly it makes sense to use a single application for all audio formats. But at least the */* media type should be handled by a generic player, like vlc.</p> <table shade="rows" rules="rows cols"> |
︙ | |||
43 44 45 46 47 48 49 50 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | + - + + + + - - + + + + + + + | <p>Any listed application can be invoked with a different kind of URL or filename. Most are rather flexible, but some depend on specific playlist file types or URLs. You can control this by adding a placeholder after the configured application name:</p> <table shade="rows" rules="rows cols"> <thead> <tr><td><p>Placeholder</p></td><td><p>Alternatives</p></td><td><p>URL/Filename type</p></td></tr> </thead> <tr><td><p>%pls</p></td><td><p>%url %u %r</p></td><td><p>Either a remote .pls resource (fastest), or a local .pls file (if converted)</p></td></tr> <tr><td><p>%m3u</p></td><td><p>%f %g %m</p></td><td><p>Provides a local .m3u file for the streaming station</p></td></tr> |
Modified help/configuration.page from [6c83ddf5a5] to [cec2e8132d].
︙ | |||
56 57 58 59 60 61 62 | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | - + - + | <p>Application names are most always lowercase binary names. Double click an entry to edit it. After editing the icon next to the application name will be updated. If it stays green, it's likely to work. If it turns red / into a stop symbol, then the entered name is likely incorrect.</p> <p><media type="image" src="img/configapps.png" mime="image/png" /></p> <p>After the application name, you can use a placeholder like "<var>%pls</var>" (default), |
︙ |
Modified st2.py from [4120fbf826] to [c18d3ab85b].
︙ | |||
338 339 340 341 342 343 344 | 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | - + | entries = self.channel().stations() favicon.download_all(entries) # Save stream to file (.m3u) def save_as(self, widget): row = self.row() default_fn = row["title"] + ".m3u" |
︙ |
Modified uikit.py from [0158bdc6ec] to [f012e456ad].
︙ | |||
359 360 361 362 363 364 365 | 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 | - - - + + + + + + + + + + + - + | pass #-- Save-As dialog # @staticmethod |
︙ | |||
444 445 446 447 448 449 450 | 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 | - + + + + + + - + + - + | where.insert(m, insert) else: where.add(m) # gtk.messagebox @staticmethod |
︙ |