Do not offer a player for a file that is not audio or video
The media-type filter stopped new image enclosures being fetched, but ones already on disk still got a play button and an <audio> element, because the UI tested for a path rather than for a playable type. Four places did this, including play() itself, which picked the first downloaded enclosure whatever it was. isPlayable() checks audio/* or video/*, falling back to the extension when a feed declares no type. A downloaded non-media file now shows as its kind with Save and Delete, so it stays available without posing as an episode. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AdXho5tTkjFLeUXKbEjKBh
This commit is contained in:
BIN
tests/ui/fixtures/art.jpg
Normal file
BIN
tests/ui/fixtures/art.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
8
tests/ui/fixtures/pics.xml
Normal file
8
tests/ui/fixtures/pics.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<rss version="2.0"><channel><title>Picture Blog</title><link>http://127.0.0.1:8792/</link>
|
||||
<description>A text blog whose entries carry a header image, as Substack does.</description>
|
||||
<item><title>An Article</title><guid>pic-1</guid>
|
||||
<pubDate>Mon, 01 Sep 2026 10:00:00 +0000</pubDate>
|
||||
<description><p>Words, not audio.</p></description>
|
||||
<enclosure url="http://127.0.0.1:8792/art.jpg" length="3020" type="image/jpeg"/></item>
|
||||
</channel></rss>
|
||||
Reference in New Issue
Block a user