-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reworked the GUI & A Auto Start for movies
- Loading branch information
Showing
63 changed files
with
790 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.movie-facts { | ||
color: $light-gray | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<div class="cast"> | ||
<% cast.each do |cast| %> | ||
<div class="cast-member"> | ||
<%= imdb_image_tag cast[:profile_path], width: 150, klass: 'img-poster' %> | ||
<div> | ||
<h6 class="cast-name"><%= cast[:name] %></h6> | ||
<p class="cast-character "><%= cast[:character] %></p> | ||
</div> | ||
</div> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# frozen_string_literal: true | ||
|
||
class CastComponent < ViewComponent::Base | ||
include ImdbHelper | ||
Member = Types::Hash.schema( | ||
character: Types::String, | ||
name: Types::String, | ||
profile_path: Types::String.optional | ||
).with_key_transform(&:to_sym) | ||
Cast = Types::Coercible::Array.of(Member) | ||
|
||
extend Dry::Initializer | ||
option :video, Types.Instance(::Video) | ||
|
||
strip_trailing_whitespace | ||
|
||
def cast | ||
return [] if video.credits.nil? | ||
|
||
@cast ||= Cast[video.credits['cast']] | ||
end | ||
|
||
def render? | ||
cast.any? | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,29 @@ | ||
<%= render ProcessComponent.new dom_id: dom_id do |c| %> | ||
<%= c.with_title do %> | ||
Disk Status | ||
<% end %> | ||
<%= c.with_body do %> | ||
<% if job_active? && disks_loading.any? %> | ||
<% disks_loading.each do |disk| %> | ||
<p class="mb-1"> | ||
Loading <%= link_to disk.name, the_movie_dbs_path(search: { query: disk.name.titleize }) %> ... <%= link_to 'View Details', job_path(job) %> | ||
</p> | ||
<p><%= Array.wrap(job.metadata['message']).last %></p> | ||
<% end %> | ||
<% elsif disks_not_ejected.any? %> | ||
<% disks_not_ejected.each do |disk| %> | ||
<p class="mb-0"> | ||
<%= link_to disk.name, the_movie_dbs_path(search: { query: disk.name.titleize }) %> is ready to be ripped. <%= link_to 'eject', eject_disk_path(disk), data: { turbo_method: :post } %> | ||
</p> | ||
<% if hidden? %> | ||
<div id="<%= dom_id %>" class="hidden"></div> | ||
<% else %> | ||
<%= render ProcessComponent.new dom_id: dom_id do |c| %> | ||
<%= c.with_title do %> | ||
Disk Status | ||
<% end %> | ||
<%= c.with_body do %> | ||
<% if job_active? && disks_loading.any? %> | ||
<% disks_loading.each do |disk| %> | ||
<p class="mb-1"> | ||
Loading <%= link_to disk.name, the_movie_dbs_path(search: { query: disk.name.titleize }) %> ... <%= link_to 'View Details', job_path(job) %> | ||
</p> | ||
<p><%= Array.wrap(job.metadata['message']).last %></p> | ||
<% end %> | ||
<% elsif disks_not_ejected.any? %> | ||
<% disks_not_ejected.each do |disk| %> | ||
<p class="mb-0"> | ||
<%= link_to disk.name, the_movie_dbs_path(search: { query: disk.name.titleize }) %> is ready to be ripped. <%= link_to 'eject', eject_disk_path(disk), data: { turbo_method: :post } %> | ||
</p> | ||
<% end %> | ||
<% elsif job_active? %> | ||
<p class="mb-1">Loading disk info ...<%= link_to 'View Details', job_path(job) %></p> | ||
<% else %> | ||
<span>No disks found - insert disk to continue</span> | ||
<% end %> | ||
<% elsif job_active? %> | ||
<p class="mb-1">Loading disk info ...<%= link_to 'View Details', job_path(job) %></p> | ||
<% else %> | ||
<span>No disks found - insert disk to continue</span> | ||
<% end %> | ||
<% end %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.