-
Notifications
You must be signed in to change notification settings - Fork 6
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
Allow use of remote video media #48
Conversation
@wgilling thanks for finding this. I will test and merge this evening. |
@@ -71,8 +71,13 @@ public function getFileUuid($mid) { | |||
public function getFedoraUrl($mid) { | |||
$media = Media::load($mid); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason we can't put the following check here, right after loading the media?
if ($media->bundle() == 'remote_video') {
return False
}
It's a bit simpler to read, and returns before executing the next two lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do -- very soon I will refactor this method to handle the issue I was seeing.
1b00b47
to
93d6727
Compare
@wgilling I just merged in the issue-46 branch into main which has now caused merge conflicts with this PR. Do you mind pulling in the updates to main and resolving the conflicts? If so I can do it and you can continue from there. Let me know. |
too much changed -- made a new branch |
OK, thanks. Sorry about that. |
NO WORRIES. My bad -- I didn't realize that it wasn't based off of latest |
This addresses the issue: #47
This issue only happens when the media type of "remote_video" is being used. In order to set this up, as admin navigate to "Add media type": http://localhost:8000/admin/structure/media/add -- NOTE: this media type will also need to have the two fields as are configured for all other islandora media types - these are "media_use" (a taxonomy entity reference) and "media_of" (entity reference).
The error was occurring when the riprap code attempted to call getSourceFile on an items' media when that item uses remote_video media type since there is not "file" underlying a remote_video media.
To reproduce the error,
To test the patched code: