-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
YouTube sprout will stop working in May #640
Comments
Hi, noticed this too. I got a working fix, but would need a solution to avoid duplicates.
Any suggestions, questions? (I hope I have my terminology clear.) |
A straightforward solution would be something like this (daos/mysql/Database.php), solutions for pgsql and sqlite would be quiet similar. Spouts aren't managed separately, they are updated with a new selfoss release; whether the source code changed or the database scheme. if(strnatcmp($version, "7") < 0){
\F3::get('db')->exec('
UPDATE items
SET uid = REPLACE(uid, 'http://gdata.youtube.com/feeds/api/videos/', 'yt:video:')
WHERE source IN (SELECT id FROM sources WHERE spout = 'spouts\\youtube\\youtube')
');
} |
Maybe you can abstract the uid compare function: make it a simple comparison for all spouts, and make it compare both forms of the uid for the youtube spout. If you can avoid a databse schema version, it's better, because it's 3 times the work and the tests. |
I think I will go with the compare thingy, just stripping the stuff before in the process and leaving the plain video id. $id = str_replace(
array('http://gdata.youtube.com/feeds/api/videos/', 'yt:video:'),
"",
$id
); Edit: Another thing, which came to my mind, how about supporting channels without a "username", but this is probably subject of a new issue. |
Well, this attempt to customize the if (isset($itemsFound[$item->getId()])) {
continue;
} The least intrusive approach would be to just replace |
I use now this RSS feed URLs instead of the sprout: |
That is what I changed the spout to. I have not yet managed to create a pull request. I also wanted to add an option for channels with id only. |
Any progress on updating the spout? Or migrating to RSS is the only way? |
Closes: fossar#640
I got today a warning video in a YouTube sprout, that the old API will drop:
http://youtube-eng.blogspot.de/2015/04/bye-bye-youtube-data-api-v2.html
The text was updated successfully, but these errors were encountered: