rubyvideo icon indicating copy to clipboard operation
rubyvideo copied to clipboard

Rework non-video video providers

Open marcoroth opened this issue 11 months ago • 0 comments

Currently we have a few hacky video providers which technically aren't really video providers:

  • scheduled
  • not_recorded
  • not_published
  • children
  • parent

I think most of them aren't really necessary and could be solved differently.

Now after we merged #616 would could use date to figure out if a date is in the future/past to determine the scheduled status. If the date is in the past and we don't have a recording it could automatically transition into not_published.

If a talk actually wasn't recorded we can set a recorded: false in the YAML file. If we know this upfront we could also set this field to let people know if the talk will get recorded or not. That would also help up from automatically transitioning from scheduled -> not_recorded.

I think we could even get rid of back video_provider and video_id from the talk itself, and have a recordings: Array in the YAML file which possibly gets mirrored in a Model/Database table.

  # videos.yml

  - title: "Keynote: Infinity and Beyond"
-   raw_title: 'RubyConf 2024 Keynote: Yukihiro "Matz" Matsumoto'
    speakers:
      - Yukihiro "Matz" Matsumoto
    event_name: RubyConf 2024
-   published_at: "2024-12-10"
    date: "2024-11-13"
    description: ""
-   video_provider: youtube
-   video_id: a4BJ9VUPWI8
+   recordings:
+    - title: 'RubyConf 2024 Keynote: Yukihiro "Matz" Matsumoto'
+      video_provider: youtube 
+      video_id: a4BJ9VUPWI8    
+      published_at: "2024-12-10"

With this approach, it's always additive and doens't need to be touched again to update the status of a talk. If we get a recording we can just add it to the recordings array, which can hold the raw_title, video_provider, and published_at, which is technically also where these fields belong.

Additionally, this would allow https://github.com/adrienpoly/rubyvideo/issues/579 to be realized.

marcoroth avatar Feb 03 '25 14:02 marcoroth