-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Channel sync #5135
Channel sync #5135
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this wonderful work!
Just made a first "quick" review of the code. Will do other ones in the week!
client/src/app/+my-library/my-video-channels-sync/my-video-channels-sync.component.ts
Outdated
Show resolved
Hide resolved
...ibrary/my-video-channels-sync/video-channel-sync-edit/video-channel-sync-edit.component.html
Outdated
Show resolved
Hide resolved
...ibrary/my-video-channels-sync/video-channel-sync-edit/video-channel-sync-edit.component.html
Outdated
Show resolved
Hide resolved
...ibrary/my-video-channels-sync/video-channel-sync-edit/video-channel-sync-edit.component.html
Outdated
Show resolved
Hide resolved
...ibrary/my-video-channels-sync/video-channel-sync-edit/video-channel-sync-edit.component.html
Outdated
Show resolved
Hide resolved
f7ff148
to
4c5b1d8
Compare
client/src/app/+manage/video-channel-edit/video-channel-edit.component.html
Show resolved
Hide resolved
client/src/app/+manage/video-channel-edit/video-channel-edit.component.html
Show resolved
Hide resolved
1da6cb7
to
f384c5a
Compare
client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.html
Outdated
Show resolved
Hide resolved
7c4a47c
to
cbdbb67
Compare
client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.ts
Show resolved
Hide resolved
setDefaultSort, | ||
setDefaultPagination, | ||
asyncMiddleware(listAccountChannelsSync) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In another task: UI for managing other users synchronizations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue reported here #5181
client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.ts
Outdated
Show resolved
Hide resolved
client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.ts
Outdated
Show resolved
Hide resolved
client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.ts
Outdated
Show resolved
Hide resolved
client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.html
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took into account your remarks
}) | ||
} | ||
res.locals.videoChannelSync = sync | ||
res.locals.videoChannel = sync.VideoChannel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need this attribute for ensureCanManageChannel
which picks specifically res.locals.videoChannel
.
client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.html
Outdated
Show resolved
Hide resolved
6a4820a
to
022a2fc
Compare
import { synchronizeChannel } from '@server/lib/video-import-channel' | ||
|
||
export async function processVideoChannelImport (job: Job) { | ||
const payload = job.data as VideoChannelImportPayload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if there could not be some issues with video orders when:
- the user creates a synchronization, requesting a channel import
- the channel import runs while a sync is run
I wonder if we should no passe an optional syncId
in the payload to flag the synchronization as being processed, and skip any of sync in PROCESSING
.
What do you think @Chocobozzz?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll check how we can handle this case and update the code
Thanks, I'll rebase from develop and merge this PR |
🎉 🎉 🎉 🙏 :) |
I have imported a YouTube channel to my PeerTube instances a few weeks ago, when this feature wasn't available. Is there any way I can flag the existing videos as being "imported" already? e.g. by executing queries directly on the database? |
@emansom If these videos were imported through the Import with URL feature, you should have nothing to do, these videos should already be recognized as imported. |
They were imported using the |
I see. That being said, if you create a new sync without importing the existing videos, only videos newer than the creation date are eligible for importation. |
Which database table and which column determines the "is imported" state? Or is it another table with video ID references that I need to add entries into? |
I meant that you should have nothing to do, except creating a synchronization with the option "only watch for new publications". Only the videos uploaded on Youtube after the synchronizations will be imported. If you are still willing to play with the database, the table is named |
I just want to say a huge THANK YOU! Amazing. |
There's no option to import all prior ones? |
There is, manually. The way I did it was:
For previous videos that weren't imported within the UI itself, but rather using the CLI tool, the following steps are required:
Ofcourse this could be dealt with better in the form of a SQL migration script, I lack the knowledge on Postgres specific SQL to implement this. |
This could also be dealt better with just an interface click that automates it... but perhaps I should get used to how mirroring and syncing will always be complex tasks, if not impossible elsewhere... |
Description
Implement channel synchronization, but with some lacks detailed below.
Related issues
Fixed #754
Also it paves the way for the importation of channel videos from other platforms in the UI (like peertube-import-videos).
Has this been tested?
Screenshots
EDIT1 : Screencast of admin configuration
recording-optimized-2.mp4