Upstream sync
This commit is contained in:
@@ -60,7 +60,7 @@ class BroadcastsController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def broadcast_params
|
def broadcast_params
|
||||||
params.require(:broadcast).permit(:name, files: [])
|
params.require(:broadcast).permit(:name, :shoot_location_time_zone, files: [])
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_project
|
def set_project
|
||||||
|
|||||||
@@ -14,6 +14,6 @@ class BroadcastRecording < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def download_file_name
|
def download_file_name
|
||||||
"#{broadcast_name}_Date_#{created_at.strftime("%Y-%m-%d")}_Time_#{created_at.strftime("%T")}".parameterize
|
"#{broadcast_name}_Date_#{created_at.in_time_zone(broadcast.shoot_location_time_zone).strftime("%Y-%m-%d")}_Time_#{created_at.in_time_zone(broadcast.shoot_location_time_zone).strftime("%T")}".parameterize
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ class TalentRelease < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def uses_edl?
|
def uses_edl?
|
||||||
false
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
def second_guardian_present?
|
def second_guardian_present?
|
||||||
|
|||||||
@@ -3,6 +3,9 @@
|
|||||||
<td>
|
<td>
|
||||||
<%= broadcast.name %>
|
<%= broadcast.name %>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<%= broadcast.shoot_location_time_zone %>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<%= broadcast.status.titleize %>
|
<%= broadcast.status.titleize %>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
<%= bootstrap_form_with model: model, local: true do |form| %>
|
<%= bootstrap_form_with model: model, local: true do |form| %>
|
||||||
<%= form.text_field :name %>
|
<%= form.text_field :name %>
|
||||||
|
<%= form.time_zone_select(:shoot_location_time_zone, nil, label: "Time zone of shoot location") %>
|
||||||
|
|
||||||
<div class="row align-items-center text-center mt-4">
|
<div class="row align-items-center text-center mt-4">
|
||||||
<%= link_to t("shared.cancel"), [project, :broadcasts], class: "col-3 text-reset" %>
|
<%= link_to t("shared.cancel"), [project, :broadcasts], class: "col-3 text-reset" %>
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th><%= t(".table_headers.broadcast_name") %></th>
|
<th><%= t(".table_headers.broadcast_name") %></th>
|
||||||
|
<th><%= t(".table_headers.broadcast_time_zone") %></th>
|
||||||
<th><%= t(".table_headers.broadcast_status") %></th>
|
<th><%= t(".table_headers.broadcast_status") %></th>
|
||||||
<th><%= t(".table_headers.broadcast_created_at") %></th>
|
<th><%= t(".table_headers.broadcast_created_at") %></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
@@ -32,7 +33,7 @@
|
|||||||
<%= render @broadcasts %>
|
<%= render @broadcasts %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="5" class="py-4 text-center text-muted"><%= t(".empty") %></td>
|
<td colspan="6" class="py-4 text-center text-muted"><%= t(".empty") %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -222,6 +222,7 @@ en:
|
|||||||
broadcast_created_at: Created Date
|
broadcast_created_at: Created Date
|
||||||
broadcast_name: Name
|
broadcast_name: Name
|
||||||
broadcast_status: Status
|
broadcast_status: Status
|
||||||
|
broadcast_time_zone: Time Zone of Shoot Location
|
||||||
new:
|
new:
|
||||||
heading:
|
heading:
|
||||||
Create Live Stream
|
Create Live Stream
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
class AddShootLocationTimeZoneToBroadcasts < ActiveRecord::Migration[6.0]
|
||||||
|
def change
|
||||||
|
add_column :broadcasts, :shoot_location_time_zone, :string, default: "UTC"
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -553,7 +553,8 @@ CREATE TABLE public.broadcasts (
|
|||||||
stream_key character varying,
|
stream_key character varying,
|
||||||
stream_playback_uid character varying,
|
stream_playback_uid character varying,
|
||||||
token character varying,
|
token character varying,
|
||||||
streamer_status integer DEFAULT 0
|
streamer_status integer DEFAULT 0,
|
||||||
|
shoot_location_time_zone character varying DEFAULT 'UTC'::character varying
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@@ -3952,6 +3953,7 @@ INSERT INTO "schema_migrations" (version) VALUES
|
|||||||
('20200716083706'),
|
('20200716083706'),
|
||||||
('20200716094927'),
|
('20200716094927'),
|
||||||
('20200716103525'),
|
('20200716103525'),
|
||||||
('20200716105723');
|
('20200716105723'),
|
||||||
|
('20200720051634');
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
11246
package-lock.json
generated
11246
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -24,10 +24,12 @@ feature 'User managing broadcasts' do
|
|||||||
|
|
||||||
by 'filling out the form' do
|
by 'filling out the form' do
|
||||||
fill_in broadcast_name_field, with: 'My Broadcast'
|
fill_in broadcast_name_field, with: 'My Broadcast'
|
||||||
|
select_time_zone("New Delhi")
|
||||||
end
|
end
|
||||||
|
|
||||||
click_button 'Create Live Stream'
|
click_button 'Create Live Stream'
|
||||||
expect(page).to have_content('A live stream has been created')
|
expect(page).to have_content('A live stream has been created')
|
||||||
|
expect(page).to have_content('New Delhi')
|
||||||
click_on 'Manage'
|
click_on 'Manage'
|
||||||
expect(page).to have_link('Copy Stream URL', exact: true)
|
expect(page).to have_link('Copy Stream URL', exact: true)
|
||||||
expect(page).to have_link('Copy Stream Key', exact: true)
|
expect(page).to have_link('Copy Stream Key', exact: true)
|
||||||
@@ -220,6 +222,12 @@ feature 'User managing broadcasts' do
|
|||||||
def broadcast_name_field
|
def broadcast_name_field
|
||||||
'broadcast[name]'
|
'broadcast[name]'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def select_time_zone(value)
|
||||||
|
if value.present?
|
||||||
|
select value, from: "broadcast[shoot_location_time_zone]"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def click_checkboxes
|
def click_checkboxes
|
||||||
all('input[type="checkbox"]')[0].click
|
all('input[type="checkbox"]')[0].click
|
||||||
|
|||||||
@@ -292,7 +292,7 @@ feature "User performs video analysis" do
|
|||||||
expect(page).to have_unreleased_appearance(notes: unreleased_appearance.notes)
|
expect(page).to have_unreleased_appearance(notes: unreleased_appearance.notes)
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "confirming a talent release" do
|
scenario "confirming a talent release", js: true do
|
||||||
talent_release = create(:talent_release, project: project)
|
talent_release = create(:talent_release, project: project)
|
||||||
|
|
||||||
sign_in current_user
|
sign_in current_user
|
||||||
@@ -300,7 +300,7 @@ feature "User performs video analysis" do
|
|||||||
|
|
||||||
expect(page).to have_unconfirmed_release(talent_release)
|
expect(page).to have_unconfirmed_release(talent_release)
|
||||||
|
|
||||||
confirm_release(video, talent_release)
|
confirm_first_release_using_edl_modal(video, talent_release)
|
||||||
|
|
||||||
expect(page).to have_confirmed_release(talent_release)
|
expect(page).to have_confirmed_release(talent_release)
|
||||||
expect(page).not_to have_unconfirmed_release(talent_release)
|
expect(page).not_to have_unconfirmed_release(talent_release)
|
||||||
@@ -442,7 +442,7 @@ feature "User performs video analysis" do
|
|||||||
|
|
||||||
scenario "confirming a talent release match", js: true do
|
scenario "confirming a talent release match", js: true do
|
||||||
video.analysis_success!
|
video.analysis_success!
|
||||||
talent_release = create(:talent_release, project: project)
|
talent_release = create(:talent_release, project: project, person_name: "Jane Doe")
|
||||||
allow(BrayniacAI::FacialRecognition).to receive(:find).and_return(
|
allow(BrayniacAI::FacialRecognition).to receive(:find).and_return(
|
||||||
BrayniacAI::FacialRecognition.new({
|
BrayniacAI::FacialRecognition.new({
|
||||||
bucket_name: "",
|
bucket_name: "",
|
||||||
@@ -469,7 +469,7 @@ feature "User performs video analysis" do
|
|||||||
expect(page).not_to have_css(".fa-check-circle")
|
expect(page).not_to have_css(".fa-check-circle")
|
||||||
end
|
end
|
||||||
|
|
||||||
confirm_suggested_talent_match(video, talent_release)
|
confirm_suggested_match(video, talent_release)
|
||||||
|
|
||||||
within "#suggested_matches" do
|
within "#suggested_matches" do
|
||||||
expect(page).to have_css(".fa-check-circle")
|
expect(page).to have_css(".fa-check-circle")
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ RSpec.describe TalentRelease do
|
|||||||
end
|
end
|
||||||
|
|
||||||
describe "#uses_edl?" do
|
describe "#uses_edl?" do
|
||||||
it { is_expected.not_to be_uses_edl }
|
it { is_expected.to be_uses_edl }
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "#contract_file_name" do
|
describe "#contract_file_name" do
|
||||||
|
|||||||
Reference in New Issue
Block a user