Commit graph

55 commits

Author SHA1 Message Date
saltycrys 36e9fb9d68 Fix watch_videos endpoint
Playlists created by `watch_videos` do not have an author which caused a crash
previously.
2021-01-04 05:35:59 +01:00
saltycrys e55a09241e Fix Invidious playlist continuation
Playing a video in a Invidious playlist now correctly redirects to the next
video. The problem was that the offset was updated in the wrong place.
2020-12-07 22:28:27 +01:00
saltycrys 3dac33ffba
Add backtraces to errors (#1498)
Error handling has been reworked to always go through the new `error_template`,
`error_json` and `error_atom` macros.
They all accept a status code followed by a string message or an exception
object. `error_json` accepts a hash with additional fields as third argument.

If the second argument is an exception a backtrace will be printed, if it is a
string only the string is printed. Since up till now only the exception message
was printed a new `InfoException` class was added for situations where no
backtrace is intended but a string cannot be used.

`error_template` with a string message automatically localizes the message.
Missing error translations have been collected in https://github.com/iv-org/invidious/issues/1497
`error_json` with a string message does not localize the message. This is the
same as previous behavior. If translations are desired for `error_json` they
can be added easily but those error messages have not been collected yet.

Uncaught exceptions previously only printed a generic message ("Looks like
you've found a bug in Invidious. [...]"). They still print that message
but now also include a backtrace.
2020-11-30 10:59:21 +01:00
Gauthier POGAM--LE MONTAGNER 1595eaeb74 Fix #1382 : Playlists missing first video
The index was set to index - 1, causing the first video to be shifted in fetch_playlist_videos
(because of its index being -1 lower than it should) and thus not displayed on playlist page.
2020-09-25 14:26:07 +02:00
Omar Roth 452d1e8307
Fix warnings with latest version of Crystal 2020-07-26 10:59:31 -04:00
Omar Roth 1e4022680a
Fix playlists with one video 2020-07-26 10:59:31 -04:00
Omar Roth 8c65b8c16f
Update playlists to support polymer redesign 2020-06-24 22:19:36 -04:00
Omar Roth c1cbdae5ee
Make HOST_URL constant 2020-06-15 18:13:14 -05:00
Dmitry Sandalov 5d8de5fde2
Allow user to subscribe to playlist (#17) 2020-05-17 14:28:00 +03:00
Omar Roth 2ebfaf76f2
Refactor continuation token handling 2019-10-27 13:50:42 -04:00
Omar Roth 6930570fa2
Add HTTPClient pool 2019-10-25 12:58:16 -04:00
Omar Roth be055d9dcb
Add support for custom playlists 2019-10-15 21:17:14 -04:00
leonklingele 1aefc5b540 Update to Crystal 0.31.0, resolve compiler deprecation warnings, update dependencies (#764)
* shard: update to crystal 0.31.0

Additionally, no longer use the Crystal "markdown" library which has
been removed from the Crystal stdlib in version 0.31.0.
See https://github.com/crystal-lang/crystal/pull/8115.

Also fix some deprecation warnings using the following commands:

    find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.escape/URI\.encode_www_form/g' "{}" \;
    find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.unescape/URI\.decode_www_form/g' "{}" \;
    sed -i 's/while \%pull\.kind \!\= \:end_object/until \%pull\.kind\.end_object\?/g' src/invidious/helpers/patch_mapping.cr
2019-09-24 13:31:33 -04:00
Omar Roth 059f50dad4
Add 'playlistThumbnail' to playlist objects 2019-08-21 19:08:11 -05:00
Omar Roth f18d8229c0
Refactor continuation protocol buffers 2019-07-20 20:18:08 -05:00
Omar Roth b43e9ed7e7
Refactor 'description_html' 2019-06-08 15:08:27 -05:00
Omar Roth 12b2ab5da8
Add 'to_json' into respective structs 2019-06-08 13:31:41 -05:00
Omar Roth 2febc268f7
Fix warnings in Crystal 0.29 2019-06-07 21:13:50 -05:00
Omar Roth 8c944815bc
Minor refactor 2019-06-07 21:13:50 -05:00
Omar Roth 1a9360ca75
Minor formatting changes 2019-05-01 20:03:39 -05:00
Omar Roth 22b9bbe702
Add support for anonymous playlists 2019-05-01 08:03:58 -05:00
Allan Nordhøy aa10a9d899 Language fixes (#366)
* Language fixes
2019-04-19 11:14:11 -05:00
Omar Roth 80a567bf1e Fix video count in playlist extractor 2019-04-12 16:37:35 -05:00
Omar Roth bd4f5ebcdf Add option to configure default user preferences 2019-04-03 11:38:41 -05:00
Omar Roth 1b78001201 Use struct for allocations 2019-03-29 16:30:02 -05:00
Omar Roth a3b767bb13 Add live now indicator to playlists 2019-03-24 09:10:14 -05:00
Omar Roth 07ef48a07a Add length_seconds to playlist on watch page 2019-03-03 10:55:49 -06:00
Omar Roth 27663b10a2 Add minor API fixes 2019-02-15 17:28:54 -06:00
Omar Roth 7a9ef0d664 Add produce_channel_playlists_url 2019-02-09 10:15:14 -06:00
Omar Roth 276662a147 Use IO::Memory for creating continuation tokens 2019-02-04 15:17:10 -06:00
Omar Roth 4ae57cb475 Improve playlist description extractor 2019-01-04 22:48:00 -06:00
Omar Roth f3c9566687 Fix param ordering for fetch_playlist_videos 2018-12-24 17:47:23 -06:00
Omar Roth a160c645c9 Add support for translations 2018-12-20 15:32:09 -06:00
Omar Roth 7d47b5d4bd Use named params for SearchChannel 2018-12-15 13:02:53 -06:00
Omar Roth e8c9641548 Update info extractor 2018-11-10 10:50:09 -06:00
Omar Roth 4e33d3a0b9 Fix index out of bounds for playlist ucid 2018-11-05 09:00:39 -06:00
Omar Roth 4f856dd898 Add support for Crystal 0.27.0 2018-11-04 09:37:12 -06:00
Omar Roth c87aa8671c Add fix for continuation on playlists smaller than 100 videos 2018-10-10 19:47:51 -05:00
Omar Roth 88430a6fc0 Add playlist playback support 2018-10-07 21:11:33 -05:00
Omar Roth 20130db556 Add mixes 2018-09-29 10:59:11 -05:00
Omar Roth 25ba5bda62 Fix encoding of playlist index 2018-09-28 09:54:01 -05:00
Omar Roth 5b5d69a33b Add host language to YouTube requests 2018-09-25 17:55:32 -05:00
Omar Roth 21a8df42dd Add fix for short playlist descriptions 2018-09-25 10:28:57 -05:00
Omar Roth 74b285d0f7 Add author thumbnails to playlist endpoint 2018-09-25 10:28:40 -05:00
Omar Roth a5e8f87a26 Add error for non-existent playlists 2018-09-23 12:32:32 -05:00
Omar Roth 1d9c6f63e1 Add better error for invalid playlists 2018-09-23 12:26:12 -05:00
Omar Roth 35ac887133 Add fix for playlists with less than 100 videos 2018-09-22 14:13:10 -05:00
Omar Roth 64cc0362fb Add fix for playlists with no views 2018-09-17 19:21:13 -05:00
Omar Roth 296771809a Refactor protocol buffers 2018-09-17 16:56:28 -05:00
Omar Roth 62ae836565 Remove 'less' button in playlist descriptions 2018-09-13 21:00:39 -05:00