Describe the current behavior
Trying to use CLI to import a full channel from YouTube.
It's finding the channel, downloading all videos.
But, when trying to upload to PeerTube, it returns the current error:
Uploading on PeerTube video "".
.field(name, val) val can not be empty
From what I understand, it looks like the variable videoAttributes is empty.
Note that the script works properly when importing only one video.
Also, note that before downloading all videos, the script displays the following text:
info: Will download and upload 7 videos.
info: ############################################################
info: Downloading video "undefined"...
info: [youtube:tab] PLFePO0Dghdic0nEGhzJ4rEq8ZdbCZny43: Downloading webpage
[download] Downloading playlist: Revue de presse
[youtube:tab] playlist Revue de presse: Downloading 35 videos
[download] Downloading video 1 of 35
[youtube] S0OyeBOI_r0: Downloading webpage
[download] /home/optisseur/peertube-cli/dist/server/tools/be4f66e0bdcd97773ad6a76e2e23ab518c46412e79fa33ff20130018fdd1a7c1.mp4 has already been downloaded and merged
[download] Downloading video 2 of 35
...
Steps to reproduce:
peertube import -u "instance" -U "user" -p "pwd" --target-url "https://www.youtube.com/c/LeCanardR%C3%A9fractaire"Describe the expected behavior
I expect all videos to be properly uploaded. Also, I expect the script to don't reupload already uploaded videos.
Additional information
I tried with a different channel and everything is working fine.
I noticed the message [download] /home/optisseur/peertube-cli/dist/server/tools/be4f66e0bdcd97773ad6a76e2e23ab518c46412e79fa33ff20130018fdd1a7c1.mp4 has already been downloaded and merged when trying to import the bugged channel.
Any clue about where it comes from?
Edit: I tried a third and it's bugging too. I will try to find out why some work and others don't.
Okay. I found out where the bug comes from:
Any YouTube channel having playlists will have this issue.
Any YouTube channel without playlists works find.
The script seems to consider playslists as video. As an exemple, if you try to use --last 2 parameter, the script will still consider importing all videos from playlists and not only the last two videos uploaded.
I tried with those channels (those without playlists have been found randomly):
Those who does not work (and have playlist)
Those who work (and haven't any playlist)
Thanks for the issue, should be fixed by https://github.com/Chocobozzz/PeerTube/commit/5721fd8374e732c4dfa149c54a800db74591c245
Most helpful comment
Thanks for the issue, should be fixed by https://github.com/Chocobozzz/PeerTube/commit/5721fd8374e732c4dfa149c54a800db74591c245