1 <div *
ngIf=
"!hasImportedVideo" class=
"upload-video-container">
2 <div class=
"import-video-torrent">
3 <div class=
"icon icon-upload"></div>
5 <div class=
"button-file">
6 <span i18n
>Select the torrent to import
</span>
7 <input #torrentfileInput
type=
"file" name=
"torrentfile" id=
"torrentfile" accept=
".torrent" (change)=
"fileChange()" />
9 <span class=
"button-file-extension">(.torrent)
</span>
11 <div class=
"torrent-or-magnet">Or
</div>
13 <div class=
"form-group form-group-magnet-uri">
14 <label i18n
for=
"magnetUri">Paste magnet URI
</label>
16 helpType=
"custom" i18n-customHtml
17 customHtml=
"You can import any torrent file that points to a mp4 file. 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."
20 <input type=
"text" id=
"magnetUri" [(ngModel)]=
"magnetUri" />
23 <div class=
"form-group">
24 <label i18n
for=
"first-step-channel">Channel
</label>
25 <div class=
"peertube-select-container">
26 <select id=
"first-step-channel" [(ngModel)]=
"firstStepChannelId">
27 <option *
ngFor=
"let channel of userVideoChannels" [value]=
"channel.id">{{ channel.label }}
</option>
32 <div class=
"form-group">
33 <label i18n
for=
"first-step-privacy">Privacy
</label>
34 <div class=
"peertube-select-container">
35 <select id=
"first-step-privacy" [(ngModel)]=
"firstStepPrivacyId">
36 <option *
ngFor=
"let privacy of videoPrivacies" [value]=
"privacy.id">{{ privacy.label }}
</option>
42 type=
"button" i18n-value
value=
"Import"
43 [disabled]=
"!isMagnetUrlValid() || isImportingVideo" (click)=
"importVideo()"
48 <div *
ngIf=
"hasImportedVideo" class=
"alert alert-info" i18n
>
49 Congratulations, the video will be imported with BitTorrent! You can already add information about this video.
52 <!-- Hidden because we want to load the component -->
53 <form [hidden]=
"!hasImportedVideo" novalidate [formGroup]=
"form">
55 [form]=
"form" [formErrors]=
"formErrors" [videoCaptions]=
"videoCaptions" [schedulePublicationPossible]=
"false"
56 [validationMessages]=
"validationMessages" [videoPrivacies]=
"videoPrivacies" [userVideoChannels]=
"userVideoChannels"
59 <div class=
"submit-container">
60 <div class=
"submit-button"
61 (click)=
"updateSecondStep()"
62 [ngClass]=
"{ disabled: !form.valid || isUpdatingVideo === true }"
64 <span class=
"icon icon-validate"></span>
65 <input type=
"button" i18n-value
value=
"Update" />