mediathekview / MediathekView

Das Programm MediathekView durchsucht die Online-Mediatheken verschiedener Sender
https://mediathekview.de
GNU General Public License v3.0
870 stars 96 forks source link

aria2-remote.sh fails on macOS as its base64 needs argument --break instead of --wrap #684

Open porg opened 1 year ago

porg commented 1 year ago

Bug

Calling aria2-remote.sh (as in commit 9558f62a46cff0b1b8078083629647b5e87e82ca from 2016-01-26) on macOS 11 Big Sur fails with:

base64: invalid option -- w

Found a fix

This row:

params_base64enc=$(echo "${params}" | base64 -w 0 -)

Should be replaced like this:

# Please adapt the next code line depending on your OS:
# The name for the needed argument differs between the Mac and the Linux variant of base64:
  # Linux uses: --wrap (short form: -w)
  # macOS (both built-in and brew variant) uses: --break (short form: -b)
params_base64enc=$(echo "${params}" | base64 --wrap 0 -)
porg commented 1 year ago

I emailed Fourmilab Base64 about the different argument wording --break vs. --wrap which causes incompatibilities.

derreisende77 commented 1 year ago

Okay, I do not really get which parameter you want to have included: --wrap or --break? If break and wrap are similar this contradicts your suggested fix. Could you please clarify your preferred solution which will work both on linux and macOS?

porg commented 1 year ago

I reported this half a year ago. Now re-read my report. It's clear. Again in short words:

porg commented 1 year ago

Or at least a comment (as mine depicted in the OP) so that users can manually adapt the OS specific parts.

derreisende77 commented 1 year ago

Well, at least I responded ;) aria2-remote.sh is not part of the macOS app bundle but only installed on Linux (as can be seen e.g. from the PSet templates import feature in MV). Therefore there is no need to "fix" something which works for the provided platform. Where did you get the shell script for the macOS version?

porg commented 1 year ago

Yes 😉 glad we follow up on this now. Back then I made a tutorial complete with annotated screenshots how to:

I progressed with intermediate solutions until having my intended solution:

  1. MediaThekView hands over to NAS which uses parallel curl downloads.

  2. Then vitusson gave me the idea to use aria2 in Deamon-Mode on my NAS.

  3. I reported success: MediaThekView hands over download request to aria2 download queue running on the NAS.