GithubHelp home page GithubHelp logo

jellyfin-youtube-metadata-plugin's Introduction

Release version CI Status Donate

Jellyfin Youtube Metadata Plugin

Overview

Plugin for Jellyfin that retrieves metadata for content from Youtube.

Features

  • Local provider uses the info.json files provided from yt-dlp or similar programs.
  • Remote provider uses yt-dlp to download info.json files.
  • Supports thumbnails of jpg or webp format for both channel and videos
  • Supports the following library types
    • Movies
    • Music Videos
    • Shows
  • Supports ExternalID providing quick links to source of metadata.

Requirements

  • yt-dlp is required if you are using the remote provider.

Installation

Prerequirements

You are required to have yt-dlp available on the system or container Jellyfin is running on. The following are examples of how you could do this depending on your setup and are not to be considered an exhaustive list.

Installing from package manager

sudo apt-get install yt-dlp

Installing in a container

$ docker exec -it -u root jellyfin bash
$ curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /bin/yt-dlp
$ chmod a+rx /bin/yt-dlp
$ apt update && apt install --no-install-recommends --no-install-suggests python3

Building a docker image depending on YT-DLP

FROM linuxserver/jellyfin:nightly
RUN apt-get update && apt-get install -y \
    python3-pip
RUN python3 -m pip install -U yt-dlp

Installing From Repository (Recommended)

  1. Go to the Admin Dashboard.
  2. In the left navigation menu, click on Plugins.
  3. In the top menu, click Repositories.
  4. Click the + icon to add a new repository.
  5. Repository Name can be anything.
  6. URL must be https://raw.githubusercontent.com/ankenyr/jellyfin-plugin-repo/master/manifest.json
  7. If done correctly you should see a new repository on the page.
  8. In the top menu, navigate to Catalog.
  9. Under the Metadata section click on YoutubeMetadata.
  10. Click Install.
  11. Restart Jellyfin.
  12. On the left navigation menu, click on Plugins.
  13. If successful, you will see YoutubeMetadata with status as Active

Manual Installation (Hard)

  1. Navigate to the releases page.
  2. Download the latest zip file.
  3. Unzip contents into <jellyfin data directory>/plugins/YoutubeMetadata.
  4. Restart Jellyfin.
  5. On the left navigation menu, click on Plugins.
  6. If successful, you will see YoutubeMetadata with status as Active

Usage

File Naming Requirements

All media needs to have the ID embeded in the file name within square brackets. The following are valid examples of a channel and video.

  • 3Blue1Brown - NA - 3Blue1Brown_-_Videos [UCYO_jab_esuFRV4b17AJtAw].info.json
  • 3Blue1Brown - 20211023 - A_few_of_the_best_math_explainers_from_this_summer [F3Qixy-r_rQ].mkv

info.json and image files need to have the same file name as the media file. As an example, this would cause a breakage

  • 3Blue1Brown - 20211023 - A_few_of_the_best_math_explainers_from_this_summer [F3Qixy-r_rQ].mkv
  • 3Blue1Brown - 20211023 [F3Qixy-r_rQ].info.json

The proper naming format is the default when using yt-dlp and is also enforced in TheFrenchGhosty's Ultimate YouTube-DL Scripts Collection which I highly recommend.

Enabling Provider

  1. Navigate to your Admin Dashboard.
  2. On the left navigation menu, click Libraries.
  3. Click on Threedots for a supported library type.
  4. Click Manage library.
  5. Click the checkbox next to YoutubeMetadata for each downloader or fetcher you wish to enable. In the image below you can see two enabled. Library Fetchers
  6. Click OK.
  7. Click Scan All Libraries.

Providing Cookies to YT-DLP

Warning your cookie grants access to accounts the cookie is granted for. Please protect this file if you decide to use it. Placing a file named cookies.txt into the <jellyfin data directory>/plugins/YoutubeMetadata plugin directory will enable YT-DLP to start using your cookie.

Build and Installing from source

  1. Clone or download this repository.
  2. Ensure you have .NET Core SDK setup and installed.
  3. Build plugin with following command.
    dotnet publish --configuration Release --output bin
    
  4. Create folder named YoutubeMetadata in the plugins directory inside your Jellyfin data directory. You can find your directory by going to Dashboard, and noticing the Paths section. Mine is the root folder of the default Metadata directory.
    # mkdir <Jellyfin Data Directory>/plugins/YoutubeMetadata/
    
    
  5. Place the resulting files from step 3 in the plugins/YoutubeMetadata folder created in step 4.
    # cp -r bin/*.dll <Jellyfin Data Directory>/plugins/YoutubeMetadata/`
    
  6. Be sure that the plugin files are owned by your jellyfin user:
    # chown -R jellyfin:jellyfin /var/lib/jellyfin/plugins/YoutubeMetadata/
    
  7. If performed correctly you will see a plugin named YoutubeMetadata in Admin -> Dashboard -> Advanced -> Plugins.

Donations

If this plugin helps you, please consider a donation! You can use my ko-fi link. If you would rather donate in some way not supported yet, let me know how you would like to donate.

jellyfin-youtube-metadata-plugin's People

Contributors

7596ff avatar ankenyr avatar jgoguen avatar krutburken avatar nalsai avatar oddstr13 avatar simcop2387 avatar thefrenchghosty avatar wjbridge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jellyfin-youtube-metadata-plugin's Issues

Status: NotSupported

In my Admin Dashboard > Advanced > Plugins, the YouTubeMetadata plugin's status is listed as "NotSupported" instead of "Active". Because of that, YouTube isn't listed as a metadata provider source in the library settings.

Jellyfin version: 10.8.0 Beta, Docker
YouTube Metadata version: 10.3.6

Fetcher is available for Movie library but not Shows

I can't seem to enable the plugin for a Shows library even though it's listed as a supported library type in the README.

Active plugin (installed via repository):

image

Movie metadata downloaders/fetchers:

image

Shows metadata downloaders/fetchers:

image

Better documentation of features

I love this plugin, but the documentation leaves the user wondering what it actually does prior to installing. Does it populate each video with the title from the youtube video? The description? The thumbnail?

All videos within a folder get the same metadata

I have youtube videos arranged by channel, with the IDs in square brackets and accompanying info.json files:

image

But when jellyfin runs, the youtube provider gives every video in the folder the same metadata, even though the info.json files are correct:

image

I haven't been able to find much in the way of logs to debug this, so any pointers would be greatly appreciated.

Some thumbnails not showing

Setup
I have youtube-DL configured to output info.json files and thumbnails with the same filename as the video. The Jellyfin library is only using the YouTube-DL Image Metadata provider wherever possible.
Jellyfin running on Docker and all volumes are owned by the jellyfin user.

Screenshot of Jellyfin with two video's lacking thumbnails.
image

The files on the filesystem look perfect to me:
image

Looking at the logs show some funky business: Full Log

[2022-02-20 19:26:07.347 +00:00] [ERR] [16] MediaBrowser.Providers.Manager.ProviderManager: "YTDLImageProvider" failed in GetImageInfos for type "Movie" at "/media/Gold Shaw Farm/How to Build a Farm in 6 MONTHS [UVTks4xacsg].mp4"
System.IO.FileNotFoundException: youtube-dl not found on path!
   at NYoutubeDL.Services.PreparationService.SetupPrepare(YoutubeDL ydl)
   at NYoutubeDL.Services.InfoService.GetDownloadInfoAsync(YoutubeDL ydl, CancellationToken cancellationToken)
   at NYoutubeDL.Services.PreparationService.PrepareDownloadAsync(YoutubeDL ydl, CancellationToken cancellationToken)
   at NYoutubeDL.Services.DownloadService.DownloadAsync(YoutubeDL ydl, CancellationToken cancellationToken)
   at NYoutubeDL.Services.DownloadService.DownloadAsync(YoutubeDL ydl, String url, CancellationToken cancellationToken)
   at NYoutubeDL.YoutubeDL.DownloadAsync(String videoUrl)
   at Jellyfin.Plugin.YoutubeMetadata.Utils.YTDLMetadata(String id, IServerApplicationPaths appPaths, CancellationToken cancellationToken)
   at Jellyfin.Plugin.YoutubeMetadata.Providers.YTDLImageProvider.GetImages(BaseItem item, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.ProviderManager.GetImages(BaseItem item, IRemoteImageProvider provider, IReadOnlyCollection`1 preferredLanguages, CancellationToken cancellationToken, Nullable`1 type)

Jellyfin 10.8 Plugin NotSupported

Earlier today, Jellyfin 10.8 officially out but the plugin status show as "NotSupported"

Tried both linuxserver and jellyfin docker images. Same result.

Platform: linux
method: docker installation

Could not find a part of the path '/cache/youtubemetadata/[VIDEOID]/ytvideo.info.json'.

When refreshing the metadata of a video, this error triggers.

/cache/ is my cache folder
/cache/youtubemetadata/ does exist.

Jellyfin indeed has permission to write to it.

Using the latest Jellyfin Beta (running in docker)

[19:25:38] [ERR] [91] MediaBrowser.Providers.Movies.MovieMetadataService: Error in YoutubeMetadata
System.IO.DirectoryNotFoundException: Could not find a part of the path '/cache/youtubemetadata/[VIDEOID]/ytvideo.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 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)
[19:25:38] [ERR] [13] MediaBrowser.Providers.Manager.ProviderManager: YTDLImageProvider failed in GetImageInfos for type Movie at /path/to/file.mkv
System.IO.DirectoryNotFoundException: Could not find a part of the path '/cache/youtubemetadata/[VIDEOID]/ytvideo.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.YoutubeDL.YTDLImageProvider.GetImages(BaseItem item, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.ProviderManager.GetImages(BaseItem item, IRemoteImageProvider provider, String preferredLanguage, Boolean includeAllLanguages, CancellationToken cancellationToken, Nullable`1 type)

Feature Request: Group into Channels

I just installed the Plugin and it does work fine in pulling the metadata from Youtube.

However I have quite a lot of content downloaded from various channels. Now there are some 600+ youtube videos in one big library, all mixed together.

Would it be possible to group them by channel, a bit like TV Shows, where a channel could even be grouped into Seasons (year?) and Episodes?

No metadata is downloaded

I'm guessing this issue is related to #11

I installed the addon, added the dll linked in #11 (comment) and it's correctly appearing in the plugin list, I added my API key and created a library with the right settings, however absolutely no metadata seems to be downloaded.

Example:

Filename: Linus Tech Tips - 20200724 - Oh No Intel!! NOT AGAIN - WAN Show July 24, 2020 [kt78qhcnmQo].mkv

Downloaded with my script: https://github.com/TheFrenchGhosty/TheFrenchGhostys-YouTube-DL-Archivist-Scripts/blob/master/Linux%20-%20OSX/Watch%20on%20Mobile%20Devices%20Script/Watch%20on%20Mobile%20Devices.sh

screenshot

cant grab image

this is file name: Marco Mengoni [ARqpqyA49y0].mp4

i can grab metadata but not image ..

in log:
[2020-11-16 16:47:33.367 +01:00] [INF] Youtube ID not found in filename of title: Marco Mengoni - Ti ho voluto bene veramente (Videoclip)

edit:
if i rename file in: [2020-11-16 16:58:53.922 +01:00] [INF] "Marco Mengoni - Ti ho voluto bene veramente (Videoclip)" ("/mnt/Data/Youtube/Marco Mengoni - Ti ho voluto bene veramente (Videoclip) - [ARqpqyA49y0].mp4") will be refreshed.
[2020-11-16 16:58:55.716 +01:00] [INF] OnRefreshStart "d67e73cb8baba58147c176d2a58b99a3"
[2020-11-16 16:58:55.773 +01:00] [INF] OnRefreshStart "3755c5179a13376b537883cfce5442dd"
[2020-11-16 16:58:55.774 +01:00] [INF] OnRefreshComplete "3755c5179a13376b537883cfce5442dd"
[2020-11-16 16:58:55.824 +01:00] [INF] OnRefreshComplete "d67e73cb8baba58147c176d2a58b99a3"

i dont have "id not found" error, but image is not grabbed yet.
all metadata are there

Wrong Metadata

It seems with the new release on Jellyfin 10.8 the plugin is matching incorrectly. I've tried 10+ different videos today alone and they are all matched incorrectly. Previous released worked fine.

Possible to add support for alt filenames?

I use a youtube archiver called tubearchivist. Really nice app that id linke to get into jellyfin. However it uses the following to save files

20170509_cdai_HkKpyM_DeWalt DWE6423 Random Orbit Sander vs Hyper Tough.mp4
20170825_I5u2vmcXXxQ_WEN 6530 Electric Planer Unboxing.mp4

Is it feasable to make the placement and or delimeters for the id configurable or add a switch for tubearchivist?

Support for 10.7.0

Is this planned? 1.0.2.2 currently errors out when loading on 10.7.0-rc1

Add Music Video library support

Could there be an ID field in the identify tab of a video?
Also, how should the file be called? The Youtube-dl name? Only the video title? The id? Please clarify this in the readme.
Could support be added to a Music Video library?

Add a license

It would be nice if you could add a license to the project.

I recommend any GPL license (Jellyfin use GPL 2.0), or public domain (using the Unlicense) but something else is fine.

[Feature Request] - Support other ID's from youtube-dlp

Dunno how feasible this is as I'm not sure how youtube-dlp requests the meta data. My info.json files from these channels seems to have at least title and a description, and I do get an image.

I'd provide more but I've only happened to grab channels from one other source.

Also... I don't know C# but this code looked relatively easy to change, if it's just the regex that needs sorting, so no trouble in me submitting a PR.

Odysey ID: f59986710f2f085c28a7127d3203ef64bf28b04f

If it means supporting each individual site then don't personally think it's worth it considering the name of the plugin.

Audio content

Hello, I am just wondering if this was intended to work with music libraries as well?

I have audio-only files with correct formatted titles and am not observing thumbnails after a scan.

Thanks!

Use Youtube-dl json files and thumbnails where available.

This should be an option enabled in the plugin. If you are using the youtube-dl program you can ask it to save a copy of the metadata it found as a file and thumbnails. The json file is not the same as what is retrieved via the API.

Plugin Repository

Hi,

are there any plans to create a plugin repository for this? ( or if not maybe add it to an existing one (official or 3rd party)? https://jellyfin.org/docs/general/server/plugins/index.html )
It's a lot easier to just add a repo to jellyfin and always have up-to-date versions of the plugins instead of manually adding the files to the plugin file directory every time a new update is released. (especially tedious with multiple plugins)

Thanks!

Jellyfin 10.8 Not Supported

I'm trying to get this plugin to work on the latest unstable docker image (Jellyfin 10.8) and am getting a status message that says Not Supported. I'm not sure if there are any logs or anything that I could upload but I would really appreciate getting this working with the unstable build since it dramatically decreases loading times.

Incompatibility with JF v10.6.0

I had the plugin running on 10.5.5 x64 working correctly...

But I updated to v10.6.0 x64 and the plugin doesn't register on the plugin page...

[2020-07-25 02:48:01.596 -05:00] [INF] [1] Main: Jellyfin version: "10.6.0"
[2020-07-25 02:48:01.638 -05:00] [INF] [1] Main: Environment Variables: ["[JELLYFIN_LOG_DIR, C:\ProgramData\Jellyfin\Server\log]"]
[2020-07-25 02:48:01.676 -05:00] [INF] [1] Main: Arguments: ["C:\Program Files\Jellyfin\Server\jellyfin.dll", "--service", "--datadir", "C:\ProgramData\Jellyfin\Server"]
[2020-07-25 02:48:01.685 -05:00] [INF] [1] Main: Operating system: "Windows"
[2020-07-25 02:48:01.689 -05:00] [INF] [1] Main: Architecture: X64
[2020-07-25 02:48:01.693 -05:00] [INF] [1] Main: 64-Bit Process: True
[2020-07-25 02:48:01.697 -05:00] [INF] [1] Main: User Interactive: True
[2020-07-25 02:48:01.700 -05:00] [INF] [1] Main: Processor count: 8
[2020-07-25 02:48:01.703 -05:00] [INF] [1] Main: Program data path: "C:\ProgramData\Jellyfin\Server"
[2020-07-25 02:48:01.707 -05:00] [INF] [1] Main: Web resources path: "C:\Program Files\Jellyfin\Server\jellyfin-web"
[2020-07-25 02:48:01.710 -05:00] [INF] [1] Main: Application directory: "C:\Program Files\Jellyfin\Server"
[2020-07-25 02:48:03.488 -05:00] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: "C:\ProgramData\Jellyfin\Server\cache"
[2020-07-25 02:48:03.766 -05:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies
[2020-07-25 02:48:04.917 -05:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loaded assembly "Jellyfin.Plugin.Anime, Version=9.0.0.0, Culture=neutral, PublicKeyToken=null" from "C:\ProgramData\Jellyfin\Server\plugins\Anime\Jellyfin.Plugin.Anime.dll"
[2020-07-25 02:48:04.995 -05:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loaded assembly "Jellyfin.Plugin.Fanart, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null" from "C:\ProgramData\Jellyfin\Server\plugins\Fanart\Jellyfin.Plugin.Fanart.dll"
[2020-07-25 02:48:05.054 -05:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loaded assembly "Jellyfin.Plugin.OpenSubtitles, Version=9.0.0.0, Culture=neutral, PublicKeyToken=null" from "C:\ProgramData\Jellyfin\Server\plugins\Open Subtitles\Jellyfin.Plugin.OpenSubtitles.dll"
[2020-07-25 02:48:05.126 -05:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loaded assembly "OpenSubtitlesHandler, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" from "C:\ProgramData\Jellyfin\Server\plugins\Open Subtitles\OpenSubtitlesHandler.dll"
[2020-07-25 02:48:05.198 -05:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loaded assembly "Jellyfin.Plugin.TMDbBoxSets, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null" from "C:\ProgramData\Jellyfin\Server\plugins\TMDb Box Sets\Jellyfin.Plugin.TMDbBoxSets.dll"
[2020-07-25 02:48:05.335 -05:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loaded assembly "Trakt, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null" from "C:\ProgramData\Jellyfin\Server\plugins\Trakt\Trakt.dll"
[2020-07-25 02:48:05.345 -05:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loaded assembly "Google.Apis.Auth, Version=1.45.0.0, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab" from "C:\ProgramData\Jellyfin\Server\plugins\YoutubeMetadata\Google.Apis.Auth.dll"
[2020-07-25 02:48:05.523 -05:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loaded assembly "Google.Apis.Auth.PlatformServices, Version=1.45.0.0, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab" from "C:\ProgramData\Jellyfin\Server\plugins\YoutubeMetadata\Google.Apis.Auth.PlatformServices.dll"
[2020-07-25 02:48:05.528 -05:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loaded assembly "Google.Apis.Core, Version=1.45.0.0, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab" from "C:\ProgramData\Jellyfin\Server\plugins\YoutubeMetadata\Google.Apis.Core.dll"
[2020-07-25 02:48:05.692 -05:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loaded assembly "Google.Apis, Version=1.45.0.0, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab" from "C:\ProgramData\Jellyfin\Server\plugins\YoutubeMetadata\Google.Apis.dll"
[2020-07-25 02:48:05.701 -05:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loaded assembly "Google.Apis.YouTube.v3, Version=1.45.0.1905, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab" from "C:\ProgramData\Jellyfin\Server\plugins\YoutubeMetadata\Google.Apis.YouTube.v3.dll"
[2020-07-25 02:48:05.727 -05:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loaded assembly "Jellyfin.Plugin.YoutubeMetadata, Version=1.0.2.0, Culture=neutral, PublicKeyToken=null" from "C:\ProgramData\Jellyfin\Server\plugins\YoutubeMetadata\Jellyfin.Plugin.YoutubeMetadata.dll"
[2020-07-25 02:48:05.830 -05:00] [ERR] [1] Emby.Server.Implementations.ApplicationHost: Error loading types from "Jellyfin.Plugin.YoutubeMetadata, Version=1.0.2.0, Culture=neutral, PublicKeyToken=null".
System.TypeLoadException: Could not load type 'MediaBrowser.Controller.Providers.ILocalImageFileProvider' from assembly 'MediaBrowser.Controller, Version=10.6.0.0, Culture=neutral, PublicKeyToken=null'.
at System.Reflection.RuntimeAssembly.GetExportedTypes()
at Emby.Server.Implementations.ApplicationHost.GetTypes(IEnumerable`1 assemblies)+MoveNext()
[2020-07-25 02:48:06.342 -05:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loaded assembly "Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" from "C:\ProgramData\Jellyfin\Server\plugins\YoutubeMetadata\Newtonsoft.Json.dll"
[2020-07-25 02:48:11.754 -05:00] [WRN] [1] Microsoft.EntityFrameworkCore.Model.Validation: The entity type '"AccessSchedule"' is configured to use schema '"jellyfin"'. SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[2020-07-25 02:48:11.760 -05:00] [WRN] [1] Microsoft.EntityFrameworkCore.Model.Validation: The entity type '"ActivityLog"' is configured to use schema '"jellyfin"'. SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[2020-07-25 02:48:11.765 -05:00] [WRN] [1] Microsoft.EntityFrameworkCore.Model.Validation: The entity type '"ImageInfo"' is configured to use schema '"jellyfin"'. SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[2020-07-25 02:48:11.770 -05:00] [WRN] [1] Microsoft.EntityFrameworkCore.Model.Validation: The entity type '"Permission"' is configured to use schema '"jellyfin"'. SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[2020-07-25 02:48:11.775 -05:00] [WRN] [1] Microsoft.EntityFrameworkCore.Model.Validation: The entity type '"Preference"' is configured to use schema '"jellyfin"'. SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[2020-07-25 02:48:11.780 -05:00] [WRN] [1] Microsoft.EntityFrameworkCore.Model.Validation: The entity type '"User"' is configured to use schema '"jellyfin"'. SQLite does not support schemas. This configuration will be ignored by the SQLite provider.

Clarifications regarding info.json/description-files from youtube-dl

I see #1 mention using the local files populated by youtube-dl if you add --write-description --write-info-json as a metadata-source if present.

I am however a little unclear if that would still require the files to be named with the ID in the name or not.

I alredy have a fairly huge library downloaded from youtube, I do have the json/description-files, but I don't have the ID in the name.

Error during installation

I'm getting the following error in the log file of jellyfin when I'm trying to install.

[2020-08-26 01:47:07.620 +00:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loaded assembly "Jellyfin.Plugin.YoutubeMetadata, Version=1.0.2.0, Culture=neutral, PublicKeyToken=null" from "/config/data/plugins/YoutubeMetadata/Jellyfin.Plugin.YoutubeMetadata.dll" [2020-08-26 01:47:07.620 +00:00] [ERR] [1] Emby.Server.Implementations.ApplicationHost: Error loading types from "Jellyfin.Plugin.YoutubeMetadata, Version=1.0.2.0, Culture=neutral, PublicKeyToken=null". System.TypeLoadException: Could not load type 'MediaBrowser.Controller.Providers.ILocalImageFileProvider' from assembly 'MediaBrowser.Controller, Version=10.6.3.0, Culture=neutral, PublicKeyToken=null'. at System.Reflection.RuntimeAssembly.GetExportedTypes() at Emby.Server.Implementations.ApplicationHost.GetTypes(IEnumerable1 assemblies)+MoveNext()`

My year based season folders cause episode title and description to be repeated

Hello, me again :)

I've finally got my library scanned and it seems I've got repeated episode names and titles. They look to be taking a random episode (couldn't see a pattern) from the season folder and re-applying that ID for all episodes in that season folder.

Things I've tried:
Remove all local .nfo files (they did originally have the names set as this, probably from my first scan before the allowance for my specific folder structure)
Multiple library refreshes with replace images and meta data turned on.
Deleting the library and re-adding.
Double checked the ID's in the file names we're indeed matched correctly, and also resulted in the correct youtube video when accessed (didn't trust my script at first aha)

Doesn't seem to be Jellyfin as it's not done this for any other folders.

Additionally they're called episode 1, and have "1." prepended to the title. Gather that's Jellyfin and my date based episode format.

Could not find a part of the path '/cache/youtubemetadata/[VIDEOID]/ytvideo.info.json'

Feel free to reopen the original issue #44. I am getting this same error.

I can also report this on 1.0.3.7.
Docker Image: https://github.com/linuxserver/docker-jellyfin
Jellyfin Version: 10.8

If I look at the cache folder which is /config/cache be default in the linuxserver/docker-jellyfin docker image, I cannot find the youtubemetadata folder. Should this be created by the plugin?

[21:08:23] [ERR] [43] MediaBrowser.Providers.Manager.ProviderManager: YTDLImageProvider failed in GetImageInfos for type Episode at /youtube/Chris Titus Tech [youtube2-UCg6gPGh8HU2U01vaFCAsvmQ]/20220604 - What is your Daily Driver for Privacy feat. Techlore - [x43Clbsp3Rw].mp4
System.IO.DirectoryNotFoundException: Could not find a part of the path '/config/cache/youtubemetadata/x43Clbsp3Rw/ytvideo.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.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, 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.File.ReadAllText(String path)
   at Jellyfin.Plugin.YoutubeMetadata.Utils.ReadYTDLInfo(String fpath, CancellationToken cancellationToken)
   at Jellyfin.Plugin.YoutubeMetadata.Providers.YoutubeDL.YTDLImageProvider.GetImages(BaseItem item, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.ProviderManager.GetImages(BaseItem item, IRemoteImageProvider provider, String preferredLanguage, Boolean includeAllLanguages, CancellationToken cancellationToken, Nullable`1 type)

More logs with debug (changed my cache directory to /cache

[21:28:28] [DBG] [23] Jellyfin.Plugin.YoutubeMetadata.Providers.YTDLEpisodeProvider: YTDL GetMetadata: Not Fresh: kZMoxUyumx0
[21:28:28] [DBG] [23] Jellyfin.Plugin.YoutubeMetadata.Providers.YTDLEpisodeProvider: YTDLEpisodeProvider: GetAndCacheMetadata
[21:28:28] [DBG] [11] MediaBrowser.Providers.TV.EpisodeMetadataService: Running YTDLEpisodeProvider for /youtube/Chris Titus Tech [youtube2-UCg6gPGh8HU2U01vaFCAsvmQ]/20220504 - Fixing my biggest failure - [nDlGkDENCyM].mp4
[21:28:28] [DBG] [11] Jellyfin.Plugin.YoutubeMetadata.Providers.YTDLEpisodeProvider: YTDL GetMetadata: /youtube/Chris Titus Tech [youtube2-UCg6gPGh8HU2U01vaFCAsvmQ]/20220504 - Fixing my biggest failure - [nDlGkDENCyM].mp4
[21:28:28] [DBG] [11] Jellyfin.Plugin.YoutubeMetadata.Providers.YTDLEpisodeProvider: YTDL GetMetadata: Not Fresh: nDlGkDENCyM
[21:28:28] [DBG] [11] Jellyfin.Plugin.YoutubeMetadata.Providers.YTDLEpisodeProvider: YTDLEpisodeProvider: GetAndCacheMetadata
[21:28:28] [DBG] [27] MediaBrowser.Providers.TV.EpisodeMetadataService: Running YTDLEpisodeProvider for /youtube/Chris Titus Tech [youtube2-UCg6gPGh8HU2U01vaFCAsvmQ]/20220514 - The Best Windows Tool for 2022 - [tPRv-ATUBe4].mp4
[21:28:28] [DBG] [27] Jellyfin.Plugin.YoutubeMetadata.Providers.YTDLEpisodeProvider: YTDL GetMetadata: /youtube/Chris Titus Tech [youtube2-UCg6gPGh8HU2U01vaFCAsvmQ]/20220514 - The Best Windows Tool for 2022 - [tPRv-ATUBe4].mp4
[21:28:28] [DBG] [27] Jellyfin.Plugin.YoutubeMetadata.Providers.YTDLEpisodeProvider: YTDL GetMetadata: Not Fresh: tPRv-ATUBe4
[21:28:28] [DBG] [27] Jellyfin.Plugin.YoutubeMetadata.Providers.YTDLEpisodeProvider: YTDLEpisodeProvider: GetAndCacheMetadata
[21:28:28] [DBG] [24] Jellyfin.Plugin.YoutubeMetadata.Providers.YTDLEpisodeProvider: YTDL ReadYTDLInfo: /cache/youtubemetadata/nDlGkDENCyM/ytvideo.info.json
[21:28:28] [DBG] [23] Jellyfin.Plugin.YoutubeMetadata.Providers.YTDLEpisodeProvider: YTDL ReadYTDLInfo: /cache/youtubemetadata/x6063EuxfEA/ytvideo.info.json
[21:28:28] [DBG] [13] Jellyfin.Plugin.YoutubeMetadata.Providers.YTDLEpisodeProvider: YTDL ReadYTDLInfo: /cache/youtubemetadata/MbCkFag4t_c/ytvideo.info.json
[21:28:28] [DBG] [10] Jellyfin.Plugin.YoutubeMetadata.Providers.YTDLEpisodeProvider: YTDL ReadYTDLInfo: /cache/youtubemetadata/x43Clbsp3Rw/ytvideo.info.json
[21:28:28] [DBG] [11] Jellyfin.Plugin.YoutubeMetadata.Providers.YTDLEpisodeProvider: YTDL ReadYTDLInfo: /cache/youtubemetadata/tPRv-ATUBe4/ytvideo.info.json
[21:28:28] [ERR] [13] MediaBrowser.Providers.TV.EpisodeMetadataService: Error in YoutubeMetadata
System.IO.DirectoryNotFoundException: Could not find a part of the path '/cache/youtubemetadata/MbCkFag4t_c/ytvideo.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.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, 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.File.ReadAllText(String path)
   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:28:28] [ERR] [10] MediaBrowser.Providers.TV.EpisodeMetadataService: Error in YoutubeMetadata
System.IO.DirectoryNotFoundException: Could not find a part of the path '/cache/youtubemetadata/x43Clbsp3Rw/ytvideo.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.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, 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.File.ReadAllText(String path)

Which resulting file should be placed in the directory?

I'm following the steps in readme, but step 4 is very vague. After running dotnet publish, there are a lot of dll files in bin/. I am not familiar with the dotnet build process. Could you please elaborate on which file should be placed in data/plugins/YoutubeMetadata? Thank you.

System.IO.FileNotFoundException: youtube-dl not found on path

Sorry if this is a dumb question. I see this requires yt-dlp to be in the path for this feature to work. I am running Jellyfun 10.8.0 using docker container lscr.io/linuxserver/jellyfin. How are we supposed to install yt-dlp using a containerized environment? Is the Remote provider a manual install feature only? I saw in past issues that Youtube API v3 was mentioned. Based on the current docs, is this used anymore or only what yt-dlp produces?

[21:04:09] [ERR] [90] MediaBrowser.Providers.Manager.ProviderManager: YTDLSeriesImageProvider failed in GetImageInfos for type Series at /media/Youtube/Patrik Pietschmann [youtube2-UCs7O9sOUQiBGBxaaAguIwig]
System.IO.FileNotFoundException: youtube-dl not found on path!
   at NYoutubeDL.Services.PreparationService.SetupPrepare(YoutubeDL ydl)
   at NYoutubeDL.Services.InfoService.GetDownloadInfoAsync(YoutubeDL ydl, CancellationToken cancellationToken)
   at NYoutubeDL.Services.PreparationService.PrepareDownloadAsync(YoutubeDL ydl, CancellationToken cancellationToken)
   at NYoutubeDL.Services.DownloadService.DownloadAsync(YoutubeDL ydl, CancellationToken cancellationToken)
   at NYoutubeDL.Services.DownloadService.DownloadAsync(YoutubeDL ydl, String url, CancellationToken cancellationToken)
   at NYoutubeDL.YoutubeDL.DownloadAsync(String videoUrl)
   at Jellyfin.Plugin.YoutubeMetadata.Utils.YTDLMetadata(String id, IServerApplicationPaths appPaths, CancellationToken cancellationToken)
   at Jellyfin.Plugin.YoutubeMetadata.Providers.YoutubeDL.YTDLSeriesImageProvider.GetImages(BaseItem item, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.ProviderManager.GetImages(BaseItem item, IRemoteImageProvider provider, String preferredLanguage, Boolean includeAllLanguages, CancellationToken cancellationToken, Nullable`1 type)

A good naming scheme -

This isn't an issue, I found a way to organize videos well, thought I'd document it. I was struggling to find a way to organize the Youtube channels I'm cloning locally. A fairly new feature in yt-dlp makes organizing them as shows much easier.

Starting with the 2022.01.21 release output templates support a per-video incrementing integer, video_autonumber. This makes it easy to build a S01E<number> string. I use TheFrenchGhosty's Ultimate YouTube-DL Scripts, all I needed to do was update the output -

--output "$LIBRARY_PATH""/%(uploader)s/%(uploader)s - S01E%(video_autonumber)02d - %(title)s/%(uploader)s - S01E%(video_autonumber)02d - %(title)s [%(id)s].%(ext)s"

The important bit is S01E%(video_autonumber)02d. This gets a path that looks like - <library>/mrpete222/mrpete222 - S01E06 - Restore Rusty Angle Plate #801 tubalcain last word indicator/mrpete222 - S01E06 - Restore Rusty Angle Plate #801 tubalcain last word indicator [se49jjVYMWo].mkv. Every channel has a single season, everything is very organized and Jellyfin handles it well.

Thanks for this project!

YouTube episode ordering not correctly labeled

Jellyfin:10.8.1
YoutubeMetaData: 1.0.3.7

I was downloading playlist using TheFrenchGhosty's archivist (no comments) script and I was having issues getting the videos in the correct order. For example downloading this playlist and then moving it into a jellyfin shows library using the following directory structure:

Youtube
    └── Angory Tom
                 ├── Warhammer Total War - Warlord Tom vs King Ben - (Angory Tom)\
                          ├── 20170209 - Total War - Warhammer - First Blood! - Part #2\
                                  ├── 20170209 - Total War - Warhammer - First Blood! - Part #2 [VtiI1QL0K0A]description
                                  ├── 20170209 - Total War - Warhammer - First Blood! - Part #2 [VtiI1QL0K0A].info.json
                                  ├── 20170209 - Total War - Warhammer - First Blood! - Part #2 [VtiI1QL0K0A].mkv
                                  ├── 20170209 - Total War - Warhammer - First Blood! - Part #2 [VtiI1QL0K0A].webp
                          ├── 20170212 - Total War - Warhammer - How to be a Warlord - Part #3
                                  ├── ...
                          ├── ...

Gives the following in jellyfin:

image

Where every episode is listed as "1" instead of the order they appear in the playlist.

ArgumentNullException

Hmm... I know it was working earlier this evening. I can confirm I have my API token in place. I'm unclear what Value cannot be null. (Parameter 's') infers here. Is that the --simulate flag on youtube-dl? Odd...

The following error occurs when I try to refresh the metadata on my library content:

jellyfin_1  | [03:11:46] [INF] [100] Jellyfin.Plugin.YoutubeMetadata.Providers.YoutubeLocalImageProvider: /media/TubeSync/downloads/video/veritasium-selected/2011-02-17_veritasium-selected_how-far-away-is-the-moon-the-scale-of-the-universe_[Bz9D6xba9Og].mkv
jellyfin_1  | [03:11:46] [INF] [98] Jellyfin.Plugin.YoutubeMetadata.Providers.YoutubeMetadataProvider: Bz9D6xba9Og
jellyfin_1  | [03:11:46] [ERR] [98] MediaBrowser.Providers.Movies.MovieMetadataService: Error in YouTube-DL Metadata
jellyfin_1  | System.ArgumentNullException: Value cannot be null. (Parameter 's')
jellyfin_1  |    at Jellyfin.Plugin.YoutubeMetadata.Utils.MovieJsonToMovie(YTDLMovieJson json)
jellyfin_1  |    at Jellyfin.Plugin.YoutubeMetadata.Providers.YoutubeDLMetadataProvider.GetMetadata(MovieInfo info, CancellationToken cancellationToken)
jellyfin_1  |    at MediaBrowser.Providers.Manager.MetadataService`2.ExecuteRemoteProviders(MetadataResult`1 temp, String logName, TIdType id, IEnumerable`1 providers, CancellationToken cancellationToken)

Any insight here?

Further noting that /cache/youtubemetadata/<youtube id>/ytvideo.info.json is properly populated after the fetch.

Jellyfin 10.6.0 causes error

I get this error on Jellyfin 10.6.0 with the current plugin.

[16:21:48] [ERR] [1] Emby.Server.Implementations.ApplicationHost: Error loading types from Jellyfin.Plugin.Vgmdb, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
System.TypeLoadException: Method 'get_ProviderName' in type 'Jellyfin.Plugin.Vgmdb.ExternalIds.VgmdbAlbumExternalId' from assembly 'Jellyfin.Plugin.Vgmdb, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.

Won't build in Docker

Hi, how're we supposed to build this project?

In a sandboxed Docker environment it's failing.

FROM mcr.microsoft.com/dotnet/sdk:6.0

ARG VERSION=1.0.3.7
RUN curl -L --output YoutubeMetadta.tar.gz https://github.com/ankenyr/jellyfin-youtube-metadata-plugin/archive/refs/tags/$VERSION.tar.gz \
 && tar xzvf YoutubeMetadta.tar.gz \
 && cd jellyfin-youtube-metadata-plugin-$VERSION \
 && dotnet publish --configuration Release --output bin

When I run docker build . it eventually fails with:

Microsoft (R) Build Engine version 17.2.0+41abc5629 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  Restored /jellyfin-youtube-metadata-plugin-1.0.3.7/Jellyfin.Plugin.YoutubeMetadata/Jellyfin.Plugin.YoutubeMetadata.csproj (in 37.57 sec).
  Restored /jellyfin-youtube-metadata-plugin-1.0.3.7/Jellyfin.Plugin.YoutubeMetadata.Providers.Tests/Jellyfin.Plugin.YoutubeMetadata.Tests.csproj (in 42.07 sec).
/usr/share/dotnet/sdk/6.0.301/Microsoft.Common.CurrentVersion.targets(2302,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "NYoutubeDL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/jellyfin-youtube-metadata-plugin-1.0.3.7/Jellyfin.Plugin.YoutubeMetadata/Jellyfin.Plugin.YoutubeMetadata.csproj]
/jellyfin-youtube-metadata-plugin-1.0.3.7/Jellyfin.Plugin.YoutubeMetadata/Utils.cs(7,7): error CS0246: The type or namespace name 'NYoutubeDL' could not be found (are you missing a using directive or an assembly reference?) [/jellyfin-youtube-metadata-plugin-1.0.3.7/Jellyfin.Plugin.YoutubeMetadata/Jellyfin.Plugin.YoutubeMetadata.csproj]
The command '/bin/sh -c curl -L --output YoutubeMetadta.tar.gz https://github.com/ankenyr/jellyfin-youtube-metadata-plugin/archive/refs/tags/$VERSION.tar.gz  && tar xzvf YoutubeMetadta.tar.gz  && cd jellyfin-youtube-metadata-plugin-$VERSION  && dotnet publish --configuration Release --output bin' returned a non-zero code: 1

Executing on all libraries despite not being enabled

For some reason, this plugin is executing on all my libraries. I do not have any of the YoutubeMetadata boxes checked in any of these libraries. Is this expected behavior? Kind of confused about why it is running in these libraries.

Jellyfin Version: 10.8

TV Shows

[14:43:46] [ERR] [69] MediaBrowser.Providers.TV.EpisodeMetadataService: Error in YoutubeMetadata
System.IO.FileNotFoundException: Could not find file '/tvshows/The Big Bang Theory/Season 02/The Big Bang Theory S02E13 [Bluray-1080p Remux][DTS-HD MA 5.1][AVC].info.json'.
File name: '/tvshows/The Big Bang Theory/Season 02/The Big Bang Theory S02E13 [Bluray-1080p Remux][DTS-HD MA 5.1][AVC].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.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)

Anime

[14:39:05] [ERR] [22] MediaBrowser.Providers.TV.EpisodeMetadataService: Error in YoutubeMetadata
System.IO.FileNotFoundException: Could not find file '/anime/Hundred/Season 01/Hundred - S01E08 - Night at the Lake.info.json'.
File name: '/anime/Hundred/Season 01/Hundred - S01E08 - Night at the Lake.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.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)

Support TV shows library content

I would like to see support for using this metadata in TV Shows content type.

Expected behavior would be:

  • Channel Title as the Show Title
  • Release Year as the Season
  • Sequential numbering in release date order for episode number.

Can plug-in identify show name

I just started using and attached to a mixed content library. Not realising that tv shows were not yet supported.

I'm populating a folder from tubesync and are using a YouTube id but not in square brackets. I do also have nfo which is I assume where the plug-in is getting episode information from.

My question is how can I populate the "show" name which is each directory the episodes are stored in.

Generally
Video\cityplannerplays\showepispde.mkx
I have also got the ability to set the "show name" with a YouTube channel Id (starting UC)

[1.0.3.6] Regression - Failed to load assembly "Jellyfin.Plugin.YoutubeMetadata.dll"

Regression after updating to 1.0.3.6, from 1.0.3.5.

Using the Jellyfin docker image jellyfin/jellyfin:10.8.0-beta2

[ERR] [1] Emby.Server.Implementations.Plugins.PluginManager: Failed to load assembly "/var/lib/jellyfin/plugins/YoutubeMetadata_1.0.3.6/Jellyfin.Plugin.YoutubeMetadata.dll". This error occurs when a plugin references an incompatible version of one of the shared libraries. Disabling plugin.
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Method 'ExecuteAsync' in type 'Jellyfin.Plugin.YoutubeMetadata.EpisodeIndexer' from assembly 'Jellyfin.Plugin.YoutubeMetadata, Version=1.0.3.6, Culture=neutral, PublicKeyToken=null' does not have an implementation.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Assembly.GetTypes()
   at Emby.Server.Implementations.Plugins.PluginManager.LoadAssemblies()+MoveNext()
System.TypeLoadException: Method 'ExecuteAsync' in type 'Jellyfin.Plugin.YoutubeMetadata.EpisodeIndexer' from assembly 'Jellyfin.Plugin.YoutubeMetadata, Version=1.0.3.6, Culture=neutral, PublicKeyToken=null' does not have an implementation.

COULD NOT PULL DATA FROM YOUTUBE

[17:53:16] [ERR] [3] MediaBrowser.Providers.Manager.ProviderManager: Provider YoutubeMetadata failed to retrieve search results
System.NotImplementedException: The method or operation is not implemented.
at Jellyfin.Plugin.YoutubeMetadata.Providers.AbstractYoutubeRemoteProvider3.GetSearchResults(E searchInfo, CancellationToken cancellationToken) at MediaBrowser.Providers.Manager.ProviderManager.GetSearchResults[TLookupType](IRemoteSearchProvider1 provider, TLookupType searchInfo, CancellationTok
en cancellationToken)
at MediaBrowser.Providers.Manager.ProviderManager.GetRemoteSearchResults[TItemType,TLookupType](RemoteSearchQuery`1 searchInfo, BaseItem referenceItem, C
ancellationToken cancellationToken)

request feature

im here for to write my 2 cents about this one.
compiled from repo on a rpi4 for docker jellyfin version 10.6.2 confirm plugin work without problems.
tested with about 10+ videos downloaded with yuoutubedl.
all good, no problems.

i have a request only, can the plugin autocatch the video ID from .json files created from youtubedl?
its a pain to manually add the id in downloaded files name everytime

thanks for all

Allow Collection field to be filled by Channel Name

No idea if this is at all possible but just thought it would be cool to utilize the Collection field on my library.

Currently my Youtube library is a single directory pointed at my youtube-dl output folders which loads 10000's of videos and there is currently no filter I can see on Jelly fin for Director.

I gather this might be an alternative to tv show library option request as sorting by date pretty much accomplishes this inside of a collection just without any seasons.

All the video have same image

jellyfin: build from linuxserver/jellyfin:10.8.0 with yt-dlp 2022.06.29
plugin: 1.0.3.8

1B1EE69C-CC09-44A8-9B1B-53FF6391CEC5

youtube file list
WX20220704-115826@2x

jellyfin log error
WX20220704-104855@2x

All seasons changed to a single season

Hello, I just updated yesterday whilst trying out 10.8.0 and now some of my shows have decided to all get lumped into a single season.

image

Which as you can expect is taking ages to load into the episode list. They use to be split by year following my folder structure.

Just wondering if it's the plugin or some change in JellyFin as I've currently no idea. If it is your plugin, any chance to have this option able to toggle?

image

Oh and big thanks for the recent improvements and fixing that sorting order in the UI :D

Video ID issue

[1x69Q6ov2sQ] gets grabbed as Season 1 Episode 69 instead of the metadata

Support for SponsorBlock

SponsorBlock is a public crowd sourced database of segments in YouTube videos. I would like to see this plugin query SponsorBlock and add them as chapters. YouTube now supports chapters for videos so we need to decide how we'll line those two things up. I believe youtube-dl will provide chapter info if the video had it.

How doable is this? What would need to be done. I might take a look in to it as a primer before trying to help with the Shows library

Thumbnails not correctly generated

By default it seems that the plugin does not give videos the correct thumbnails, instead giving them a black thumbnail. However, if you go into "Edit Images,' you are able to select the correct thumbnail for the video to use. Shouldn't the video have the correct thumbnail to start with so the user doesn't have to select it themselves?

Music metadata not provided

Metadata is not provided for music libraries.

I'm using jellyfin 10.8.0-beta2 and plugin version 1.0.3.5.

These are my library settings:
2022-04-22-145737_808x898_scrot

Files are in subfolders with the channel/playlist name, all files are owend by the jellyfin user and are using the following format:

'ukfdrumandbass/2021-11-11_ukfdrumandbass_amc-brazil_[i5t3FlmDJvw]_opus.info.json'
'ukfdrumandbass/2021-11-11_ukfdrumandbass_amc-brazil_[i5t3FlmDJvw]_opus.jpg'
'ukfdrumandbass/2021-11-11_ukfdrumandbass_amc-brazil_[i5t3FlmDJvw]_opus.nfo'
'ukfdrumandbass/2021-11-11_ukfdrumandbass_amc-brazil_[i5t3FlmDJvw]_opus.ogg'

But no metadata is provided in jellyfin and they are displayed like this:
2022-04-22-152222_471x32_scrot

meeb/tubesync is used to download the files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.