Compare commits
6
Commits
3336bac3fb
...
v1.0.27
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa1ccbe458 | ||
|
|
702a5abdc5 | ||
|
|
cdab2d76a7 | ||
|
|
9202ab62ed | ||
|
|
1b23e203ce | ||
|
|
611fb52d76 |
@@ -36,7 +36,8 @@ jobs:
|
|||||||
id: jprm
|
id: jprm
|
||||||
working-directory: build-${{ github.run_id }}
|
working-directory: build-${{ github.run_id }}
|
||||||
run: |
|
run: |
|
||||||
jprm --verbosity=debug plugin build ./
|
mkdir -p artifacts
|
||||||
|
jprm --verbosity=debug plugin build .
|
||||||
ARTIFACT=$(find . -name "*.zip" -type f -print -quit | sed 's|^\./||')
|
ARTIFACT=$(find . -name "*.zip" -type f -print -quit | sed 's|^\./||')
|
||||||
ARTIFACT_NAME=$(basename "${ARTIFACT}")
|
ARTIFACT_NAME=$(basename "${ARTIFACT}")
|
||||||
echo "artifact=${ARTIFACT}" >> $GITHUB_OUTPUT
|
echo "artifact=${ARTIFACT}" >> $GITHUB_OUTPUT
|
||||||
@@ -51,7 +52,7 @@ jobs:
|
|||||||
echo "checksum=${CHECKSUM}" >> $GITHUB_OUTPUT
|
echo "checksum=${CHECKSUM}" >> $GITHUB_OUTPUT
|
||||||
echo "Checksum: ${CHECKSUM}"
|
echo "Checksum: ${CHECKSUM}"
|
||||||
|
|
||||||
- name: Create or update latest release
|
- name: Delete existing latest release
|
||||||
working-directory: build-${{ github.run_id }}
|
working-directory: build-${{ github.run_id }}
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -60,10 +61,7 @@ jobs:
|
|||||||
REPO_NAME="${{ github.event.repository.name }}"
|
REPO_NAME="${{ github.event.repository.name }}"
|
||||||
GITEA_URL="${{ github.server_url }}"
|
GITEA_URL="${{ github.server_url }}"
|
||||||
TAG="latest"
|
TAG="latest"
|
||||||
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
|
|
||||||
TIMESTAMP=$(date -u +"%Y-%m-%d %H:%M:%S UTC")
|
|
||||||
|
|
||||||
# Delete existing 'latest' release if it exists
|
|
||||||
EXISTING=$(curl -s -o /dev/null -w "%{http_code}" \
|
EXISTING=$(curl -s -o /dev/null -w "%{http_code}" \
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
"${GITEA_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/releases/tags/${TAG}")
|
"${GITEA_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/releases/tags/${TAG}")
|
||||||
@@ -79,22 +77,24 @@ jobs:
|
|||||||
"${GITEA_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/releases/${RELEASE_ID}"
|
"${GITEA_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/releases/${RELEASE_ID}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Delete existing 'latest' tag if it exists
|
|
||||||
curl -s -X DELETE \
|
curl -s -X DELETE \
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
"${GITEA_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/tags/${TAG}" || true
|
"${GITEA_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/tags/${TAG}" || true
|
||||||
|
|
||||||
# Create new release
|
- name: Create latest release
|
||||||
|
working-directory: build-${{ github.run_id }}
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
REPO_OWNER="${{ github.repository_owner }}"
|
||||||
|
REPO_NAME="${{ github.event.repository.name }}"
|
||||||
|
GITEA_URL="${{ github.server_url }}"
|
||||||
|
|
||||||
RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
|
RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
"${GITEA_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/releases" \
|
"${GITEA_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/releases" \
|
||||||
-d "$(jq -n \
|
-d "$(jq -n --arg tag "latest" --arg name "Latest Build" --arg body "SRFPlay Jellyfin Plugin latest build from master." '{tag_name: $tag, name: $name, body: $body, target_commitish: "master", draft: false, prerelease: true}')")
|
||||||
--arg tag "$TAG" \
|
|
||||||
--arg name "Latest Build" \
|
|
||||||
--arg body "Automated build from master branch.\n\nCommit: ${SHORT_SHA}\nBuilt: ${TIMESTAMP}" \
|
|
||||||
--arg target "${{ github.sha }}" \
|
|
||||||
'{tag_name: $tag, name: $name, body: $body, target_commitish: $target, draft: false, prerelease: true}')")
|
|
||||||
|
|
||||||
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
|
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
|
||||||
BODY=$(echo "$RESPONSE" | sed '$d')
|
BODY=$(echo "$RESPONSE" | sed '$d')
|
||||||
@@ -109,6 +109,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Upload plugin artifact
|
# Upload plugin artifact
|
||||||
|
echo "Uploading plugin artifact..."
|
||||||
curl -f -X POST \
|
curl -f -X POST \
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
-H "Content-Type: application/zip" \
|
-H "Content-Type: application/zip" \
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ public class RecordingService : IRecordingService, IDisposable
|
|||||||
|
|
||||||
// Filter to only future/current livestreams that aren't blocked
|
// Filter to only future/current livestreams that aren't blocked
|
||||||
return livestreams
|
return livestreams
|
||||||
.Where(ls => ls.Blocked != true && (ls.ValidTo == null || ls.ValidTo > DateTime.UtcNow))
|
.Where(ls => ls.Blocked != true && (ls.ValidTo == null || ls.ValidTo.Value.ToUniversalTime() > DateTime.UtcNow))
|
||||||
.OrderBy(ls => ls.ValidFrom)
|
.OrderBy(ls => ls.ValidFrom)
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
@@ -333,13 +333,23 @@ public class RecordingService : IRecordingService, IDisposable
|
|||||||
|
|
||||||
foreach (var entry in _recordings.ToList())
|
foreach (var entry in _recordings.ToList())
|
||||||
{
|
{
|
||||||
|
// Normalize ValidFrom/ValidTo to UTC for correct comparison
|
||||||
|
var validFromUtc = entry.ValidFrom.HasValue ? entry.ValidFrom.Value.ToUniversalTime() : (DateTime?)null;
|
||||||
|
var validToUtc = entry.ValidTo.HasValue ? entry.ValidTo.Value.ToUniversalTime() : (DateTime?)null;
|
||||||
|
|
||||||
switch (entry.State)
|
switch (entry.State)
|
||||||
{
|
{
|
||||||
case RecordingState.Scheduled:
|
case RecordingState.Scheduled:
|
||||||
case RecordingState.WaitingForStream:
|
case RecordingState.WaitingForStream:
|
||||||
// Check if it's time to start recording
|
// Check if it's time to start recording
|
||||||
if (entry.ValidFrom.HasValue && entry.ValidFrom.Value <= now.AddMinutes(2))
|
if (validFromUtc.HasValue && validFromUtc.Value <= now.AddMinutes(2))
|
||||||
{
|
{
|
||||||
|
_logger.LogInformation(
|
||||||
|
"Time to start recording '{Title}': ValidFrom={ValidFrom} (UTC: {ValidFromUtc}), Now={Now}",
|
||||||
|
entry.Title,
|
||||||
|
entry.ValidFrom,
|
||||||
|
validFromUtc,
|
||||||
|
now);
|
||||||
changed |= await TryStartRecordingAsync(entry, cancellationToken).ConfigureAwait(false);
|
changed |= await TryStartRecordingAsync(entry, cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -347,7 +357,7 @@ public class RecordingService : IRecordingService, IDisposable
|
|||||||
|
|
||||||
case RecordingState.Recording:
|
case RecordingState.Recording:
|
||||||
// Check if recording should stop (ValidTo reached or process died)
|
// Check if recording should stop (ValidTo reached or process died)
|
||||||
if (entry.ValidTo.HasValue && entry.ValidTo.Value <= now)
|
if (validToUtc.HasValue && validToUtc.Value <= now)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("Recording '{Title}' reached ValidTo, stopping", entry.Title);
|
_logger.LogInformation("Recording '{Title}' reached ValidTo, stopping", entry.Title);
|
||||||
StopFfmpeg(entry.Id);
|
StopFfmpeg(entry.Id);
|
||||||
|
|||||||
@@ -8,6 +8,14 @@
|
|||||||
"category": "Live TV",
|
"category": "Live TV",
|
||||||
"imageUrl": "https://gitea.tourolle.paris/dtourolle/jellyfin-srfPlay/raw/branch/master/assests/main%20logo.png",
|
"imageUrl": "https://gitea.tourolle.paris/dtourolle/jellyfin-srfPlay/raw/branch/master/assests/main%20logo.png",
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"version": "0.0.0.0",
|
||||||
|
"changelog": "Latest Build",
|
||||||
|
"targetAbi": "10.9.0.0",
|
||||||
|
"sourceUrl": "https://gitea.tourolle.paris/dtourolle/jellyfin-srfPlay/releases/download/latest/srfplay_1.0.0.0.zip",
|
||||||
|
"checksum": "c7e868d23293adcc21d72e735094d9d6",
|
||||||
|
"timestamp": "2026-03-07T16:28:38Z"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "1.0.25",
|
"version": "1.0.25",
|
||||||
"changelog": "Release 1.0.25",
|
"changelog": "Release 1.0.25",
|
||||||
|
|||||||
Reference in New Issue
Block a user