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

⌈⌋ ⎇ branch:  streamtuner2


Check-in [77ab1e927e]

Overview
Comment:Strip double .png/.jpeg extension from cached `img` icons.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 77ab1e927efe41dc500020e9f1b3e7f0cd328f36
User & Date: mario on 2015-05-18 00:29:13
Other Links: manifest | tags
Context
2015-05-18
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
00:28
Remove _=time from streaminfo json urls. check-in: b23180bba7 user: mario tags: trunk
Changes

Modified channels/favicon.py from [214b0ad098] to [9b5655d121].

233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
#-----------------




# Convert row["img"] or row["homepage"] into local favicon cache filename
# Use just domain for homepages, but most of the url for banner/logo imgs.
rx_strip_proto = re.compile("^\w+://|/$")
rx_just_domain = re.compile("^\w+://|[/#?].*$")
rx_non_wordchr = re.compile("[^\w._-]")
def row_to_fn(row):
    url = row.get("img")
    if url:
        url = rx_strip_proto.sub("", url)     # strip proto:// and trailing /
    else:







|







233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
#-----------------




# Convert row["img"] or row["homepage"] into local favicon cache filename
# Use just domain for homepages, but most of the url for banner/logo imgs.
rx_strip_proto = re.compile("^\w+://|/$|\.(png|gif|ico|jpe?g)$")
rx_just_domain = re.compile("^\w+://|[/#?].*$")
rx_non_wordchr = re.compile("[^\w._-]")
def row_to_fn(row):
    url = row.get("img")
    if url:
        url = rx_strip_proto.sub("", url)     # strip proto:// and trailing /
    else: