Check-in [babd818a96]
Overview
Comment: | Use ordered list for playlist content probing. Fix listfmt() mime to abbr conversion. Allow non-http URLs for raw() extraction. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | action-mapfmts |
Files: | files | file ages | folders |
SHA1: |
babd818a96806a5531b02639bd0ec240 |
User & Date: | mario on 2015-04-09 02:51:02 |
Other Links: | branch diff | manifest | tags |
Context
2015-04-09
| ||
14:50 | Still some parameter renaming in action module to do. Optional support for row={} parameter in play/record calls, in case .pls/.m3u needs to be constructed (to retain title=). Adapt action playlist exporting to wrapper object, which preconverts plain URL lists or [rows] list, can itself call convert_playlist(), and optionalized file writing. Rewrite main save() and exportcat.save() to utilize new save_playlist(). Implement overwrite confirmation for Save-as dialog. check-in: b784d408c1 user: mario tags: action-mapfmts | |
02:51 | Use ordered list for playlist content probing. Fix listfmt() mime to abbr conversion. Allow non-http URLs for raw() extraction. check-in: babd818a96 user: mario tags: action-mapfmts | |
2015-04-08
| ||
23:32 | Consolidate listformat types to just "pls", "m3u" and "srv". Probe for direct ICY server contact in action.playlist_convert(), unify extraction methods. check-in: 85313637a3 user: mario tags: action-mapfmts | |
Changes
Modified action.py from [2ff7501bb2] to [fd5f4b120e].
︙ | |||
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | 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 | + - - - + + + - - - - - - - - - - + + + + + + + + + + + + - + - + | "url/direct": "srv", "url/youtube": "href", "url/http": "href", "audio/x-pn-realaudio": "ram", "application/smil": "smil", "application/vnd.ms-wpl":"smil", "x-urn/st2-script": "script", # unused "application/x-shockwave-flash": "href", # fallback } # Audio type MIME map mediafmt_t = { "audio/mpeg": "mp3", "audio/ogg": "ogg", "audio/aac" : "aac", "audio/aacp" : "aac", "audio/midi": "midi", "audio/mod": "mod", "audio/it+zip": "mod", "audio/s3+zip": "mod", "audio/xm+zip": "mod", } # Player command placeholders for playlist formats placeholder_map = dict( |
︙ | |||
127 128 129 130 131 132 133 | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | - + - - - - | else: return " ".join(["%r" % str(s) for s in ins]) # Convert e.g. "text/x-scpls" MIME types to just "pls" monikers # def listfmt(t = "pls"): |
︙ | |||
166 167 168 169 170 171 172 | 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 | - + - - + - + - - + - + - + + + - + + - + + - - + + + + - + - - - + + + + + + - - + + | # standard placeholders for dest, rx in placeholder_map.items(): if re.search(rx, cmd, re.X): # from .pls to .m3u urls = convert_playlist(url, listfmt(source), listfmt(dest)) # insert quoted URL/filepath |
︙ | |||
352 353 354 355 356 357 358 | 358 359 360 361 362 363 364 365 366 | - + - - - - - + - | stream_id = stream_id and stream_id.group(1) or "XXXXXX" try: channelname = main.current_channel except: channelname = "unknown" return (str(conf.tmp) + os.sep + "streamtuner2."+channelname+"."+stream_id+".m3u", len(stream_id) > 3 and stream_id != "XXXXXX") |