stremio/apps/ios/scripts/fetch-vlckit.sh
Jos Vooges | STH 252bce838b Add native VMC iOS client with VLC playback.
SwiftUI app against master API: link, profiles, browse, live TV, favorites sync, and TestFlight-ready assets.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-07 19:16:29 +02:00

49 lines
1.5 KiB
Bash

#!/bin/zsh
set -euo pipefail
cd /tmp
echo "Listing MobileVLCKit packages..."
curl -fsSL https://download.videolan.org/pub/cocoapods/prod/ -o /tmp/vlc-prod.html
python3 - <<'PY'
from pathlib import Path
import re
html = Path('/tmp/vlc-prod.html').read_text(errors='ignore')
names = sorted(set(re.findall(r'href="(MobileVLCKit-3\.[^"]+)"', html)))
for n in names[-25:]:
print(n)
PY
# Prefer newest 3.5/3.6 if present else latest 3.x
python3 - <<'PY'
from pathlib import Path
import re
html = Path('/tmp/vlc-prod.html').read_text(errors='ignore')
names = sorted(set(re.findall(r'href="(MobileVLCKit-3\.[^"]+)"', html)))
pick = None
for n in reversed(names):
if n.startswith('MobileVLCKit-3.5') or n.startswith('MobileVLCKit-3.6'):
pick = n
break
if not pick and names:
pick = names[-1]
print('PICK=' + (pick or ''))
Path('/tmp/vlc-pick.txt').write_text(pick or '')
PY
PICK=$(cat /tmp/vlc-pick.txt)
if [ -z "$PICK" ]; then
echo "No package found"
exit 1
fi
echo "Downloading $PICK ..."
curl -fL --progress-bar "https://download.videolan.org/pub/cocoapods/prod/$PICK" -o "/tmp/$PICK"
mkdir -p /tmp/vlcunpack
rm -rf /tmp/vlcunpack/*
case "$PICK" in
*.zip) unzip -q "/tmp/$PICK" -d /tmp/vlcunpack ;;
*.tar.xz|*.txz) tar -xJf "/tmp/$PICK" -C /tmp/vlcunpack ;;
*.tar.bz2) tar -xjf "/tmp/$PICK" -C /tmp/vlcunpack ;;
*) tar -xf "/tmp/$PICK" -C /tmp/vlcunpack ;;
esac
echo "Unpacked contents:"
find /tmp/vlcunpack -maxdepth 3 -type d | head -40
find /tmp/vlcunpack -name '*.framework' -o -name '*.xcframework' | head -20