Skip to content

fix season not being cleared on viewMode change #611

fix season not being cleared on viewMode change

fix season not being cleared on viewMode change #611

name: Build and Upload
on:
push:
branches: ["**"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [20.x]
os: [ubuntu-22.04, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Download mpv
if: matrix.os == 'windows-latest'
shell: powershell
run: |
$retryCount = 3
$retryDelay = 5
for ($i = 1; $i -le $retryCount; $i++) {
try {
Invoke-WebRequest -UserAgent "Wget" -Uri "https://nightly.link/mpv-player/mpv/workflows/build/master/mpv-x86_64-pc-windows-msvc.zip" -OutFile .\mpv.zip
break
}
catch {
Write-Host "Error occurred: $_. Retrying in $retryDelay seconds..."
Start-Sleep -Seconds $retryDelay
}
}
New-Item -Path 'C:\open-tv-deps' -ItemType Directory
7z e .\mpv.zip -oC:\open-tv-deps mpv.exe vulkan-1.dll
- name: Download ffmpeg
if: matrix.os == 'windows-latest'
shell: powershell
run: |
$retryCount = 3
$retryDelay = 5
for ($i = 1; $i -le $retryCount; $i++) {
try {
Invoke-WebRequest -UserAgent "Wget" -Uri "https://github.com/BtbN/FFmpeg-Builds/releases/latest/download/ffmpeg-master-latest-win64-gpl.zip" -OutFile .\ffmpeg.zip
break
}
catch {
Write-Host "Error occurred: $_. Retrying in $retryDelay seconds..."
Start-Sleep -Seconds $retryDelay
}
}
7z e .\ffmpeg.zip -oC:\open-tv-deps ffmpeg-master-latest-win64-gpl/bin/ffmpeg.exe
- name: Download yt-dlp
if: matrix.os == 'windows-latest'
shell: powershell
run: |
$retryCount = 3
$retryDelay = 5
for ($i = 1; $i -le $retryCount; $i++) {
try {
Invoke-WebRequest -UserAgent "Wget" -Uri "https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe" -OutFile yt-dlp.exe
break
}
catch {
Write-Host "Error occurred: $_. Retrying in $retryDelay seconds..."
Start-Sleep -Seconds $retryDelay
}
}
Move-Item -Path yt-dlp.exe -Destination C:\open-tv-deps
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install deps linux
if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt update
sudo apt install libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
libgtk-3-dev
- name: Install deps project
run: |
npm install
- name: Build
if: startsWith(matrix.os, 'macos-')
run: |
CI=true npm run tauri build
- name: Build
run: |
npm run tauri build
- name: Repackage deb
if: matrix.os == 'ubuntu-22.04'
working-directory: src-tauri/target/release/bundle/deb
run: |
deb=$(find . -type f -name '*.deb' | head -n 1)
dpkg-deb -R "$deb" tmp
cp "${{ github.workspace }}/deb/Open TV.desktop" "tmp/usr/share/applications"
rm -f "$deb"
dpkg-deb -Z xz -b tmp "$deb"
- name: Upload MSI
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: open-tv-windows
path: src-tauri/target/release/bundle/msi/*.msi
retention-days: 60
- name: Upload DEB
if: matrix.os == 'ubuntu-22.04'
uses: actions/upload-artifact@v4
with:
name: open-tv-debian
path: src-tauri/target/release/bundle/deb/*.deb
retention-days: 60
- name: Upload RPM
if: matrix.os == 'ubuntu-22.04'
uses: actions/upload-artifact@v4
with:
name: open-tv-redhat
path: src-tauri/target/release/bundle/rpm/*.rpm
retention-days: 60
- name: Upload DMG ARM64
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v4
with:
name: open-tv-mac-arm64
path: src-tauri/target/release/bundle/dmg/*.dmg
retention-days: 60
- name: Upload DMG AMD64
if: matrix.os == 'macos-13'
uses: actions/upload-artifact@v4
with:
name: open-tv-mac-AMD64
path: src-tauri/target/release/bundle/dmg/*.dmg
retention-days: 60