ankenyr / jellyfin-youtube-metadata-plugin

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

Not retrieving any metadata at all #79

Closed Fletcher-Alderton closed 10 months ago

Fletcher-Alderton commented 1 year ago

I installed yt-dlp with sudo apt-get install yt-dlp and it worked fine I then added the repository in jelly fin, installed, restarted, and checked all the boxes for it to be used for my yt folder. I tried manual adding the video id into the youtube-metadata field in jellyfin, but still no luck.

ankenyr commented 1 year ago

Do you have any logs? It would be helpful to turn on debugging and provide logs.

Mhowser commented 1 year ago

Here is mine:

[21:42:54] [ERR] [18] MediaBrowser.Providers.Movies.MovieMetadataService: Error in YoutubeMetadata
System.IO.DirectoryNotFoundException: Could not find a part of the path '/home/deck/Vaults/jellyfin-media-server/cache/youtubemetadata/CUO8secmc0g/ytvideo.info.json'.
   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 System.IO.Abstractions.FileWrapper.ReadAllText(String path)
   at Jellyfin.Plugin.YoutubeMetadata.Providers.AbstractYoutubeRemoteProvider`3.ReadYTDLInfo(String fpath, 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)
[21:43:09] [INF] [56] Emby.Drawing.ImageProcessor: Creating image collage and saving to /home/deck/Vaults/jellyfin-media-server/cache/temp/180b70fb85d34ab18314d52b810a3cb7.png
[21:43:09] [INF] [56] Emby.Drawing.ImageProcessor: Completed creation of image collage and saved to /home/deck/Vaults/jellyfin-media-server/cache/temp/180b70fb85d34ab18314d52b810a3cb7.png
[21:43:10] [ERR] [57] MediaBrowser.Providers.Movies.MovieMetadataService: Error in YoutubeMetadata
System.IO.FileNotFoundException: Could not find file '/run/media/deck/Teradrive/Videos/Youtube/Vangrant Holiday/Elevator Man [lNN6ArYzLAuC].info.json'.
File name: '/run/media/deck/Teradrive/Videos/Youtube/Vangrant Holiday/Elevator Man [lNN6ArYzLAuC].info.json'
   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)
[21:43:10] [INF] [57] Jellyfin.Plugin.YoutubeMetadata.Providers.YTDLMovieProvider: YTDL GetMetadata: Youtube ID not found in filename of title: {info.Name}
[21:43:21] [ERR] [62] MediaBrowser.Providers.Movies.MovieMetadataService: Error in YoutubeMetadata
System.IO.DirectoryNotFoundException: Could not find a part of the path '/home/deck/Vaults/jellyfin-media-server/cache/youtubemetadata/CUO8secmc0g/ytvideo.info.json'.
   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 System.IO.Abstractions.FileWrapper.ReadAllText(String path)
   at Jellyfin.Plugin.YoutubeMetadata.Providers.AbstractYoutubeRemoteProvider`3.ReadYTDLInfo(String fpath, 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)
[21:43:25] [INF] [18] Emby.Server.Implementations.IO.LibraryMonitor: Vangrant Holiday (/run/media/deck/Teradrive/Videos/Youtube/Vangrant Holiday) will be refreshed.
[21:43:36] [ERR] [49] MediaBrowser.Providers.Movies.MovieMetadataService: Error in YoutubeMetadata
System.IO.DirectoryNotFoundException: Could not find a part of the path '/home/deck/Vaults/jellyfin-media-server/cache/youtubemetadata/CUO8secmc0g/ytvideo.info.json'.
   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 System.IO.Abstractions.FileWrapper.ReadAllText(String path)
   at Jellyfin.Plugin.YoutubeMetadata.Providers.AbstractYoutubeRemoteProvider`3.ReadYTDLInfo(String fpath, 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)

Even manually downloading the info.json files didnt work. yt-dlp --no-download --write-info-json --cookies-from-browser [REDACTED] --progress -I 1-8 https://www.youtube.com/watch?v=BVSJvfitmuQ&list=PLphDhroSqrPWi6RbljtGPnl8xr0pmzyb_&pp=iAQB

ankenyr commented 1 year ago

When you say

Even manually downloading the info.json files didn't work

What do you exactly mean? The error message says that a directory does not exist. Have you tried looking to see if /home/deck/Vaults/jellyfin-media-server/cache/youtubemetadata/CUO8secmc0g exists? Or and of the parent directories?

I really cannot do anything without being able to reproduce issues or understand what the root cause is.

ankenyr commented 10 months ago

Closing due to no response.