Fix 'invalid byte sequence' error when subscribing to playlists ([] accessor with range)

This commit is contained in:
Dmitry Sandalov 2024-08-29 22:47:59 +02:00
parent 157c4c3e98
commit bd34659ff6
No known key found for this signature in database
GPG Key ID: 718627D28520CA65

View File

@ -270,7 +270,7 @@ end
def subscribe_playlist(user, playlist)
playlist = InvidiousPlaylist.new({
title: playlist.title.chars[0, 150].join,
title: playlist.title[..150],
id: playlist.id,
author: user.email,
description: "", # Max 5000 characters