Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
00c0e91
feat: add download grid from channels
mateof Apr 24, 2025
8bad38f
feat: show channel files
mateof May 24, 2025
b0b0cc6
feat: add media streaming from telegram (#32)
mateof Sep 6, 2025
7f93450
feat: media stream for huge files (#34)
mateof Sep 9, 2025
15f240b
Merge branch 'main' into develop
mateof Sep 9, 2025
57f0290
Merge branch 'main' into develop
mateof Sep 9, 2025
d183622
feat: add webdav and export files to strm (#39)
mateof Sep 23, 2025
c5fc1a1
chore: dockerfile
mateof Sep 23, 2025
0b5b9af
chore: dockerfile change
mateof Sep 23, 2025
be4a2e1
chore: python virtual env
mateof Sep 23, 2025
aff3772
chore: add beta tags
mateof Sep 25, 2025
773751c
chore: log refresh
mateof Sep 25, 2025
3b11b98
Merge branch 'main' into develop
mateof Sep 25, 2025
d88af3f
feat: add download file before play
mateof Oct 25, 2025
7f0186f
chore: python docker repair
mateof Oct 26, 2025
ada83dd
feat: add virtual scroll config
mateof Oct 26, 2025
1fe6a30
chore: add mutex in tasks
mateof Oct 29, 2025
2906995
fix: repair strm
mateof Oct 31, 2025
9761906
fea: add preload files on streaming option
mateof Nov 7, 2025
ce5c42e
fix: solve download multi part file for stream
mateof Nov 7, 2025
10ef101
fix: multi download problem
mateof Nov 7, 2025
df4625b
chore: add getFileById on download
mateof Nov 8, 2025
95ee3c1
chore: add ogm as a video extension
mateof Nov 8, 2025
8e5323b
feat: improve streaming
mateof Nov 9, 2025
2c294a1
feat: download files v2
mateof Nov 9, 2025
9c2cefe
feat: add reverse proxy support over https
mateof Nov 13, 2025
6498b4d
chore: add local file manager routes dynamically
mateof Nov 13, 2025
2d85d14
chore: improve navbar
mateof Nov 15, 2025
c7e1d61
feat: add speedChart
mateof Dec 3, 2025
f566faf
feat: improve main window (#41)
mateof Dec 3, 2025
f5ac352
feat: remove id from task tables
mateof Dec 3, 2025
29a9636
fix: solve some errors 🚑
mateof Dec 5, 2025
95ed0cb
chore: improve shared file manager
mateof Dec 5, 2025
1c7dd4b
chore: add start time in download
mateof Dec 5, 2025
8a8adfe
chore: improve js and css
mateof Dec 6, 2025
ebe67ce
chore: improve events
mateof Dec 7, 2025
05a01ae
chore: navbar changes
mateof Dec 7, 2025
66ffc59
chore: change strm export
mateof Dec 8, 2025
66b7482
Merge remote-tracking branch 'origin/main' into develop
mateof Dec 8, 2025
9243ef3
feat: add new lazy DropDownTree
mateof Dec 9, 2025
1133146
feat: add custom mobile file manager (#43)
mateof Dec 10, 2025
f4296fc
feat: prevent load file manager
mateof Dec 10, 2025
11ff003
feat: add file type filter on mobile
mateof Dec 11, 2025
3dcfc0f
feat: add shared folder to mobile
mateof Dec 11, 2025
fc28e80
feat: add preload files
mateof Dec 11, 2025
a4a7c10
feat: slide bottom bar
mateof Dec 11, 2025
c7418e4
feat: bump .net to 10
mateof Dec 11, 2025
daae717
feat: versioning
mateof Dec 11, 2025
213762c
feat: improve version modal
mateof Dec 12, 2025
e049b01
feat: improve refresh data channel
mateof Dec 12, 2025
5d7bc8a
chore: improve audio and video modals
mateof Dec 12, 2025
3a2476f
feat: add audio playlist
mateof Dec 12, 2025
0b97f6a
feat: improve audio player
mateof Dec 12, 2025
88f3ad7
feat: improve configuration
mateof Dec 12, 2025
7687ade
feat: improve local file upload
mateof Dec 13, 2025
c6b0cf4
feat: improve top row
mateof Dec 13, 2025
7477b66
feat: improve offcanvas
mateof Dec 13, 2025
f98cd97
feat: improve task manager
mateof Dec 13, 2025
c2eb61e
chore: change dockerfile
mateof Dec 13, 2025
9741d40
fix: ensure is dispose
mateof Dec 13, 2025
e8795e1
chore: improve tasks list
mateof Dec 13, 2025
c5cc450
feat: tasks tab navigation
mateof Dec 13, 2025
5e4f361
feat: improve import modal
mateof Dec 13, 2025
50c610a
feat: add multiple audio files to playlist
mateof Dec 13, 2025
c70b3be
feat: devices compatibilities
mateof Dec 13, 2025
4bedb8d
fix: culture error solve
mateof Dec 13, 2025
035d74d
feat: improve video modal
mateof Dec 13, 2025
c226751
Merge remote-tracking branch 'origin/main' into develop
mateof Dec 13, 2025
5453e1c
fix: some errors
mateof Dec 13, 2025
0ad71b1
feat: improve upload and download modals
mateof Dec 13, 2025
9334e1e
feat: add pending upload tab
mateof Dec 14, 2025
07e8300
fix: reverse proxy fix
mateof Dec 14, 2025
64c2caf
feat: improve file info modals
mateof Dec 14, 2025
8277203
fix: fix relative path
mateof Dec 14, 2025
640e586
fix: reverse proxy
mateof Dec 14, 2025
9dcd990
fix: reverse proxy support
mateof Dec 14, 2025
09d24c7
feat: add task persistence
mateof Dec 14, 2025
3757d6a
chore: bump library versions
mateof Dec 14, 2025
b1f3d88
fix: solve some errors
mateof Dec 14, 2025
c615b88
fix: pending tasks
mateof Dec 15, 2025
b4d74b9
fix: fix crash error
mateof Dec 15, 2025
8a84f58
fix: solve speedchart error
mateof Dec 15, 2025
ea4461d
feat: add serilog
mateof Dec 15, 2025
4761043
fix: solve log issue
mateof Dec 15, 2025
01dbd76
fix: fix log
mateof Dec 15, 2025
41be314
fix: show version
mateof Dec 15, 2025
01104cf
feat: add create channel function
mateof Dec 15, 2025
fb6b034
fix: repair rename folder
mateof Dec 15, 2025
59d1939
feat: improve split files
mateof Dec 15, 2025
d4f4a99
feat: add system restart
mateof Dec 15, 2025
4c5d081
fix: file manager styles
mateof Dec 15, 2025
298466b
feat: url paths on file manager
mateof Dec 15, 2025
e71cecf
feat: add clean cache celebration
mateof Dec 15, 2025
0dea419
chore: change menu icon style
mateof Dec 15, 2025
9c5cb4c
feat: add multiclient to upload and download
mateof Dec 15, 2025
4ba6867
feat: add system resources info
mateof Dec 15, 2025
6be482f
feat: add persist task table
mateof Dec 15, 2025
3b637d4
fix: solve copy telegram session
mateof Dec 16, 2025
21b61cc
fix: add state to pending task in downloads
mateof Dec 16, 2025
382ef95
feat: show split button and hash on main layout
mateof Dec 16, 2025
bc56e0a
feat: copy session to multi client
mateof Dec 16, 2025
043fccd
chore: ensure download client session
mateof Dec 16, 2025
0d59a03
fix: rollbak to one client
mateof Dec 17, 2025
cfa2983
feat: improve login
mateof Dec 17, 2025
f1c3773
feat: improve webdav info
mateof Dec 17, 2025
4ce7fb6
feat: improve chat messages
mateof Dec 17, 2025
5860b66
feat: add channel icons
mateof Dec 17, 2025
87e1c26
feat: add blazor reconnect
mateof Dec 17, 2025
fe24fe5
fix: add set complete pending task
mateof Dec 17, 2025
85f4e40
feat: add transcoding for streaming
mateof Dec 17, 2025
03e7122
feat: add new docker image without ffmpeg
mateof Dec 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,26 @@ jobs:
username: ${{github.actor}}
password: ${{secrets.GHCR}}

- name: Build and Push the Docker image
- name: Build and Push Full Image (with FFmpeg)
run: |
VERSION=${{ steps.version.outputs.version }}
echo "Building full image with FFmpeg support..."
docker build ./TelegramDownloader -f ./TelegramDownloader/Dockerfile \
--build-arg VERSION=$VERSION \
--build-arg INCLUDE_FFMPEG=true \
--tag ghcr.io/mateof/telegramfilemanager:dev_$VERSION \
--tag ghcr.io/mateof/telegramfilemanager:dev_latest
docker push ghcr.io/mateof/telegramfilemanager:dev_$VERSION
docker push ghcr.io/mateof/telegramfilemanager:dev_latest

- name: Build and Push Lite Image (without FFmpeg)
run: |
VERSION=${{ steps.version.outputs.version }}
echo "Building lite image without FFmpeg..."
docker build ./TelegramDownloader -f ./TelegramDownloader/Dockerfile \
--build-arg VERSION=$VERSION \
--build-arg INCLUDE_FFMPEG=false \
--tag ghcr.io/mateof/telegramfilemanager:dev_$VERSION-lite \
--tag ghcr.io/mateof/telegramfilemanager:dev_latest-lite
docker push ghcr.io/mateof/telegramfilemanager:dev_$VERSION-lite
docker push ghcr.io/mateof/telegramfilemanager:dev_latest-lite
16 changes: 15 additions & 1 deletion .github/workflows/release-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,26 @@ jobs:
username: ${{github.actor}}
password: ${{secrets.GHCR}}

- name: Build and Push the Docker image
- name: Build and Push Full Image (with FFmpeg)
run: |
VERSION=${{ steps.version.outputs.version }}
echo "Building full image with FFmpeg support..."
docker build ./TelegramDownloader -f ./TelegramDownloader/Dockerfile \
--build-arg VERSION=$VERSION \
--build-arg INCLUDE_FFMPEG=true \
--tag ghcr.io/mateof/telegramfilemanager:${{github.ref_name}} \
--tag ghcr.io/mateof/telegramfilemanager:latest
docker push ghcr.io/mateof/telegramfilemanager:${{github.ref_name}}
docker push ghcr.io/mateof/telegramfilemanager:latest

- name: Build and Push Lite Image (without FFmpeg)
run: |
VERSION=${{ steps.version.outputs.version }}
echo "Building lite image without FFmpeg..."
docker build ./TelegramDownloader -f ./TelegramDownloader/Dockerfile \
--build-arg VERSION=$VERSION \
--build-arg INCLUDE_FFMPEG=false \
--tag ghcr.io/mateof/telegramfilemanager:${{github.ref_name}}-lite \
--tag ghcr.io/mateof/telegramfilemanager:latest-lite
docker push ghcr.io/mateof/telegramfilemanager:${{github.ref_name}}-lite
docker push ghcr.io/mateof/telegramfilemanager:latest-lite
98 changes: 98 additions & 0 deletions TelegramDownloader/Controllers/ChannelImageController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
using Microsoft.AspNetCore.Mvc;
using TelegramDownloader.Data;
using TelegramDownloader.Models;

namespace TelegramDownloader.Controllers
{
[Route("api/channel")]
[ApiController]
public class ChannelImageController : ControllerBase
{
private readonly ITelegramService _ts;
private readonly ILogger<ChannelImageController> _logger;
private static readonly string CacheFolder = Path.Combine(Path.GetTempPath(), "TFM_ChannelImages");
private static readonly SemaphoreSlim _downloadLock = new SemaphoreSlim(1, 1);

public ChannelImageController(ITelegramService ts, ILogger<ChannelImageController> logger)
{
_ts = ts;
_logger = logger;

// Ensure cache folder exists
if (!Directory.Exists(CacheFolder))
{
Directory.CreateDirectory(CacheFolder);
}
}

[HttpGet("image/{channelId}")]
[ResponseCache(Duration = 86400)] // Cache for 24 hours
public async Task<IActionResult> GetChannelImage(long channelId)
{
try
{
var cachedPath = Path.Combine(CacheFolder, $"{channelId}.jpg");

// Check if image is cached
if (System.IO.File.Exists(cachedPath))
{
var fileBytes = await System.IO.File.ReadAllBytesAsync(cachedPath);
return File(fileBytes, "image/jpeg");
}

// Download and cache the image
await _downloadLock.WaitAsync();
try
{
// Double-check after acquiring lock
if (System.IO.File.Exists(cachedPath))
{
var fileBytes = await System.IO.File.ReadAllBytesAsync(cachedPath);
return File(fileBytes, "image/jpeg");
}

var imageBytes = await _ts.DownloadChannelPhoto(channelId);
if (imageBytes != null && imageBytes.Length > 0)
{
await System.IO.File.WriteAllBytesAsync(cachedPath, imageBytes);
return File(imageBytes, "image/jpeg");
}
}
finally
{
_downloadLock.Release();
}

// Return 404 if no image
return NotFound();
}
catch (Exception ex)
{
_logger.LogError(ex, "Error getting channel image for {ChannelId}", channelId);
return NotFound();
}
}

[HttpDelete("image/cache")]
public IActionResult ClearCache()
{
try
{
if (Directory.Exists(CacheFolder))
{
var files = Directory.GetFiles(CacheFolder, "*.jpg");
foreach (var file in files)
{
System.IO.File.Delete(file);
}
}
return Ok(new { message = "Cache cleared" });
}
catch (Exception ex)
{
_logger.LogError(ex, "Error clearing image cache");
return StatusCode(500, new { error = "Failed to clear cache" });
}
}
}
}
Loading