TUM-Dev / gocast

TUMs lecture streaming service.
https://live.rbg.tum.de/
MIT License
178 stars 42 forks source link

No hardcoded file paths #1229

Closed Mjaethers closed 5 months ago

Mjaethers commented 8 months ago

Motivation and Context

Closes #539 Throughout the worker there are multiple instances of hardcoded file paths. By using a PathProvider code duplications is mitigated and all the hardcoded endpoints can be easily found as they are all in once place.

Description

All the hardcoded file paths I found in the worker module have been moved to the pathprovider. The path providing functions follow the OS agnostic style laid out by filepath The overall code has not been changed much, mostly just moved about, so the expected behaviour should also not have changed.

Steps for Testing

Prerequisites:

  1. Run go test github.com/TUM-Dev/gocast/tools/pathprovider
  2. Ultimately these changes should incur no change in the behaviour of the overall project

Screenshots

none

Mjaethers commented 5 months ago

There was a misunderstanding on my end regarding the difference between the new runner and the worker, so I don't think this PR makes sense any more. I'll close it, but I can re-do this for the actual runner if need be (but I don't think that will be the case).