Check-in [a3fd4f7154]
Overview
Comment: | Copy() cache search rows (else channel entries got modified) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
a3fd4f71544cd1185d5f34b42c64f49d |
User & Date: | mario on 2014-06-30 17:39:15 |
Other Links: | manifest | tags |
Context
2014-06-30
| ||
17:40 | Fix MyOggRadio.org homepage now also as API. Use new ahttp module (fixed again). check-in: be67f8f19a user: mario tags: trunk | |
17:39 | Copy() cache search rows (else channel entries got modified) check-in: a3fd4f7154 user: mario tags: trunk | |
2014-06-17
| ||
01:30 | Wadsworth constant for youtube.com/ links check-in: 3e0cfc29b3 user: mario tags: trunk | |
Changes
Modified st2.py from [5dbf6dbb13] to [a922a58f51].
︙ | ︙ | |||
65 66 67 68 69 70 71 72 73 74 75 76 77 78 | # standard modules import sys import os, os.path import re from collections import namedtuple # threading or processing module try: from processing import Process as Thread except: from threading import Thread Thread.stop = lambda self: None | > | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | # standard modules import sys import os, os.path import re from collections import namedtuple from copy import copy # threading or processing module try: from processing import Process as Thread except: from threading import Thread Thread.stop = lambda self: None |
︙ | ︙ | |||
622 623 624 625 626 627 628 629 630 631 632 633 634 635 | # categories for cat in cn.streams.keys(): # stations for row in cn.streams[cat]: # assemble text fields to compare text = " ".join([row.get(f, " ") for f in fields]) if text.lower().find(self.q) >= 0: row["genre"] = c + " " + row.get("genre", "") entries.append(row) self.show_results(entries) # display "search" in "bookmarks" def show_results(self, entries): main.status(1.0) | > | 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 | # categories for cat in cn.streams.keys(): # stations for row in cn.streams[cat]: # assemble text fields to compare text = " ".join([row.get(f, " ") for f in fields]) if text.lower().find(self.q) >= 0: row = copy(row) row["genre"] = c + " " + row.get("genre", "") entries.append(row) self.show_results(entries) # display "search" in "bookmarks" def show_results(self, entries): main.status(1.0) |
︙ | ︙ | |||
1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 | return self.currentcat() # update bookmarks from freshly loaded streams data def heuristic_update(self, updated_channel, updated_category): if not conf.heuristic_bookmark_update: return save = 0 fav = self.streams["favourite"] # First we'll generate a list of current bookmark stream urls, and then # remove all but those from the currently UPDATED_channel + category. # This step is most likely redundant, but prevents accidently re-rewriting # stations that are in two channels (=duplicates with different PLS urls). | > | 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 | return self.currentcat() # update bookmarks from freshly loaded streams data def heuristic_update(self, updated_channel, updated_category): if not conf.heuristic_bookmark_update: return __print__(dbg.ERR, "heuristic bookmark update") save = 0 fav = self.streams["favourite"] # First we'll generate a list of current bookmark stream urls, and then # remove all but those from the currently UPDATED_channel + category. # This step is most likely redundant, but prevents accidently re-rewriting # stations that are in two channels (=duplicates with different PLS urls). |
︙ | ︙ |