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

Changed file_result comparison #625

Merged
merged 1 commit into from Jun 29, 2023
Merged

Conversation

aOelschlager
Copy link
Contributor

Link to Github issue or other discussion

Issue #252

What does this PR do?

This fixes the issue with remote video media.

What changes were made?

Two lines in the create media function where file_results get compared. It now does not change the remote video media url.

How to test / verify this PR?

To test you need a remote video file from Youtube or Vimeo. Use the add_media task and include the oembed_provders. The csv file only needs at minimum the node_id and file columns.

Sample Data:

node_id file
14 https://vimeo.com/video_id_number

Sample Configuration File:

task: add_media
host: "https://islandora.traefik.me"
username:
password:
input_dir: remote_video
input_csv: remote_video.csv
oembed_providers:
- remote_video: ['https://vimeo.com/', 'https://www.youtube.com/']

Interested Parties

Replace this text - name some folks who may be interested, or, if unsure, @mjordan


Checklist

  • [ X ] Before opening this PR, have you opened an issue explaining what you want to to do?
  • [ X ] Have you run pycodestyle --show-source --show-pep8 --ignore=E402,W504 --max-line-length=200 yourfile.py?
  • [ X ] Have you included same configuration and/or CSV files useful for testing this PR?
  • [ No ] Have you written unit or integration tests if applicable?
  • [ No ] Does the code added in this PR require a version of Python that is higher than the current minimum version?
  • [ No ] If the changes in this PR require an additional Python library, have you included it in setup.py?
  • [ N/A ] If the changes in this PR add a new configuration option, have you provided a default for when the option is not present in the .yml file?

@mjordan mjordan merged commit 3460ef2 into mjordan:main Jun 29, 2023
@mjordan
Copy link
Owner

mjordan commented Jun 29, 2023

Thanks for finding this @aOelschlager ! I'll merge it now so we don't lose this bugfix.

@mjordan
Copy link
Owner

mjordan commented Jun 29, 2023

@aOelschlager I merged your fix and added another fix for the problem I found when running --check.

Let's wait until the conversation on Slack about how to handle remote media settles, and then decide how to move forward. As it stands now, I was able to successfully add Youtube remote video using your fix after I added the field_media_of and field_member_of fields to the stock Remote Video media type. The oEmbed Providers contrib module must also be enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants