Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/only allow mp4 #4

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions Jellyshare/Synchronize/VideoSync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public async Task SyncVideos(CancellationToken cancellationToken)
var remoteVideos = await GetRemoteVideos(library, cancellationToken);
foreach (var remoteVideo in remoteVideos)
{
if (!localVideos.Contains(remoteVideo.Id))
if (!localVideos.Contains(remoteVideo.Id) && remoteVideo.Container.Contains("mp4"))
{
CreateVideo(remoteVideo, library);
localVideos.Add(remoteVideo.Id);
Expand All @@ -63,7 +63,6 @@ public async Task SyncVideos(CancellationToken cancellationToken)

private void CreateVideo(BaseItemDto remoteVideo, Folder libraryEntity)
{
var path = Path.Combine(libraryEntity.Path, remoteVideo.Id.ToString() + ".mp4");
File.Create(path);

var itemId = _libraryManager.GetNewItemId(path, typeof(Movie));
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ A Jellyfin plugin for sharing libraries between servers.
This plugin is in a very early alpha state. Do not expect stability.

- Is only able to handle Movie libraries.
- Is only able to handle Direct Play media.
- Is not able to handle URL or server name changes.
- Is not able to handle library name changes.

Expand Down