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

ScripterX package - onMediaItemUpdated not working? #70

Open
1ucay opened this issue Nov 14, 2022 · 0 comments
Open

ScripterX package - onMediaItemUpdated not working? #70

1ucay opened this issue Nov 14, 2022 · 0 comments

Comments

@1ucay
Copy link

1ucay commented Nov 14, 2022

Emby ScripterX: Tried to invoke function '_onMediaItemUpdated' on package with installationId 'b6956024-5963-4cb5-af49-0a74073abf6b' (function not implemented)

Package.js file

function _onMediaItemUpdated(context) {

	ScripterX.Log.Info("TEST - ID " + context.Token("%item.id%").value + " using original title " + context.Token("%item.originaltitle%").value + " with IMDB " + context.Token("%item.meta.imdb%").value );
	
	fetch(`https://api.allorigins.win/get?url=${encodeURIComponent('https://domain.com')}`).then(function(response){
		if (response.ok) return response.json()
		throw new Error('Network response was not ok.')
	}).then(function(data){
		ScripterX.Log.Info(data.contents);
	});
	
	ScripterX.Web.Get( ? ) 
	// I need download webpage (wihout CORS, but I can use https://api.allorigins.win/get?url=${encodeURIComponent('https://domain.com')
	
}
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

1 participant