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

Fix issue with sync menu and excessive logging #1595

Merged
merged 1 commit into from
Jul 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion src/components/playback/playbackmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
const now = (new Date).getTime();

if (method !== reportPlaybackLastMethod || now - (reportPlaybackLastTime || 0) >= reportPlaybackLogDelay) {
console.debug(method + '-' + JSON.stringify(info));
Copy link
Contributor

Choose a reason for hiding this comment

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

This block is for logging. It was more verbose :p
bffafa6

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, well I still think it's way too verbose for the debug logs 😅 might just want to remove it.

reportPlaybackLastMethod = method;
reportPlaybackLastTime = now;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/syncPlay/groupSelectionMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function showNewJoinGroupSelection (button, user, apiClient) {
actionsheet.show(menuOptions).then(function (id) {
if (id == 'new-group') {
apiClient.createSyncPlayGroup();
} else {
} else if (id) {
apiClient.joinSyncPlayGroup({
GroupId: id,
PlayingItemId: playingItemId
Expand Down
4 changes: 4 additions & 0 deletions src/components/syncPlay/syncPlayManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ class SyncPlayManager {
if (!this.lastPlaybackWaiting) {
this.lastPlaybackWaiting = new Date();
}

events.trigger(this, 'waiting');
}

Expand Down Expand Up @@ -288,6 +289,7 @@ class SyncPlayManager {
player.setPlaybackRate(this.localPlayerPlaybackRate);
this.localPlayerPlaybackRate = 1.0;
}

this.currentPlayer = null;
this.playbackRateSupported = false;
}
Expand Down Expand Up @@ -433,6 +435,7 @@ class SyncPlayManager {
});
return;
}

// Get playing item id
let playingItemId;
try {
Expand Down Expand Up @@ -619,6 +622,7 @@ class SyncPlayManager {
if (this.currentPlayer) {
this.currentPlayer.setPlaybackRate(1);
}

this.clearSyncIcon();
}

Expand Down