Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address disk title no longer double up if provide #494

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion app/controllers/seasons_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,18 @@ def tv
end

def rip_disk_titles
@rip_disk_titles ||= episode_params.map do |episode_param|
disk_title_ids = []
@rip_disk_titles ||= episode_params.filter_map do |episode_param|
episode = season.episodes.find { _1.id == episode_param[:episode_id].to_i }
disk_title = disk.disk_titles.find { _1.id == episode_param[:disk_title_id].to_i }
if disk_title.episode
disk_title.update!(video: tv, episode_last: episode)
else
disk_title.update!(video: tv, episode:)
end
next if disk_title_ids.include?(disk_title.id)

disk_title_ids.append(disk_title.id)
RipWorker::DiskTitleHash[{
id: disk_title.id,
part: episode_param[:part].presence&.to_i
Expand Down
2 changes: 1 addition & 1 deletion current_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v5.9.0
v5.10.0
Loading