FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

[Feature Request]: bulk import text URLs

Open exekutive opened this issue 10 months ago • 1 comments

Guidelines

Problem Description

Unable to import generic lists of youtube video URLs

Proposed Solution

implement the importing of lists of youtube URLs in plain text (either as a text file with one URL per line, or paste from the clipboard), and create a playlist with those videos.

Alternatives Considered

as a bonus, Firefox bookmark export HTML files too.

Issue Labels

new feature

Additional Information

No response

exekutive avatar Feb 19 '25 07:02 exekutive

I had this same need a while back. I actually wrote a python script for this exact purpose.

https://github.com/NoSpiner/Freetube-import

NoSpiner avatar Feb 22 '25 15:02 NoSpiner

This has the same problems as the YouTube playlist import but worse. Closing as this has been identified as a feature that wont be possible to implement due to technical limitations

This has the same problems as the YouTube playlist import but worse. Closing as this has been identified as a feature that wont be possible to implement due to technical limitations

Could you please explain what that limitation is and how it relates, or provide a link if it's already discussed somewhere?

exekutive avatar Feb 26 '25 17:02 exekutive

What information does Freetube use to generate a playlist? I was thinking of implementing this by simply having a regex match all video IDs from a list of URLs and using those IDs to create a playlist.

ozrendev avatar Feb 28 '25 23:02 ozrendev

@ozrendev Freetube has a playlist import/export function. If you export playlists, you get a db file with what looks like JSON content.

You have a playlist wrapper with some basic metadata and inside a list of videos.

A single video line item looks like this:

{"videoId":"<youtube 11-char video ID>","title":"<the video title>","author":"<the youtube channel name>","authorId":"<youtube 24-char channel ID>","lengthSeconds":<length in seconds>,"published":<publish date>,"timeAdded":<added date>,"playlistItemId":"<36-char ID. probably generated by freetube>","type":"video"}

Really, the only thing freetube should need to play a video is the video ID, so I don't understand what the problem is, but I'm digging through the issue history. It's useful to fetch the video title as well, so you would need an API for that , which could slow down the process, but I don't care about anything else. For all I care, it could show a black rectangle for the thumbnail, and we already know Freetube can list videos without the duration.

exekutive avatar Mar 05 '25 23:03 exekutive

Related issues:

  • [Feature Request]: import non FT playlist(s) https://github.com/PikachuEXE/FreeTube/issues/50
  • [Feature Request]: Import Playlists from YouTube https://github.com/FreeTubeApp/FreeTube/issues/5057
  • API calls https://github.com/FreeTubeApp/FreeTube/pull/5498#issuecomment-2301192369
  • [Feature Request]: Importing/Exporting only 1 playlist. https://github.com/FreeTubeApp/FreeTube/issues/5366
  • [Bug]: Import Playlists does not work (closed for unknown reason) https://github.com/FreeTubeApp/FreeTube/issues/4143
  • Description of FT nedb export format https://github.com/FreeTubeApp/FreeTube/issues/4567#issuecomment-1896341546
  • Description of FT JSON fields https://github.com/FreeTubeApp/FreeTube/issues/4567#issuecomment-1902582700

exekutive avatar Mar 06 '25 00:03 exekutive