Check-in [930e5fd7a5]
Overview
Comment: | Add .save() after reading in CSV list. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
930e5fd7a5dd02420d784dd8f7138f83 |
User & Date: | mario on 2015-05-05 17:25:30 |
Other Links: | manifest | tags |
Context
2015-05-05
| ||
19:47 | Filter `None` from extracted URLs. Fix save_playlist.export; copy.copy each row before overwriting/filling url. Implement specific `jamj` extractor (regex stumbled over playlist title). check-in: c9509eb384 user: mario tags: trunk | |
17:25 | Add .save() after reading in CSV list. check-in: 930e5fd7a5 user: mario tags: trunk | |
17:22 | Add playlist importer channel for GLRP. check-in: 44f08cdd69 user: mario tags: trunk | |
Changes
Modified contrib/glrp.py from [552820b828] to [cb31b35031].
︙ | ︙ | |||
45 46 47 48 49 50 51 52 53 54 55 56 57 58 | ls = csv.reader(dat.split("\n")) for title, url, genre, location, fav in [x for x in ls if len(x)==5]: if not self.streams.get(genre): self.streams[genre] = [] self.streams[genre].append(dict( title=title, url=url, genre=genre, playing=location, favorite=len(fav) )) self.categories = sorted(self.streams.keys()) # Just returns existing entries def update_streams(self, cat, search=None): return self.streams.get(cat, []) | > | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | ls = csv.reader(dat.split("\n")) for title, url, genre, location, fav in [x for x in ls if len(x)==5]: if not self.streams.get(genre): self.streams[genre] = [] self.streams[genre].append(dict( title=title, url=url, genre=genre, playing=location, favorite=len(fav) )) self.save() self.categories = sorted(self.streams.keys()) # Just returns existing entries def update_streams(self, cat, search=None): return self.streams.get(cat, []) |