Jump to content

Recommended Posts

katbyte
Posted

Hello, i'm experiencing a lot of instability due to these plugins.

1: Spamming Dead MediaFire Links (404 Errors) into the log, The plugins are attempting to download theme songs and videos from mediafire.com. However, many of these links are dead. The plugins don't handle this gracefully; they just throw a massive amount of  MediaBrowser.Model.Net.HttpException: NotFound stack trace into the logs.

Quote

2026-04-05 00:04:40.964 Info HttpClient: Http response 404 from http://www.mediafire.com/download/nr9qe44xleaq494 after 338ms
2026-04-05 00:04:40.965 Error App: Movie Theme Songs - Error
    *** Error Report ***
    Version: 4.10.0.8
    Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
    Operating system: Linux version 6.12.74+deb13+1-amd64 (debian-kernel@lists.debian.org) (x86_64-linux-gnu-gcc-14 (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debi
    OS/Process: x64/x64
    Framework: .NET 8.0.22
    Runtime: system/System.Private.CoreLib.dll
    Processor count: 16
    Data path: /config
    Application path: /system
    MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: NotFound
       at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
       at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod)
       at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.Get(HttpRequestOptions options)
       at MovieThemeSongs.Search.SongSearch.GetThemeFromPage(String url, String id, String tmdbId, CancellationToken cancellationToken)
       at MovieThemeSongs.Search.SongSearch.Search(BaseItem item, CancellationToken cancellationToken, String html, String data, String uploadedhtml, Boolean api)
       at MovieThemeSongs.Search.LocalMovieThemeSongDownloader.GetMovieThemeSongUrl(BaseItem item, CancellationToken cancellationToken, String html, String data, String uploadedhtml, Boolean api)
       at MovieThemeSongs.Search.LocalMovieThemeSongDownloader.DownloadMovieThemeSongForItem(BaseItem item, CancellationToken cancellationToken, String html, String data, String uploadedhtml, ILibraryManager libraryManager)
    Source: Emby.Server.Implementations
    TargetSite: Void MoveNext()

2. not handling Network Throttling / Connection Drops. Even when the MediaFire links are active, the plugin is getting rate-limited or dropping connections, resulting in a System.Net.Http.HttpIOException: The response ended prematurely. Because the file fails to download completely, the next step in the plugin crashes with a FileNotFoundException because it can't find the .tmp file it expected to process.

Quote

2026-04-05 00:04:41.729 Error HttpClient: Error getting response from http://download1526.mediafire.com/jm6rz2sz9dzgRgYuh28F4VxEQqEnFzlAfJiuID_exLqasvDJ4RzWhSrqeT11-y80jS3NFYSVCZ6X3DFjlP8nZChF6itb5DuvI4U9974m0_rpa_vCw3AizFwo7_e93-WaH5TkeqlBVZSixlrUcwxLXQHEC_efU_amXB7FlrtH6UOx/4uujq48anjyqnwh/20694
    *** Error Report ***
    Version: 4.10.0.8
    Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
    Operating system: Linux version 6.12.74+deb13+1-amd64 (debian-kernel@lists.debian.org) (x86_64-linux-gnu-gcc-14 (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debi
    OS/Process: x64/x64
    Framework: .NET 8.0.22
    Runtime: system/System.Private.CoreLib.dll
    Processor count: 16
    Data path: /config
    Application path: /system
    System.Net.Http.HttpIOException: System.Net.Http.HttpIOException: The response ended prematurely. (ResponseEnded)
       at System.Net.Http.HttpConnection.FillAsync(Boolean async)
       at System.Net.Http.HttpConnection.CopyToContentLengthAsync(Stream destination, Boolean async, UInt64 length, Int32 bufferSize, CancellationToken cancellationToken)
       at System.Net.Http.HttpConnection.ContentLengthReadStream.CompleteCopyToAsync(Task copyTask, CancellationToken cancellationToken)
       at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.GetTempFileResponse(HttpRequestOptions options)
    Source: System.Net.Http
    TargetSite: Void MoveNext()
    
2026-04-05 00:04:41.729 Error App: Movie Theme Songs - Error downloading file from host
    *** Error Report ***
    Version: 4.10.0.8
    Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
    Operating system: Linux version 6.12.74+deb13+1-amd64 (debian-kernel@lists.debian.org) (x86_64-linux-gnu-gcc-14 (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debi
    OS/Process: x64/x64
    Framework: .NET 8.0.22
    Runtime: system/System.Private.CoreLib.dll
    Processor count: 16
    Data path: /config
    Application path: /system
    System.Net.Http.HttpIOException: System.Net.Http.HttpIOException: The response ended prematurely. (ResponseEnded)
       at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.GetTempFileResponse(HttpRequestOptions options)
       at MovieThemeSongs.Search.LocalMovieThemeSongDownloader.DownloadMovieThemeSongForItem(BaseItem item, CancellationToken cancellationToken, String html, String data, String uploadedhtml, ILibraryManager libraryManager)
    Source: System.Net.Http
    TargetSite: Void MoveNext()

3. When the plugins do manage to successfully download and process a file, they frequently crash at the very last step. The plugins are blindly trying to move files into your media directories without checking if they already exist.

Quote

2026-04-05 00:01:14.048 Info App: Movie Theme Songs - Volume Normalised Successfully
2026-04-05 00:01:14.049 Error App: Movie Theme Songs - Error downloading file from host
    *** Error Report ***
    Version: 4.10.0.8
    Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
    Operating system: Linux version 6.12.74+deb13+1-amd64 (debian-kernel@lists.debian.org) (x86_64-linux-gnu-gcc-14 (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debi
    OS/Process: x64/x64
    Framework: .NET 8.0.22
    Runtime: system/System.Private.CoreLib.dll
    Processor count: 16
    Data path: /config
    Application path: /system
    System.IO.IOException: System.IO.IOException: The file '/mnt/video/movies/a/Automata (2014)/theme.mp3' already exists.
       at System.IO.FileSystem.LinkOrCopyFile(String sourceFullPath, String destFullPath)
       at System.IO.FileSystem.MoveFile(String sourceFullPath, String destFullPath, Boolean overwrite)
       at System.IO.File.Move(String sourceFileName, String destFileName, Boolean overwrite)
       at MovieThemeSongs.Search.LocalMovieThemeSongDownloader.DownloadMovieThemeSongForItem(BaseItem item, CancellationToken cancellationToken, String html, String data, String uploadedhtml, ILibraryManager libraryManager)
    Source: System.Private.CoreLib
    TargetSite: Void LinkOrCopyFile(System.String, System.String)
    

This all seems quite new and not something i've seen before. what tripped me off was the server just locking up until the docker container was restarted and noticing that there were 2 ffmpeg processes that were running for 3 hours:

Quote

19:58:50] root@emby:/home/kt# while sleep 2; do echo "--- $(date) ---"; ps -eo pid,pcpu,etime,cputime,args --sort=-pcpu | grep [f]fmpeg | awk '{print "PID: "$1" | CPU%: "$2" | WallTime: "$3" | TotalCPUTime: "$4" | Cmd: "$5" "$6" "$7}'; done

--- Sat 04 Apr 2026 08:01:08 PM PDT ---

PID: 1335941 | CPU%: 99.9 | WallTime: 03:00:27 | TotalCPUTime: 03:00:18 | Cmd: /bin/ffmpeg -i /var/emby/cache/cache/temp/b3b51e7c-0a71-4a6d-a8ad-72edcf7c0393.tmp

PID: 1335202 | CPU%: 99.9 | WallTime: 03:00:45 | TotalCPUTime: 03:00:36 | Cmd: /bin/ffmpeg -i /var/emby/cache/cache/temp/155720b6-f383-498d-ba98-d565da89ef46.tmp

PID: 1232028 | CPU%: 15.1 | WallTime: 05:36:42 | TotalCPUTime: 00:50:59 | Cmd: /system/EmbyServer -programdata /config

and seeing they were started by your plugins (with a malformed command? missing quote?

Quote

[20:12:31] root@emby:/home/docker/config/media/emby/logs# grep -inC 3 "b3b51e7c-0a71-4a6d-a8ad-72edcf7c0393" *
embyserver.txt-1521-2026-04-05 00:00:40.184 Info App: Theme Songs - Are You Afraid of the Dark? in filter list so will not be downloaded
embyserver.txt-1522-2026-04-05 00:00:40.200 Info HttpClient: Http response 200 from https://api.themoviedb.org/3/tv/34607/season/1?api_key=‌f6bd687ffa63cd282b6ff2c6877f2669‌&append_to_response=images,keywords,external_ids,credits,videos&language=en-CA&include_image_language=en-CA,null after 104ms
embyserver.txt-1523-2026-04-05 00:00:40.200 Info HttpClient: GET https://api.themoviedb.org/3/tv/34607/season/2?api_key=‌f6bd687ffa63cd282b6ff2c6877f2669‌&append_to_response=images,keywords,external_ids,credits,videos&language=en-CA&include_image_language=en-CA,null
embyserver.txt:1524:2026-04-05 00:00:40.281 Info App: Movie Theme Videos - Moving /var/emby/cache/cache/temp/b3b51e7c-0a71-4a6d-a8ad-72edcf7c0393.tmp to /mnt/video/movies/d/Deus (2022)/backdrops/theme.mkv
embyserver.txt-1525-2026-04-05 00:00:40.282 Info App: Movie Theme Videos ffmpeg path : /bin/ffmpeg
embyserver.txt:1526:2026-04-05 00:00:40.282 Info App: Movie Theme Videos ffmpeg params :  -i "/var/emby/cache/cache/temp/b3b51e7c-0a71-4a6d-a8ad-72edcf7c0393.tmp" -t 10 -af volumedetect -f null –
embyserver.txt-1527-2026-04-05 00:00:40.304 Info HttpClient: Http response 200 from https://api.themoviedb.org/3/tv/34607/season/2?api_key=‌f6bd687ffa63cd282b6ff2c6877f2669‌&append_to_response=images,keywords,external_ids,credits,videos&language=en-CA&include_image_language=en-CA,null after 103ms
embyserver.txt-1528-2026-04-05 00:00:40.304 Info HttpClient: GET https://api.themoviedb.org/3/tv/34607/season/3?api_key=‌f6bd687ffa63cd282b6ff2c6877f2669‌&append_to_response=images,keywords,external_ids,credits,videos&language=en-CA&include_image_language=en-CA,null
embyserver.txt-1529-2026-04-05 00:00:40.359 Info App: Theme Songs - Mob Psycho 100 in filter list so will not be downloaded
--
embyserver.txt-1534-2026-04-05 00:00:40.646 Info HttpClient: Http response 200 from https://api.themoviedb.org/3/tv/34607/season/5?api_key=‌f6bd687ffa63cd282b6ff2c6877f2669‌&append_to_response=images,keywords,external_ids,credits,videos&language=en-CA&include_image_language=en-CA,null after 118ms
embyserver.txt-1535-2026-04-05 00:00:40.646 Info HttpClient: GET https://api.themoviedb.org/3/tv/34607/season/6?api_key=‌f6bd687ffa63cd282b6ff2c6877f2669‌&append_to_response=images,keywords,external_ids,credits,videos&language=en-CA&include_image_language=en-CA,null
embyserver.txt-1536-2026-04-05 00:00:40.650 Info App: Movie Theme Videos ffmpeg path : /bin/ffmpeg
embyserver.txt:1537:2026-04-05 00:00:40.650 Info App: Movie Theme Videos ffmpeg params : -i "/var/emby/cache/cache/temp/b3b51e7c-0a71-4a6d-a8ad-72edcf7c0393.tmp" -map_metadata -1 -vcodec copy -acodec aac -strict experimental -ac 2 -ar 44100 -ab 128000 -af "aresample=async=1000,volume=-2dB" "/var/emby/cache/cache/temp/b3b51e7c-0a71-4a6d-a8ad-72edcf7c0393.tmp.mkv
embyserver.txt-1538-2026-04-05 00:00:40.752 Info HttpClient: Http response 200 from https://api.themoviedb.org/3/tv/34607/season/6?api_key=‌f6bd687ffa63cd282b6ff2c6877f2669‌&append_to_response=images,keywords,external_ids,credits,videos&language=en-CA&include_image_language=en-CA,null after 105ms
embyserver.txt-1539-2026-04-05 00:00:40.752 Info HttpClient: GET https://api.themoviedb.org/3/tv/34607/season/7?api_key=‌f6bd687ffa63cd282b6ff2c6877f2669‌&append_to_response=images,keywords,external_ids,credits,videos&language=en-CA&include_image_language=en-CA,null
embyserver.txt-1540-2026-04-05 00:00:40.862 Info HttpClient: Http response 200 from https://api.themoviedb.org/3/tv/34607/season/7?api_key=‌f6bd687ffa63cd282b6ff2c6877f2669‌&append_to_response=images,keywords,external_ids,credits,videos&language=en-CA&include_image_language=en-CA,null after 110ms
[20:12:36] root@emby:/home/docker/config/media/emby/logs# grep -inC 3 "155720b6-f383-498d-ba98-d565da89ef46" /config/logs/*
grep: /config/logs/*: No such file or directory
[20:12:46] root@emby:/home/docker/config/media/emby/logs# grep -inC 3 "155720b6-f383-498d-ba98-d565da89ef46" *
embyserver.txt-504-2026-04-05 00:00:22.529 Info App: Movie Theme Videos - Found movie theme video for Pokémon: The First Movie
embyserver.txt-505-2026-04-05 00:00:22.529 Info HttpClient: GetTempFileResponse url: http://download1078.mediafire.com/uxri2ox9r33g50hGPj746QDgBsWdiDmNU3N1gqHmPyEXraI6PskNbd3pwjihjgg8rHEqPKouhJyTQUUeqUCh6zQv0H-JNRCc01FIvzEk8nOCelHr9i1BWPBUzv-gNHI9w8cgNsj4U81jne5flrPDUrsoaL_gNJg5mM9-Znbn5EsS/d29cjpoz9osq8kk/10228
embyserver.txt-506-2026-04-05 00:00:22.529 Info HttpClient: GET http://download1078.mediafire.com/uxri2ox9r33g50hGPj746QDgBsWdiDmNU3N1gqHmPyEXraI6PskNbd3pwjihjgg8rHEqPKouhJyTQUUeqUCh6zQv0H-JNRCc01FIvzEk8nOCelHr9i1BWPBUzv-gNHI9w8cgNsj4U81jne5flrPDUrsoaL_gNJg5mM9-Znbn5EsS/d29cjpoz9osq8kk/10228
embyserver.txt:507:2026-04-05 00:00:22.541 Info App: TV Theme Videos - Moving /var/emby/cache/cache/temp/155720b6-f383-498d-ba98-d565da89ef46.tmp to /mnt/video/tv/j/Jonny Quest (1964)/backdrops/theme.mkv
embyserver.txt-508-2026-04-05 00:00:22.543 Info App: TV Theme Videos ffmpeg path : /bin/ffmpeg
embyserver.txt:509:2026-04-05 00:00:22.543 Info App: TV Theme Videos ffmpeg params :  -i "/var/emby/cache/cache/temp/155720b6-f383-498d-ba98-d565da89ef46.tmp" -t 10 -af volumedetect -f null –
embyserver.txt-510-2026-04-05 00:00:22.629 Info HttpClient: Http response 200 from https://api.themoviedb.org/3/tv/14880?api_key=‌f6bd687ffa63cd282b6ff2c6877f2669‌&append_to_response=alternative_titles,reviews,credits,images,keywords,external_ids,videos,content_ratings,episode_groups&language=en-CA&include_image_language=en-CA,null after 108ms
embyserver.txt-511-2026-04-05 00:00:22.630 Info HttpClient: GET https://api.themoviedb.org/3/tv/14880/season/0?api_key=‌f6bd687ffa63cd282b6ff2c6877f2669‌&append_to_response=images,keywords,external_ids,credits,videos&language=en-CA&include_image_language=en-CA,null
embyserver.txt-512-2026-04-05 00:00:22.698 Info HttpClient: Http response 200 from http://download1078.mediafire.com/uxri2ox9r33g50hGPj746QDgBsWdiDmNU3N1gqHmPyEXraI6PskNbd3pwjihjgg8rHEqPKouhJyTQUUeqUCh6zQv0H-JNRCc01FIvzEk8nOCelHr9i1BWPBUzv-gNHI9w8cgNsj4U81jne5flrPDUrsoaL_gNJg5mM9-Znbn5EsS/d29cjpoz9osq8kk/10228 after 169ms
embyserver.txt-513-2026-04-05 00:00:22.735 Info HttpClient: Http response 200 from https://api.themoviedb.org/3/tv/14880/season/0?api_key=‌f6bd687ffa63cd282b6ff2c6877f2669‌&append_to_response=images,keywords,external_ids,credits,videos&language=en-CA&include_image_language=en-CA,null after 105ms
embyserver.txt-514-2026-04-05 00:00:22.736 Info HttpClient: GET https://api.themoviedb.org/3/tv/14880/season/1?api_key=‌f6bd687ffa63cd282b6ff2c6877f2669‌&append_to_response=images,keywords,external_ids,credits,videos&language=en-CA&include_image_language=en-CA,null
embyserver.txt-515-2026-04-05 00:00:22.764 Info App: TV Theme Videos ffmpeg path : /bin/ffmpeg
embyserver.txt:516:2026-04-05 00:00:22.764 Info App: TV Theme Videos ffmpeg params : -i "/var/emby/cache/cache/temp/155720b6-f383-498d-ba98-d565da89ef46.tmp" -map_metadata -1 -vcodec copy -acodec aac -strict experimental -ac 2 -ar 44100 -ab 128000 -af "aresample=async=1000,volume=-6dB" "/var/emby/cache/cache/temp/155720b6-f383-498d-ba98-d565da89ef46.tmp.mkv
embyserver.txt-517-2026-04-05 00:00:22.840 Info HttpClient: Http response 200 from https://api.themoviedb.org/3/tv/14880/season/1?api_key=‌f6bd687ffa63cd282b6ff2c6877f2669‌&append_to_response=images,keywords,external_ids,credits,videos&language=en-CA&include_image_language=en-CA,null after 104ms
embyserver.txt-518-2026-04-05 00:00:22.955 Info HttpClient: GET https://api.themoviedb.org/3/tv/19614?api_key=‌f6bd687ffa63cd282b6ff2c6877f2669‌&append_to_response=alternative_titles,reviews,credits,images,keywords,external_ids,videos,content_ratings,episode_groups&language=en-CA&include_image_language=en-CA,null
embyserver.txt-519-2026-04-05 00:00:23.064 Info HttpClient: Http response 200 from https://api.themoviedb.org/3/tv/19614?api_key=‌f6bd687ffa63cd282b6ff2c6877f2669‌&append_to_response=alternative_titles,reviews,credits,images,keywords,external_ids,videos,content_ratings,episode_groups&language=en-CA&include_image_language=en-CA,null after 109ms
[20:12:49] root@emby:/home/docker/config/media/emby/logs#

and killing the processes revived the server. I have now disabled these as they are not currently functioning for me on the latest beta version of emby.

Looking at this there are clearly a few bugs that need to be fixed:

1. Fix the Missing Quote in FFmpeg Params (if its not a log error): In the plugin code where the ffmpeg arguments are built for transcoding (aresample=async=1000...), a closing quotation needs to be added to the output file path.

Quote

embyserver.txt:516:2026-04-05 00:00:22.764 Info App: TV Theme Videos ffmpeg params : -i "/var/emby/cache/cache/temp/155720b6-f383-498d-ba98-d565da89ef46.tmp" -map_metadata -1 -vcodec copy -acodec aac -strict experimental -ac 2 -ar 44100 -ab 128000 -af "aresample=async=1000,volume=-6dB" "/var/emby/cache/cache/temp/155720b6-f383-498d-ba98-d565da89ef46.tmp.mkv

there is no quote at the end?

2. Add the -nostdin flag to FFmpeg: Any background ffmpeg process spawned by a plugin MUST include the -nostdin flag. This prevents ffmpeg from hanging indefinitely if a pipe breaks or an argument is malformed. Because the plugin waits on this process, the infinite loop starves Emby's internal worker threads, which is what eventually causes the entire Emby web UI to freeze This i think would have helped prevent the above bug from causing these issues so its a good guard against them in the future.

3. Handle Existing Files: Wrap the File.Move operations in a try/catch block or check if (File.Exists(destination)) before attempting to move the processed .tmp file to the media directory.

4. Handle broken links/and network io exceptions.

please let me know if you need anything else (like the full emby server logs), if i'm mistaken and there is something else going on here

and when they have been address so i can re-enable the plugins @radeon

outside that thanks for the plugins as they have been running for years on a very large library downloading A LOT of data and this is the first issue i've had like this.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...