ankenyr / jellyfin-youtube-metadata-plugin

Youtube Metadata Plugin for Jellyfin
GNU Affero General Public License v3.0
522 stars 33 forks source link

Thumbnails all the same #87

Closed eximo84 closed 6 months ago

eximo84 commented 1 year ago

I'm using the latest version of the plugin. My files are all in the same directory

Each video has the video, info.json and thumbnail with the same name.

image

However my library shows same image for each video

image

I saw on old post saying too use jpg rather than the default but seems to have made no difference to me here.

eximo84 commented 1 year ago
2023-07-30 07:03:10.916 +00:00] [ERR] [35] MediaBrowser.Providers.Movies.MovieMetadataService: Error in "YoutubeMetadata"
System.IO.FileNotFoundException: Could not find file '/media/YouTube/video/Disney - 20170417 - Tsum Tsum Cooking | Tsum Tsum Shorts | Disney [82aYy4EnIDU].info.json'.
File name: '/media/YouTube/video/Disney - 20170417 - Tsum Tsum Cooking | Tsum Tsum Shorts | Disney [82aYy4EnIDU].info.json'
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
   at Interop.CheckIo(Error error, String path, Boolean isDirectory, Func`2 errorRewriter)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
   at System.IO.File.InternalReadAllText(String path, Encoding encoding)
   at Jellyfin.Plugin.YoutubeMetadata.Utils.ReadYTDLInfo(String fpath, CancellationToken cancellationToken)
   at Jellyfin.Plugin.YoutubeMetadata.Providers.AbstractYoutubeLocalProvider`2.GetMetadata(ItemInfo info, IDirectoryService directoryService, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.RefreshWithProviders(MetadataResult`1 metadata, TIdType id, MetadataRefreshOptions options, ICollection`1 providers, ItemImageProvider imageService, CancellationToken cancellationToken)
[2023-07-30 07:03:10.941 +00:00] [ERR] [35] MediaBrowser.Providers.Movies.MovieMetadataService: Error in "YoutubeMetadata"
System.IO.FileNotFoundException: youtube-dl not found on path!
   at NYoutubeDL.Services.PreparationService.SetupPrepare(YoutubeDLP ydl)
   at NYoutubeDL.Services.InfoService.GetDownloadInfoAsync(YoutubeDLP ydl, CancellationToken cancellationToken)
   at NYoutubeDL.Services.PreparationService.PrepareDownloadAsync(YoutubeDLP ydl, CancellationToken cancellationToken)
   at NYoutubeDL.Services.DownloadService.DownloadAsync(YoutubeDLP ydl, CancellationToken cancellationToken)
   at NYoutubeDL.Services.DownloadService.DownloadAsync(YoutubeDLP ydl, String url, CancellationToken cancellationToken)
   at NYoutubeDL.YoutubeDLP.DownloadAsync(String videoUrl)
   at Jellyfin.Plugin.YoutubeMetadata.Utils.YTDLMetadata(String id, IServerApplicationPaths appPaths, CancellationToken cancellationToken)
   at Jellyfin.Plugin.YoutubeMetadata.Providers.YTDLMovieProvider.GetAndCacheMetadata(String id, IServerApplicationPaths appPaths, CancellationToken cancellationToken)
   at Jellyfin.Plugin.YoutubeMetadata.Providers.AbstractYoutubeRemoteProvider`3.GetMetadata(E info, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.ExecuteRemoteProviders(MetadataResult`1 temp, String logName, TIdType id, IEnumerable`1 providers, CancellationToken cancellationToken)
[2023-07-30 07:03:11.032 +00:00] [ERR] [39] MediaBrowser.Providers.Movies.MovieMetadataService: Error in "YoutubeMetadata"
System.IO.FileNotFoundException: youtube-dl not found on path!
   at NYoutubeDL.Services.PreparationService.SetupPrepare(YoutubeDLP ydl)
   at NYoutubeDL.Services.InfoService.GetDownloadInfoAsync(YoutubeDLP ydl, CancellationToken cancellationToken)
   at NYoutubeDL.Services.PreparationService.PrepareDownloadAsync(YoutubeDLP ydl, CancellationToken cancellationToken)
   at NYoutubeDL.Services.DownloadService.DownloadAsync(YoutubeDLP ydl, CancellationToken cancellationToken)
   at NYoutubeDL.Services.DownloadService.DownloadAsync(YoutubeDLP ydl, String url, CancellationToken cancellationToken)
   at NYoutubeDL.YoutubeDLP.DownloadAsync(String videoUrl)
   at Jellyfin.Plugin.YoutubeMetadata.Utils.YTDLMetadata(String id, IServerApplicationPaths appPaths, CancellationToken cancellationToken)
   at Jellyfin.Plugin.YoutubeMetadata.Providers.YTDLMovieProvider.GetAndCacheMetadata(String id, IServerApplicationPaths appPaths, CancellationToken cancellationToken)
   at Jellyfin.Plugin.YoutubeMetadata.Providers.AbstractYoutubeRemoteProvider`3.GetMetadata(E info, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.ExecuteRemoteProviders(MetadataResult`1 temp, String logName, TIdType id, IEnumerable`1 providers, CancellationToken cancellationToken)
eximo84 commented 1 year ago

So noticed this file the image and json had .mp4 in the file name. Removed that and the thumbnail applied correctly.

However as you can see from my file list the webp images don't contain the video file extension in the name so these should work.

I'll try downloading a jpg version.

dreamonates commented 1 year ago

i am having this same issue.

Narco-AI commented 1 year ago

Facing the same issue.

Command log:

When using "best" instead of bestvideo all the thumbnails load perfectly, but when "bestvideo" is used - all thumbnails do appear to be same.

Issue : "best" instead of "bestvideo" doesn't provide the desired quality.

yt-dlp --format "best[height<=400]+bestaudio/best" --add-metadata --embed-thumbnail --output '%(title)s [%(id)s]%(title)s [%(id)s].%(ext)s' --write-sub --write-info-json --restrict-filenames url

JacobDK8200 commented 1 year ago

Same issue.

Any workaround? Thanks.

ankenyr commented 1 year ago
System.IO.FileNotFoundException: youtube-dl not found on path!

This is likely a problem.

muava12 commented 1 year ago

any solution for this issue?? i face same problem

ankenyr commented 6 months ago

If you are getting the error then it is because you do not have youtube-dlp available for the plugin to use.