1 <div *
ngIf=
"!hasImportedVideo" class=
"upload-video-container" myDragDrop (fileDropped)=
"setTorrentFile($event)">
2 <div class=
"first-step-block">
3 <my-global-icon class=
"upload-icon" iconName=
"upload" aria-hidden=
"true"></my-global-icon>
5 <div class=
"button-file form-control" [ngbTooltip]=
"'(extensions: .torrent)'">
6 <span i18n
>Select the torrent to import
</span>
8 aria-label=
"Select the torrent to import" i18n-aria-label
9 #torrentfileInput
type=
"file" name=
"torrentfile" id=
"torrentfile" accept=
".torrent" (change)=
"fileChange()"
13 <div class=
"torrent-or-magnet" i18n-data-content
data-content=
"OR"></div>
15 <div class=
"form-group form-group-magnet-uri">
16 <label i18n
for=
"magnetUri">Paste magnet URI
</label>
18 <ng-template ptTemplate=
"customHtml">
20 You can import any torrent file that points to a media file.
21 You should make sure you have diffusion rights over the content it points to, otherwise it could cause legal trouble to yourself and your instance.
26 <input type=
"text" id=
"magnetUri" [(ngModel)]=
"magnetUri" class=
"form-control" />
29 <div class=
"form-group">
30 <label i18n
for=
"first-step-channel">Channel
</label>
32 labelForId=
"first-step-channel" [items]=
"userVideoChannels" [(ngModel)]=
"firstStepChannelId"
36 <div class=
"form-group">
37 <label i18n
for=
"first-step-privacy">Privacy
</label>
39 labelForId=
"first-step-privacy" [items]=
"videoPrivacies" [(ngModel)]=
"firstStepPrivacyId"
44 type=
"button" i18n-value
value=
"Import"
45 [disabled]=
"!isMagnetUrlValid() || isImportingVideo" (click)=
"importVideo()"
50 <div *
ngIf=
"error" class=
"alert alert-danger">
51 <div i18n
>Sorry, but something went wrong
</div>
55 <div *
ngIf=
"hasImportedVideo && !error" class=
"alert pt-alert-primary" i18n
>
56 Congratulations, the video will be imported with BitTorrent! You can already add information about this video.
59 <!-- Hidden because we want to load the component -->
60 <form [hidden]=
"!hasImportedVideo" novalidate [formGroup]=
"form">
62 [form]=
"form" [formErrors]=
"formErrors" [videoCaptions]=
"videoCaptions" [forbidScheduledPublication]=
"true"
63 [validationMessages]=
"validationMessages" [userVideoChannels]=
"userVideoChannels"
67 <div class=
"submit-container">
68 <my-button className=
"orange-button" i18n-label
label=
"Update" icon=
"circle-tick"
69 (click)=
"updateSecondStep()"
70 [disabled]=
"!form.valid || isUpdatingVideo === true"