Skip to content

Commit

Permalink
Update VideoBlob Scopes and CreateMkvService Logic for Enhanced Video…
Browse files Browse the repository at this point in the history
… Management (#420)
  • Loading branch information
brand-it authored Aug 1, 2024
1 parent f5609fb commit 6eaa80f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/video_blob.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def episode
scope :optimized, -> { where(optimized: true) }
scope :uploadable, -> { where(uploadable: true) }
scope :uploaded, -> { where(uploadable: false).where.not(uploaded_on: nil) }
scope :uploaded_recently, -> { where(arel_table[:uploaded_on].gteq(1.minute.ago)) }
scope :uploaded_recently, -> { where(arel_table[:uploaded_on].gteq(10.minutes.ago)) }

delegate :title, :year, :episode, :season, to: :parsed, allow_nil: true, prefix: true
delegate :plex_name, to: :video, prefix: true, allow_nil: true
Expand Down
2 changes: 1 addition & 1 deletion spec/models/video_blob_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
it { is_expected.to have_scope(:uploadable).where(uploadable: true) }

it {
expect(subject).to have_scope(:uploaded_recently).where(described_class.arel_table[:uploaded_on].gteq(1.minute.ago))
expect(subject).to have_scope(:uploaded_recently).where(described_class.arel_table[:uploaded_on].gteq(10.minutes.ago))
}
end

Expand Down

0 comments on commit 6eaa80f

Please sign in to comment.