1 <div *
ngIf=
"!hasImportedVideo" class=
"upload-video-container">
2 <div class=
"first-step-block">
3 <my-global-icon class=
"upload-icon" iconName=
"upload"></my-global-icon>
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" i18n
>Or
</div>
13 <div class=
"form-group form-group-magnet-uri">
14 <label i18n
for=
"magnetUri">Paste magnet URI
</label>
16 <ng-template ptTemplate=
"customHtml">
18 You can import any torrent file that points to a mp4 file.
19 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.
24 <input type=
"text" id=
"magnetUri" [(ngModel)]=
"magnetUri" />
27 <div class=
"form-group">
28 <label i18n
for=
"first-step-channel">Channel
</label>
29 <div class=
"peertube-select-container">
30 <select id=
"first-step-channel" [(ngModel)]=
"firstStepChannelId">
31 <option *
ngFor=
"let channel of userVideoChannels" [value]=
"channel.id">{{ channel.label }}
</option>
36 <div class=
"form-group">
37 <label i18n
for=
"first-step-privacy">Privacy
</label>
38 <div class=
"peertube-select-container">
39 <select id=
"first-step-privacy" [(ngModel)]=
"firstStepPrivacyId">
40 <option *
ngFor=
"let privacy of videoPrivacies" [value]=
"privacy.id">{{ privacy.label }}
</option>
46 type=
"button" i18n-value
value=
"Import"
47 [disabled]=
"!isMagnetUrlValid() || isImportingVideo" (click)=
"importVideo()"
52 <div *
ngIf=
"error" class=
"alert alert-danger">
53 <div i18n
>Sorry, but something went wrong
</div>
57 <div *
ngIf=
"hasImportedVideo && !error" class=
"alert alert-info" i18n
>
58 Congratulations, the video will be imported with BitTorrent! You can already add information about this video.
61 <!-- Hidden because we want to load the component -->
62 <form [hidden]=
"!hasImportedVideo" novalidate [formGroup]=
"form">
64 [form]=
"form" [formErrors]=
"formErrors" [videoCaptions]=
"videoCaptions" [schedulePublicationPossible]=
"false"
65 [validationMessages]=
"validationMessages" [userVideoChannels]=
"userVideoChannels"
68 <div class=
"submit-container">
69 <div class=
"submit-button"
70 (click)=
"updateSecondStep()"
71 [ngClass]=
"{ disabled: !form.valid || isUpdatingVideo === true }"
73 <my-global-icon iconName=
"validate"></my-global-icon>
74 <input type=
"button" i18n-value
value=
"Update" />