-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Conversation
5ed4809
to
4c815e0
Compare
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()) { |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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.
21b6d7b
to
c25814e
Compare
All ajax calls and url constructors have been refactored to be handled by JellyfinApi