1
0
Fork 0
forked from blallo/rss-bridge

[YoutubeBridge] Sort playlist items by publication date (#643)

This commit is contained in:
Eugene Molotov 2018-03-13 16:24:40 +05:00 committed by Teromene
parent cb91cd5d2f
commit cacbe90102

View file

@ -181,6 +181,9 @@ class YoutubeBridge extends BridgeAbstract {
or returnServerError("Could not request YouTube. Tried:\n - $url_listing"); or returnServerError("Could not request YouTube. Tried:\n - $url_listing");
$this->ytBridgeParseHtmlListing($html, 'tr.pl-video', '.pl-video-title a'); $this->ytBridgeParseHtmlListing($html, 'tr.pl-video', '.pl-video-title a');
$this->feedName = 'Playlist: ' . str_replace(' - YouTube', '', $html->find('title', 0)->plaintext); // feedName will be used by getName() $this->feedName = 'Playlist: ' . str_replace(' - YouTube', '', $html->find('title', 0)->plaintext); // feedName will be used by getName()
usort($this->items, function ($item1, $item2) {
return $item2['timestamp'] - $item1['timestamp'];
});
} elseif($this->getInput('s')) { /* search mode */ } elseif($this->getInput('s')) { /* search mode */
$this->request = $this->getInput('s'); $this->request = $this->getInput('s');
$page = 1; $page = 1;