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

'Could not find file X.info.json' #99

Open
swiftbird07 opened this issue Jan 18, 2024 · 2 comments
Open

'Could not find file X.info.json' #99

swiftbird07 opened this issue Jan 18, 2024 · 2 comments

Comments

@swiftbird07
Copy link

Hello,

to be honest I am a bit unsure if I understand the premise of this plugin correctly. As I understand it, you can provide the .info.json files in addition to the .mp4 files of the same name so that the plugin will parse the metadata locally or you could make the plugin fetch the .info.json file on its own using yt-dlp when the file is not present. If thats the case it will use the Youtube video ID in the square brackets to get the right video.
If my assumption is correct, then why wont it do latter to my videos?

Here is the error message:

System.IO.FileNotFoundException: Could not find file '/media/YOUTUBE-DL/Favoriten/The Verge's $2000 PC Build Reaction Supercut [M-2Scfj4FZk].info.json'.
File name: '/media/YOUTUBE-DL/Favoriten/The Verge's $2000 PC Build Reaction Supercut [M-2Scfj4FZk].info.json'
   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)

I find this error confusing as I assumed it would try to get that .info.json itself if it can't find it, but the error seems to suggest otherwise.

I am using Jellyfin via docker and I confirmed that yt-dlp is accessible from inside the container:

docker exec -it -u root jellyfin /bin/bash
root@hdocker:/# yt-dlp

Usage: yt-dlp [OPTIONS] URL [URL...]

yt-dlp: error: You must provide at least one URL.
Type yt-dlp --help to see a list of all options.
@rukuh
Copy link

rukuh commented Feb 4, 2024

I just ran into this same issue and what resolved it for me was installing yt-dlp from pip rather than apt-get. Seems like the version from the apt repository is outdated...

apt-cache policy yt-dlp for me showed that the version that would be installed would have been 2022.04.08-1. The pip version I just install was 2023.12.30.

And regarding the error, the plugin just tries to find a local version and throws error if it doesn't, then tries to fetch from remote.

@prahal
Copy link

prahal commented May 20, 2024

@swiftbird07 You could try to "yt-dlp https://www.youtube.com/watch?v=M-2Scfj4FZk" from the container. But indeed too old broken yt-dlp in the container is likely. Otherwise, a network being down prevents yt-dlp from getting to YouTube.
Or still, it could be a bug in the plugin.
You might want to ask Jellyfin to have stable-backports added to the Jellyfin image.
/etc/apt/sources.list.d/debian-backports.list

Types: deb deb-src
URIs: http://deb.debian.org/debian
Suites: bookworm bookworm-updates bookworm-backports
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

then apt update
You should then be able to install newer Debian yt-dlp

Debian yt-dlp https://tracker.debian.org/pkg/yt-dlp

You should provide way more of the log. The extract you provided cannot help us understand what happened (only that the info.json was not there).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants