iv-org / invidious

Invidious is an alternative front-end to YouTube
https://invidious.io
GNU Affero General Public License v3.0
16.47k stars 1.85k forks source link

Playlist RSS feeds - URLs end with "&" and thumbnails aren't loading #1232

Open TheFrenchGhosty opened 4 years ago

TheFrenchGhosty commented 4 years ago

Some URLs in RSS feeds will end with "&" for no reason, it seems to be an issue for every playlist RSS feeds.

When checking the file, it shows that & is added at the end of the URL.

Example: https://invidio.us/feed/playlist/PL0AQIMR-tpolVRCh8SEK6V5Xi4mRJdFTL

<entry>
  <id>yt:video:7uQOBLCcp3I</id>
  <yt:videoId>7uQOBLCcp3I</yt:videoId>
  <yt:channelId>UCiH828EtgQjTyNIMH6YiOSw</yt:channelId>
  <title>Superman Returns - Nostalgia Critic</title>
  <link rel="alternate" href="https://invidio.us/watch?v=7uQOBLCcp3I&amp;"/>
  <author>
   <name>Channel Awesome</name>
   <uri>https://invidio.us/channel/UCiH828EtgQjTyNIMH6YiOSw</uri>
  </author>
  <published>2020-06-10T22:00:00+00:00</published>
  <updated>2020-06-10T22:00:00+00:00</updated>
  <media:group>
   <media:title>Superman Returns - Nostalgia Critic</media:title>
   <media:content url="https://invidio.us/v/7uQOBLCcp3I?version=3" type="application/x-shockwave-flash" width="640" height="390"/>
   <media:thumbnail url="https://invidio.us/vi/7uQOBLCcp3I/hqdefault.jpg" width="480" height="360"/>
   <media:description>[REMOVED]</media:description>
   <media:community>
    <media:starRating count="1591" average="4.94" min="1" max="5"/>
    <media:statistics views="11088"/>
   </media:community>
  </media:group>
 </entry>

Since the link will update, here's a copy of the page:

PL0AQIMR-tpolVRCh8SEK6V5Xi4mRJdFTL.txt

girst commented 4 years ago

that's due to this line: https://github.com/omarroth/invidious/blob/338dc3223c9745877aacd276df772a412b99d778/src/invidious.cr#L3325 (introduced by yours truly in #743). the trailing & will be ignored by virtually all http servers/form-urlencoded parsers. if it really bothers you, the ternary could be extended to check that params is non-empty.

TheFrenchGhosty commented 4 years ago

Well the things is that it's inconsistent with the channel RSS feeds.

The playlist RSS also seems to be partially broken since the thumbnail isn't displayed in it.

TheFrenchGhosty commented 3 years ago

A 10$ bounty has been added to this issue.

Anyone opening a PR fixing this issue, will receive 10$ (in BTC) from the Invidious project.

More details: https://github.com/iv-org/invidious/issues/1898

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely outdated. If you think this issue is still relevant and applicable, you just have to post a comment and it will be unmarked.

TheFrenchGhosty commented 2 years ago

Still an issue.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely outdated. If you think this issue is still relevant and applicable, you just have to post a comment and it will be unmarked.