tubearchivist / tubearchivist-jf-plugin

Metadata for your TubeArchivist library on Jellyfin.
GNU General Public License v3.0
43 stars 4 forks source link

[Bug]: Name missing for some channels - Showing only the Channel ID #12

Open TheDom42 opened 2 weeks ago

TheDom42 commented 2 weeks ago

I've read the documentation

Operating System

Docker - Jellyfin Official Container v10.9.1 - TubeArchivist Official container v0.4.7

Your Bug Report

Describe the bug

Some of the channels (6 of 15 total) in the TubeArchivist library are only listed with their Channel ID as a name instead of their correct name. The channel still shows the correct channel picture, and the videos are listed with their correct name and thumbnail.

image

The rest of the channels are fully correct with the right name and metadata.

Steps To Reproduce

  1. Set Up the plugin according to the Readme on the front page
  2. Scan for Metadata

Expected behavior

All Channels should show their correct name instead of their Channel ID as a name in Jellyfin.

Relevant Jellyfin log output

######## Domain name substituted before posting for privacy reasons - Connection between containers works

[2024-05-17 00:00:19.346 +02:00] [INF] [19] Jellyfin.Plugin.TubeArchivistMetadata.Plugin: "https://example.com/api/channel/UC7aW7chIafJG6ECYAd3N5uQ/: OK"
[2024-05-17 00:00:19.346 +02:00] [INF] [19] Jellyfin.Plugin.TubeArchivistMetadata.Plugin: "Getting metadata for channel: IBRACORP (UC7aW7chIafJG6ECYAd3N5uQ)"
[2024-05-17 00:00:19.346 +02:00] [INF] [19] Jellyfin.Plugin.TubeArchivistMetadata.Plugin: "Received metadata: 
{\"channel_banner_url\":\"/cache/channels/UC7aW7chIafJG6ECYAd3N5uQ_banner.jpg\",\"channel_description\":\"Welcome to IBRACORP! \nWe share technology-related content in the hopes of helping or informing others in the art of information technology. \n\nWe also host our own servers and use our platform to expose open-source software to the world stage to help promote an open-source future. \n\nThe name is a play on the stereotype of generic greedy corporations - mysterious and very vague. A neon-Tokyo sort of future. \nIn our case, however, we want to share mostly free and open-source products. It also sounds cool, so there's that.\n\nThe motto is quoting a Dave Chappelle skit on Chappelle's Show - \\"Modern problems require modern solutions\\".\n\",\"channel_id\":\"UC7aW7chIafJG6ECYAd3N5uQ\",\"channel_name\":\"IBRACORP\",\"channel_tags\":null,\"channel_thumb_url\":\"/cache/channels/UC7aW7chIafJG6ECYAd3N5uQ_thumb.jpg\",\"channel_tvart_url\":\"/cache/channels/UC7aW7chIafJG6ECYAd3N5uQ_tvart.jpg\"}"
[2024-05-17 00:00:19.346 +02:00] [ERR] [19] MediaBrowser.Providers.TV.SeriesMetadataService: Error in "TubeArchivist"
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at Jellyfin.Plugin.TubeArchivistMetadata.TubeArchivist.Channel.ToSeries()
   at Jellyfin.Plugin.TubeArchivistMetadata.Providers.SeriesMetadataProvider.GetMetadata(SeriesInfo info, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.ExecuteRemoteProviders(MetadataResult`1 temp, String logName, TIdType id, IEnumerable`1 providers, CancellationToken cancellationToken)

Anything else?

No response

hugalafutro commented 2 weeks ago

Keep rescanning the library and watch logs when it stops, rescan again. I have 12 channels first scan got me to 5 and 1 like in your picture, took about 5 more rescans to get all 12 channels in and it's still going (1 channel has 1k+ videos).

TheDom42 commented 1 week ago

Keep rescanning the library and watch logs when it stops, rescan again. I have 12 channels first scan got me to 5 and 1 like in your picture, took about 5 more rescans to get all 12 channels in and it's still going (1 channel has 1k+ videos).

Thank you but I had no luck so far. Did you delete the library in between the runs? What rescan level did you set (only update metadata, rescan for new files, etc.)? I have tried rescanning multiple times - it's always the same ones, and there has been no improvement so far.

hugalafutro commented 1 week ago

I was just watching logs and when it crashed during scan i restarted JF and pressed Scan all libraries, but perhaps there's more to it than that in your case. Also I noticed after restarting and pressing Scan it could take around 5 mins doing god knows what on all cpu cores and then it suddenly started scanning. 2 episodes dl'd yesterday appeared ok in JF by themselves later.

jcaust commented 1 week ago

I'm having the same issue. except I've got 300 folders to process and its only done 50. keep repeating scan and nothing extra is being added/processed .

DarkFighterLuke commented 5 days ago

Hi @TheDom42 , I haven't faced this bug on my small library, but I've also tried downloading a video from IBRACORP channel and metadata are retrieved without any problem.

About the time needed to scan, it depends on your library size, in my case it takes just 10 seconds with 64 videos.

@jcaust can you give me some examples of channels/videos not getting processed please?

Thanks

hugalafutro commented 5 days ago

@jcaust consider setting the parallel scan to 1 as according to https://github.com/jellyfin/jellyfin/issues/11589#issuecomment-2108754230, my system is not that powerful + runs many apps + the media is going over gigabit nfs share - if you read more of the thread the 10.9.x release changed the logic there to run at more threads and it can cause issues in some of those circumstances.

For unrelated reasons I did rollback my container and re-import whole tube archivist library, and with the parallel setting at 1 it finished first time and imported all channels correctly.

see if that helps

NOTE: make sure you restart the jellyfin container/server after that. Also if it still bugs out, just restarting the scan is not enough, you have to restart the jf container/server and then restart the scan - once it stops its stuck until jf restart. Best way is monitoring logs for the SQLite db locked error at which point you know it's restart time. It's tedious/time consuming, but I successfully imported my whole t-a library both with the "broken" scan and successful scan with parallel setting at 1

TheDom42 commented 5 days ago

Hi @TheDom42 , I haven't faced this bug on my small library, but I've also tried downloading a video from IBRACORP channel and metadata are retrieved without any problem.

Unfortunately, I wouldn't know how to investigate further. What do you make of the error message I posted above? The System.ArgumentNullException: Value cannot be null. (Parameter 'source') As I said, for most of my channels, there is no issue at all. The unrecognized ones aren't even the largest ones. I restarted/upgraded both containers multiple times. I also don't want to fully remove the library because I have already generated the trickplay files for it (which took quite some time), and I'm afraid I might lose them.

DarkFighterLuke commented 5 days ago

Can you try to setup another Jellyfin container and scan your Youtube library from there? So that we can exclude issues related to Jellyfin itself. (Please note: the Jellyfin configuration folder must be a different one from your current installation, we want a new clear instance)