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

⌈⌋ branch:  streamtuner2


Check-in [0977371de1]

Overview
Comment:Typecast str() for bookmarks.is_in() url lookups → redundant. (Prepare for merging columns-update hook.)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0977371de1727038bfd7d41896b98a908c14331e
User & Date: mario on 2015-05-18 00:30:52
Other Links: manifest | tags
Context
2015-05-18
22:19
Delay window title updating logic and ui_cht callback via uikit.do() wrapper.

Seems to fix both: - Gdk:ERROR:/build/buildd/gtk+2.0-2.24.23/gdk/gdkregion-generic.c:1114:miUnionNonO: assertion failed: (r->x1 < r->x2) - Error in `python': double free or corruption (fasttop): 0x0..... check-in: 8a68105eeb user: mario tags: trunk

00:30
Typecast str() for bookmarks.is_in() url lookups → redundant. (Prepare for merging columns-update hook.) check-in: 0977371de1 user: mario tags: trunk
00:29
Strip double .png/.jpeg extension from cached `img` icons. check-in: 77ab1e927e user: mario tags: trunk
Changes

Modified action.py from [b70f71d85a] to [ec6873c4fb].

251
252
253
254
255
256
257

258
259
260
261
262
263
264
    cnv = extract_playlist(cnt)
    ext = cnv.probe_ext(url)
    probe = cnv.probe_fmt()

    # Check ambiguity (except pseudo extension)
    if len(set([source, mime, probe])) > 1:
        log.WARN("Possible playlist format mismatch:", "listformat={}, http_mime={}, rx_probe={}, ext={}".format(source, mime, probe, ext))


    # Extract URLs from content
    for fmt in playlist_fmt_prio:
        if not urls and fmt in (source, mime, probe, ext, "raw"):
            urls = cnv.urls(fmt)
            urls = filter(None, urls)
            log.DATA("conversion from:", source, " with extractor:", fmt, "got URLs=", urls)







>







251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
    cnv = extract_playlist(cnt)
    ext = cnv.probe_ext(url)
    probe = cnv.probe_fmt()

    # Check ambiguity (except pseudo extension)
    if len(set([source, mime, probe])) > 1:
        log.WARN("Possible playlist format mismatch:", "listformat={}, http_mime={}, rx_probe={}, ext={}".format(source, mime, probe, ext))
#        log.DATA(cnt)

    # Extract URLs from content
    for fmt in playlist_fmt_prio:
        if not urls and fmt in (source, mime, probe, ext, "raw"):
            urls = cnv.urls(fmt)
            urls = filter(None, urls)
            log.DATA("conversion from:", source, " with extractor:", fmt, "got URLs=", urls)

Modified channels/bookmarks.py from [9515f23d26] to [199659c7f2].

87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
        conf.save(self.module, self.streams, nice=1)


    # checks for existence of an URL in bookmarks store,
    # this method is called by other channel modules' display() method
    def is_in(self, url, once=1):
        if (not self.urls):
            self.urls = [row.get("url","urn:x-streamtuner2:no") for row in self.streams["favourite"]]
        return url in self.urls


    # called from main window / menu / context menu,
    # when bookmark is to be added for a selected stream entry
    def add(self, row):

        # normalize data (this row originated in a gtk+ widget)







|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
        conf.save(self.module, self.streams, nice=1)


    # checks for existence of an URL in bookmarks store,
    # this method is called by other channel modules' display() method
    def is_in(self, url, once=1):
        if (not self.urls):
            self.urls = [str(row.get("url","urn:x-streamtuner2:no")) for row in self.streams["favourite"]]
        return str(url) in self.urls


    # called from main window / menu / context menu,
    # when bookmark is to be added for a selected stream entry
    def add(self, row):

        # normalize data (this row originated in a gtk+ widget)