Skip to content

Trim video titles with the local API to avoid breaking the databases#8354

Merged
FreeTubeBot merged 1 commit into
FreeTubeApp:developmentfrom
absidue:trim-video-titles
Mar 9, 2026
Merged

Trim video titles with the local API to avoid breaking the databases#8354
FreeTubeBot merged 1 commit into
FreeTubeApp:developmentfrom
absidue:trim-video-titles

Conversation

@absidue

@absidue absidue commented Nov 26, 2025

Copy link
Copy Markdown
Member

Pull Request Type

  • Bugfix

Related issue

Description

Testing shows that this fixes the reported issue. We still don't know why newlines are causing issues, theoretically they should inside JSON strings and escaped.

Testing

Test that adding videos with newlines in the title to a playlist or the watch history and that things work correctly after restarting FreeTube.

Desktop

  • OS: Windows
  • OS Version: 11

@ChunkyProgrammer

Copy link
Copy Markdown
Member

Would this issue not apply to any other properties or does it only happen to video titles?

@efb4f5ff-1298-471a-8973-3d47447115dc

Copy link
Copy Markdown
Member

Happens in these cases too #8130 (comment)

@github-actions

This comment has been minimized.

@efb4f5ff-1298-471a-8973-3d47447115dc

This comment has been minimized.

@efb4f5ff-1298-471a-8973-3d47447115dc

efb4f5ff-1298-471a-8973-3d47447115dc commented Mar 6, 2026

Copy link
Copy Markdown
Member

Would this issue not apply to any other properties or does it only happen to video titles?

@ChunkyProgrammer Not sure tbh but this PR does solve the following cases so i think we can merge this

Case A:

  1. Add https://youtu.be/SudIwokEQKk to a playlist
  2. Close FT
  3. Open FT
  4. Go to Playlists page
  5. See that its gone

Case B:

  1. Mark as watched
  2. Verify its there in History page
  3. Close FT
  4. Open FT
  5. Go to History page
  6. Its gone

@efb4f5ff-1298-471a-8973-3d47447115dc

Copy link
Copy Markdown
Member

@ChunkyProgrammer sorry didnt ask the question properly. Are you ok with merging this PR in its current state?

@ChunkyProgrammer

Copy link
Copy Markdown
Member

@efb4f5ff-1298-471a-8973-3d47447115dc If it weren't in draft and absidue is ready for it to be merged then sure 🙂

@absidue absidue marked this pull request as ready for review March 8, 2026 08:35
@github-actions github-actions Bot removed the PR: WIP label Mar 8, 2026
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) March 8, 2026 08:35
@github-actions github-actions Bot added PR: waiting for review For PRs that are complete, tested, and ready for review PR: WIP labels Mar 8, 2026
@absidue absidue removed the PR: WIP label Mar 8, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with these cases

#8354 (comment)

@PikachuEXE PikachuEXE left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

@FreeTubeBot FreeTubeBot merged commit 4c644ad into FreeTubeApp:development Mar 9, 2026
10 checks passed
@github-actions github-actions Bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Mar 9, 2026
@absidue absidue deleted the trim-video-titles branch March 9, 2026 06:18
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Mar 12, 2026
* test/yt/pr-1148:
  test
  Serialize the error as a string to pass it back to the main view
  Workaround for electron/electron#49253 (FreeTubeApp#8714)
  Translated using Weblate (Icelandic)
  Translated using Weblate (Japanese)
  Trim video titles with the local API to avoid breaking the databases (FreeTubeApp#8354)
  Translated using Weblate (Tamil)
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Mar 16, 2026
* development: (106 commits)
  Translated using Weblate (Portuguese)
  Bump electron from 40.8.0 to 41.0.2 (FreeTubeApp#8801)
  Translated using Weblate (German)
  Translated using Weblate (Lithuanian)
  Bump lefthook from 2.1.3 to 2.1.4 (FreeTubeApp#8799)
  Bump babel-loader from 10.1.0 to 10.1.1 in the babel group (FreeTubeApp#8794)
  Bump the webpack group with 2 updates (FreeTubeApp#8797)
  Bump the fortawesome group with 5 updates (FreeTubeApp#8796)
  Bump the eslint group with 3 updates (FreeTubeApp#8795)
  Bump vue from 3.5.29 to 3.5.30 (FreeTubeApp#8800)
  Translated using Weblate (Japanese)
  Serialize the error as a string to pass it back to the main view (FreeTubeApp#8789)
  Bump tar from 7.5.10 to 7.5.11 (FreeTubeApp#8788)
  Workaround for electron/electron#49253 (FreeTubeApp#8714)
  Translated using Weblate (Icelandic)
  Translated using Weblate (Japanese)
  Trim video titles with the local API to avoid breaking the databases (FreeTubeApp#8354)
  Translated using Weblate (Tamil)
  enhance issue templates (FreeTubeApp#8770)
  Bump vue-i18n from 11.2.8 to 11.3.0 (FreeTubeApp#8769)
  ...
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Mar 17, 2026
* development: (21 commits)
  Bump webpack-cli from 6.0.1 to 7.0.1 in the webpack group (FreeTubeApp#8816)
  Bump @double-great/stylelint-a11y in the stylelint group (FreeTubeApp#8815)
  Bump youtubei.js from 16.0.1 to 17.0.1 (FreeTubeApp#8818)
  Translated using Weblate (Portuguese)
  Bump electron from 40.8.0 to 41.0.2 (FreeTubeApp#8801)
  Translated using Weblate (German)
  Translated using Weblate (Lithuanian)
  Bump lefthook from 2.1.3 to 2.1.4 (FreeTubeApp#8799)
  Bump babel-loader from 10.1.0 to 10.1.1 in the babel group (FreeTubeApp#8794)
  Bump the webpack group with 2 updates (FreeTubeApp#8797)
  Bump the fortawesome group with 5 updates (FreeTubeApp#8796)
  Bump the eslint group with 3 updates (FreeTubeApp#8795)
  Bump vue from 3.5.29 to 3.5.30 (FreeTubeApp#8800)
  Translated using Weblate (Japanese)
  Serialize the error as a string to pass it back to the main view (FreeTubeApp#8789)
  Bump tar from 7.5.10 to 7.5.11 (FreeTubeApp#8788)
  Workaround for electron/electron#49253 (FreeTubeApp#8714)
  Translated using Weblate (Icelandic)
  Translated using Weblate (Japanese)
  Trim video titles with the local API to avoid breaking the databases (FreeTubeApp#8354)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Line separator character causes databases to fail

5 participants