Open Dudemullet opened 9 months ago
I tried your version of the plugin in Tapestry Loom. When I enter the placeholder URL (https://www.youtube.com/@theiconfactory) and click Verify, I get the following error message:
TypeError: undefined is not an object (evaluating 'channelUrl.lastIndexOf')
The same happens when I try the version of the URL that uses the UUID of a channel instead of the nickname (https://www.youtube.com/channel/UC7zt-GmwdxyqgSwhKmhSniQ; also a valid URL for The Iconfactory channel).
Weird, I had seen this error during development but it stopped happening to me. I'll code to handle this error and call setIdentifier(null)
on error as other plugins seem to handle error/uknown scenarios.
As a sidenote, in my env both examples are working which is pretty cool because I hadn't tested your second example. Thanks @gracjankn 👍
Ok so found an unexpected behavior that explains what's going on and why you were seeing that error @gracjankn. the identify
method is being called when clicking the "Set Variables..." button. So if a previos value had been saved for site
, a new HTTP Request is being sent with that value, before having the chance to update it.
Anyway, I added an Exception handler for that scenario.
I tested the updated version. It no longer throws an error when trying to save the variables, but it doesn't function correctly afterwards.
The source is named YouTube Channel (Unknown). When I click Load, it throws up the following error message:
YouTube Channel (Unknown) Error: Error: exception = unsupported URL
I tried both the URLs I mentioned previously.
I can't reproduce this @gracjankn, given that some state is saved across setting different variables, have you tried resetting the variables?
There's a "Reset" button in the "Set Variables..." menu, ave you tried that? Also, maybe trying using both urls before reloading the plugin
Hi 👋
This PR updates the youtube plugin to be able to work out of a channels regular url. By regular I mean whatever you see when you click on their avatar or whenver you google something like "youtube The Iconfactory". This also updates this plugin's
placeholder
config to represent this change.Some questions/suggestions after trying out the API:
baseUrl
in a dictionary withsetIdentifier
my expectation was forbaseUrl
to be use in theload
function but this was not the case. ¿Where is it being used then? 🤔feedUrl
are being parsed/set in the load method. Maybe have a way to set or send variables fromidentify
toload
? For now I used "globals"