Closed ration closed 2 years ago
Thanks @ration. I don't have a ttrss instance deployed yet. Before I do that, I'd like to check if the problem is more local to elfeed-tube, as opposed to with the elfeed-protocol integration.
Can you open up a youtube entry in Elfeed and call C-u M-x elfeed-tube-fetch
? (Or C-u F
according to your keybindings above.) I'd like to know if the same error occurs with manual fetches of information.
If this also fails, it will fail without a traceback. We can then generate a traceback by calling it synchronously. Open a scratch buffer and run:
(let ((entry (buffer-local-value 'elfeed-show-entry
(get-buffer "*elfeed-entry*"))))
(aio-wait-for (elfeed-tube--fetch-1 entry))
(if-let ((item (elfeed-tube--gethash entry)))
(prin1
(elfeed-tube-item-error item)
(current-buffer))))
It fails with a similar stack.
Looking at the code I think my entry-structs are built different:
#s(elfeed-entry ("www.youtube.com" . "{\"ver\":2,\"uid\":1,\"hash\":\"SHA1:4a06b89a09a2632d4a2bd2612920577525068a05\"}") "What if Rome Never Conquered Britain?" "https://www.youtube.com/watch?v=wVP80TMuZ5s" 1655203134 #s(elfeed-ref "da39a3ee5e6b4b0d3255bfef95601890afd80709") html nil (Youtube) "ttrss+https://my.tintytiny.server::https://www.youtube.com/feeds/videos.xml?channel_id=UClfEht64_NrzHf8Y0slKEjw" (:author "AlternateHistoryHub" :protocol-id "ttrss+https://admin@my.tinytiny.server" :id 1098208 :guid-hash "{\"ver\":2,\"uid\":1,\"hash\":\"SHA1:4a06b89a09a2632d4a2bd2612920577525068a05\"}" :feed-id 674))
And it causes elfeed-tube--get-video-id
to fail.
Thanks, that's very helpful! Can you run the following code in a scratch buffer with a (tt-rss derived) youtube entry open in Elfeed and add the results here?
(let ((entry (buffer-local-value 'elfeed-show-entry
(get-buffer "*elfeed-entry*"))))
(cl-loop for prop in
'(title id feed-id link tags date content meta)
collect
(cons prop (funcall (intern-soft
(concat "elfeed-entry-"
(symbol-name prop)))
entry))))
Entries created by tt-rss clearly use a different entry structure from regular Elfeed. I can account for it in my code once I can see what it looks like.
I tried making elfeed-tube--get-video-id
more generic in 869f65b. Please check if this works for tt-rss derived entries for you.
((title . "Nightflyer & DX17 - Signal Dust (Synthwave / Retrowave)") (id "www.youtube.com" . "{\"ver\":2,\"uid\":1,\"hash\":\"SHA1:7944ea6f56cd8e8a8d8aa145f4582d599dbc1f1a\"}") (feed-id . "ttrss+https://user@tinytiny.server::https://www.youtube.com/feeds/videos.xml?channel_id=UC6ghlxmJNMd8BE_u1HR-bTg") (link . "https://www.youtube.com/watch?v=Zn9m2mW--TE") (tags Youtube) (date . 1655146800) (content . #s(elfeed-ref "da39a3ee5e6b4b0d3255bfef95601890afd80709")) (meta :author "The '80s Guy" :protocol-id "ttrss+https://user@tinytiny.server" :id 1098193 :guid-hash "{\"ver\":2,\"uid\":1,\"hash\":\"SHA1:7944ea6f56cd8e8a8d8aa145f4582d599dbc1f1a\"}" :feed-id 634))
Yeah thanks! Now it doesn't throw an error, but it still looks limited - I only see the transcript and no thumbnail or metadata.
Yeah thanks! Now it doesn't throw an error, but it still looks limited - I only see the transcript and no thumbnail or metadata.
I'm looking into it, but in the meantime, did you try C-u M-x elfeed-tube-fetch
? This clears the cache (including logged errors that might be keeping it from trying to fetch again) and forces a refetch of all metadata.
I'm looking into it, but in the meantime, did you try C-u M-x elfeed-tube-fetch? This clears the cache (including logged errors that might be keeping it from trying to fetch again) and forces a refetch of all metadata.
Yes this did it! Awesome!
Okay. To be clear M-x elfeed-tube-fetch
is not a command the user is expected to remember or invoke when auto-fetching is turned on, which is the default. It should just work. (The hope is that elfeed-tube will work pretty much invisibly with Elfeed with the default settings.)
I'm assuming it's been working fine since - feel free to reopen this issue if ssomething fails again.
Minimal configuration to produce, obviously requires tinytiny installed and elfeed protocol configured to auth and connect to it. The tinytiny part is simple enough with docker installation. Replace ttrss+https://user@my.tinitinyrss.server with whatever server you wish to use and create the authinfo.
Produces error:
Tested with GNU Emacs 28.1.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2022-05-12.