Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Sync Time Setting Ignored #91

Closed
vbprog opened this issue Aug 17, 2016 · 5 comments
Closed

Sync Time Setting Ignored #91

vbprog opened this issue Aug 17, 2016 · 5 comments

Comments

@vbprog
Copy link

vbprog commented Aug 17, 2016

Sync happens every time I open Google Music, regardless of the time period I use in settings. I currently have the setting set to 800. However everytime I open a new GM tab, my playlist resyncs. I would expect it to sync only once every ~13 hours.

@simon-weber
Copy link
Owner

Ah, good point.

Do you expect a sync to happen for only the first tab you open? Or for none of them (unless they sync interval has passed)? Both should be straightforward to implement, but I wonder if people have different expectations (implying it should be configurable).

@vbprog
Copy link
Author

vbprog commented Aug 17, 2016

Hi Simon:

Yes I guess I expect it to only sync once during the interval specified, regardless of how many times I open GM. Here's my use case:

I set up an auto playlist for 250 random songs that have a playcount under 3. I have this playlist set to download on my phone so I can listen to these seldom played songs while travelling. (I've been wanting this feature for as long as I've used GM) I might open GM several times throughout the day for various reasons - and the playlist wipes out on the phone and redownloads all 250 songs every time.

I guess I could set your sync setting to 0 and then change it once a day or whenever I want the playlist to do a resync....

I think in my mind if I set the sync time to 800 it shouldn't sync until that time has past.

@simon-weber
Copy link
Owner

Gotcha; totally makes sense. I actually have a similar use case, though since I normally listen through the web, refreshing the playlist each time hasn't been a big deal.

I'll go with don't-sync-at-all-within-sync-period, and if folks complain then I'll add an option for refresh-always-syncs. I should have time for it this weekend. Thanks for bringing it up!

@simon-weber simon-weber self-assigned this Aug 17, 2016
@simon-weber
Copy link
Owner

simon-weber commented Aug 20, 2016

I noticed a lot of edge cases while working on this. Here's the new behavior:

  • on new tab / refreshed tab:
    • now >= last-sync + sync-period: sync immediately. Next sync at now + sync-period.
    • now < last-sync + sync-period: don't sync. Next sync at last-sync + sync-period
    • the random sort is still generated like before
  • when definitions are changed:
    • sync affected playlists immediately (though I might reconsider this)
  • when a sync fails:
    • no change to schedule
  • if the sync period is changed:
    • non-0 from {non-0, 0}: immediate sync; new schedule starts immediately. This might be counter-intuitive, but taking the previous delay into account was really complicated, and I don't think it'll happen very often.
    • 0 from non-0 (ie, turned off): no more syncs

@simon-weber
Copy link
Owner

There's a very good chance there are bugs in this, so please play around with it once you get the update! I'm going to push it out now since I'm eager to fix an unrelated bug in the current release.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants