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

metaHandler video firstAired param issue #146

Closed
ThanosDi opened this issue Dec 24, 2020 · 5 comments
Closed

metaHandler video firstAired param issue #146

ThanosDi opened this issue Dec 24, 2020 · 5 comments

Comments

@ThanosDi
Copy link

For some reason it seems that the view of the sidebar for series is altered if firstAired is not passed or is current year.

For example a payload like this

{
	"meta": {
		"name": "The Office",
		"background": "https://images.metahub.space/background/medium/tt0386676/img",
		"logo": "https://images.metahub.space/logo/medium/tt0386676/img",
		"id": "tt0386676",
		"videos": [{
			"name": "Finale",
			"season": 9,
			"number": 23,
			
			"firstAired": "2001-01-31T22:00:00.000Z",			
			
			"id": "tt0386676:9:23",
			"released": "2001-01-31T22:00:00.000Z",
			"episode": 23,
			"description": "Months after the airing of the documentary, the workers of Dunder Mifflin, past and present, gather for a wedding and a final round of interviews. Mysteries are solved, hatchets are buried, pranks are prunked."
		},
		...]
	}
}

will result to
image

but if I remove firstAired property or add the current date like new Date().toISOString() it will look like this:

image

@jaruba
Copy link
Member

jaruba commented Dec 24, 2020

One of your screenshots (first one) is shown as a series meta type, while the second one is shown as a channel meta type. (like the YouTube addon channels)

In your example response, i don't see you setting a meta.type, are you setting one?

@ThanosDi
Copy link
Author

Yes I'm passing it as it comes from the args

	const metaObject = {
		id: args.id,
		name: parsedName,
		background: poster.replace('/poster/', '/background/'),
		logo: poster.replace('/poster/', '/logo/'),
		posterShape: 'regular',
		type: args.type,
		videos
	};

without changing anything else but the firstAired property inside videos array it gives me these 2 different results.

@jaruba
Copy link
Member

jaruba commented Dec 24, 2020

I believe this could be a bug, but I can't be certain. The reason why I can't be certain is because Stremio Web was built to be type agnostic, and mould itself based on the addon responses, so it may also be by design. (based on the future plans we have for Stremio)

I would need to check the code of the desktop app to offer more help. In the meanwhile, what i can say for certain, is that the firstAired property does not need to be exact. Many community developers (which prefer the series view) hack this with fictive timestamps (difference of one second / hour / etc) to order the episodes as they prefer them ordered.

@jaruba
Copy link
Member

jaruba commented Dec 24, 2020

It may also be possible that released is specific to channel, and firstAired is specific to series. Again though, I can't be sure without checking the code of the app..

@TheBeastLT
Copy link

These properties are mandatory for series meta:

id: 'some-id',
title: `Episode ${episode}`,
released: new Date(seriesStartTime + ep),
season: 1,
episode: episode,

I don't think you need to provide firstAired, should work fine without it. Just that the episodes are sorted based on released property so be mindful of that.

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

4 participants