Initial commit

This commit is contained in:
Senad Uka
2020-05-31 22:38:19 +02:00
commit 858fafc3c5
1280 changed files with 65918 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
class VideoPresenter
def initialize(video)
@video = video
end
def edl_file_path
return "" unless video.edl_file.attached?
ApplicationController._routes.url_helpers.rails_blob_path(video.edl_file, only_path: true, disposition: 'inline')
end
def graphics_only_edl_file_path
return "" unless video.graphics_only_edl_file.attached?
ApplicationController._routes.url_helpers.rails_blob_path(video.graphics_only_edl_file, only_path: true, disposition: 'inline')
end
def audio_only_edl_file_path
return "" unless video.audio_only_edl_file.attached?
ApplicationController._routes.url_helpers.rails_blob_path(video.audio_only_edl_file, only_path: true, disposition: 'inline')
end
def edl_download_disabled?
!video.edl_file.attached?
end
def graphics_edl_download_disabled?
!video.graphics_only_edl_file.attached?
end
def audio_edl_download_disabled?
!video.audio_only_edl_file.attached?
end
private
attr_reader :video
end