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

⌈⌋ branch:  streamtuner2


Check-in [8e4f191706]

Overview
Comment:Remove unsupported view-source: URL prefix, rewrite links from /cat/ to /doc/tip/ for downloading/plain view instead of text/html browsing.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8e4f1917060fe86382f8d34cacc791a076c65219
User & Date: mario on 2015-05-07 17:09:57
Other Links: manifest | tags
Context
2015-05-07
17:10
Make static category lists more readable. check-in: f94731a05b user: mario tags: trunk
17:09
Remove unsupported view-source: URL prefix, rewrite links from /cat/ to /doc/tip/ for downloading/plain view instead of text/html browsing. check-in: 8e4f191706 user: mario tags: trunk
01:22
Fix UTF-8 text decoding for CSV after downloading as binary. check-in: 27b9174109 user: mario tags: trunk
Changes

Modified channels/pluginmanager2.py from [3bf0aa42d2] to [35b266f60e].

145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
        b = self.button("Install", stock="gtk-save", cb=lambda *w:self.install(p))
        p = self.update_p(p)
        text = "<b>$title</b>, "\
               "<small>version:</small> <span weight='bold' color='orange'>$version</span>, "\
               "<small>type: <i><span color='#559'>$type</span></i> "\
               "category: <i><span color='blue'>$category</span></i></small>\n"\
               "<span size='smaller' color='#364'>$description</span>\n"\
               "<span size='small' color='#532' weight='ultralight'>$extras, <a href='view-source:$file'>view src</a></span>"
        self.add_(b, safe_format(text, **p), markup=1)

        
    # Add placeholder fields
    def update_p(self, p):
        fields = ("status", "priority", "support", "author", "depends")
        extras = ["{}: <b>{}</b>".format(n, html_escape(p[n])) for n in fields if p.get(n)]
        p["extras"] = " ".join(["💁"] + extras)
        p["file"] = p["$file"]
        for field in ("version", "title", "description", "type", "category"):
            p.setdefault(field, "-")
        return p
    

    # Download a plugin
    def install(self, p):







|








|







145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
        b = self.button("Install", stock="gtk-save", cb=lambda *w:self.install(p))
        p = self.update_p(p)
        text = "<b>$title</b>, "\
               "<small>version:</small> <span weight='bold' color='orange'>$version</span>, "\
               "<small>type: <i><span color='#559'>$type</span></i> "\
               "category: <i><span color='blue'>$category</span></i></small>\n"\
               "<span size='smaller' color='#364'>$description</span>\n"\
               "<span size='small' color='#532' weight='ultralight'>$extras, <a href='$file'>view src</a></span>"
        self.add_(b, safe_format(text, **p), markup=1)

        
    # Add placeholder fields
    def update_p(self, p):
        fields = ("status", "priority", "support", "author", "depends")
        extras = ["{}: <b>{}</b>".format(n, html_escape(p[n])) for n in fields if p.get(n)]
        p["extras"] = " ".join(["💁"] + extras)
        p["file"] = p["$file"].replace("/cat/", "/doc/tip/")
        for field in ("version", "title", "description", "type", "category"):
            p.setdefault(field, "-")
        return p
    

    # Download a plugin
    def install(self, p):