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

JellyfinApi static class for server information #92

Merged
merged 5 commits into from
Dec 12, 2020

Conversation

hawken93
Copy link
Contributor

All ajax calls and url constructors have been refactored to be handled by JellyfinApi

@hawken93
Copy link
Contributor Author

Also reenabled eslint for the files and fixed linting errors.

@@ -184,15 +179,10 @@ mgr.addEventListener(cast.framework.events.EventType.ENDED, function () {
reportPlaybackStopped($scope, getReportingParams($scope));
init();

if (!playNextItem()) {
if (!playbackMgr.playNextItem()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This got caught by the linter, playNextItem was not defined, so this would break playing the next item in the queue I think.

if ($scope.userId != null) {
reportEvent('volumechange', true);
}
reportEvent('volumechange', true);
Copy link
Contributor Author

@hawken93 hawken93 Dec 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we could do if (JellyfinApi.userId) - but I removed so many "do we have a connection" checks. I'm assuming someone would connect before these calls would happen.

Assuming clearing server info on disconnect:
If you disconnect from the cast, it may be phone going battery-saving. you may still want the chromecast to keep playing.
Usually the chromecast app is shut down after use, and then all this information will be gone.

src/components/jellyfinApi.ts Outdated Show resolved Hide resolved
@YouKnowBlom YouKnowBlom merged commit 6500db1 into jellyfin:master Dec 12, 2020
@hawken93 hawken93 deleted the jellyfinapi branch December 12, 2020 16:45
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

Successfully merging this pull request may close these issues.

2 participants