Jump to content

Feature Request: Stop calling /Sessions/Playing/Progress indefinately


stephen_hill

Recommended Posts

stephen_hill

Hi

Please can you update all of your clients so that the endpoint /Sessions/Playing/Progress is not called indefinitely.

I have observed this behaviour on the Web Interface, Android, and iOS.

When a client pauses a piece of media, the client will call the /Sessions/Playing/Progress endpoint indefinitely (at a rate of 1-5 seconds) with the exact same "TimeUpdate" parameter. If the client calls the endpoint and the TimeUpdate parameter has not changed (ie paused) the client should not call it again until progress on the media has changed.

Here is an example server log line that gets repeated indefinitely

2023-04-25 14:27:17.662 Info Server: http/1.1 POST http://‌‍‍emby‌/‌‍‍emby‌/Sessions/Playing/Progress?X-Emby-Client=Emby Web&X-Emby-Device-Name=Firefox Windows&X-Emby-Device-Id=4044890d-8f2c-419e-ad61-fc51b1782e44&X-Emby-Client-Version=4.7.11.0&X-Emby-Language=en-gb&reqformat=json. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0
2023-04-25 14:27:17.662 Debug SessionManager: OnPlaybackProgress TimeUpdate 1682410631954
2023-04-25 14:27:17.663 Info Server: http/1.1 Response 204 to ‌‍‍Client1. Time: 1ms. http://‌‍‍emby‌/‌‍‍emby‌/Sessions/Playing/Progress?X-Emby-Client=Emby Web&X-Emby-Device-Name=Firefox Windows&X-Emby-Device-Id=4044890d-8f2c-419e-ad61-fc51b1782e44&X-Emby-Client-Version=4.7.11.0&X-Emby-Language=en-gb&reqformat=json

Reasons for wanting this are:

  • Reduces network traffic
  • Reduce power consumption on mobile devices
  • Stop filling the server logs with repetitive lines

Cheers

Link to comment
Share on other sites

Hi, it’s actually ten seconds. It’s how the server knows the client is still around. But yes there’s room for improvement.

Link to comment
Share on other sites

stephen_hill

@Luke

According to my logs it's ever 5 seconds.

2023-04-25 14:35:51.168 Info Server: http/1.1 POST http://host1/Sessions/Playing/Progress. UserAgent: okhttp/4.9.2
2023-04-25 14:35:51.178 Info Server: http/1.1 Response 204 to host4. Time: 11ms. http://host1/Sessions/Playing/Progress
2023-04-25 14:35:56.251 Info Server: http/1.1 POST http://host1/Sessions/Playing/Progress. UserAgent: okhttp/4.9.2
2023-04-25 14:35:56.252 Info Server: http/1.1 Response 204 to host4. Time: 1ms. http://host1/Sessions/Playing/Progress
2023-04-25 14:36:01.383 Info Server: http/1.1 POST http://host1/Sessions/Playing/Progress. UserAgent: okhttp/4.9.2
2023-04-25 14:36:01.390 Info Server: http/1.1 Response 204 to host4. Time: 7ms. http://host1/Sessions/Playing/Progress
2023-04-25 14:36:06.450 Info Server: http/1.1 POST http://host1/Sessions/Playing/Progress. UserAgent: okhttp/4.9.2
2023-04-25 14:36:06.451 Info Server: http/1.1 Response 204 to host4. Time: 1ms. http://host1/Sessions/Playing/Progress
2023-04-25 14:36:11.561 Info Server: http/1.1 POST http://host1/Sessions/Playing/Progress. UserAgent: okhttp/4.9.2
2023-04-25 14:36:11.562 Info Server: http/1.1 Response 204 to host4. Time: 1ms. http://host1/Sessions/Playing/Progress
2023-04-25 14:36:16.659 Info Server: http/1.1 POST http://host1/Sessions/Playing/Progress. UserAgent: okhttp/4.9.2
2023-04-25 14:36:16.661 Info Server: http/1.1 Response 204 to host4. Time: 1ms. http://host1/Sessions/Playing/Progress
2023-04-25 14:36:21.753 Info Server: http/1.1 POST http://host1/Sessions/Playing/Progress. UserAgent: okhttp/4.9.2
2023-04-25 14:36:21.763 Info Server: http/1.1 Response 204 to host4. Time: 11ms. http://host1/Sessions/Playing/Progress
2023-04-25 14:36:26.881 Info Server: http/1.1 POST http://host1/Sessions/Playing/Progress. UserAgent: okhttp/4.9.2
2023-04-25 14:36:26.882 Info Server: http/1.1 Response 204 to host4. Time: 1ms. http://host1/Sessions/Playing/Progress
2023-04-25 14:36:31.973 Info Server: http/1.1 POST http://host1/Sessions/Playing/Progress. UserAgent: okhttp/4.9.2
2023-04-25 14:36:31.974 Info Server: http/1.1 Response 204 to host4. Time: 1ms. http://host1/Sessions/Playing/Progress
2023-04-25 14:36:37.070 Info Server: http/1.1 POST http://host1/Sessions/Playing/Progress. UserAgent: okhttp/4.9.2
2023-04-25 14:36:37.071 Info Server: http/1.1 Response 204 to host4. Time: 1ms. http://host1/Sessions/Playing/Progress
2023-04-25 14:36:42.191 Info Server: http/1.1 POST http://host1/Sessions/Playing/Progress. UserAgent: okhttp/4.9.2
2023-04-25 14:36:42.192 Info Server: http/1.1 Response 204 to host4. Time: 1ms. http://host1/Sessions/Playing/Progress
2023-04-25 14:36:47.278 Info Server: http/1.1 POST http://host1/Sessions/Playing/Progress. UserAgent: okhttp/4.9.2
2023-04-25 14:36:47.279 Info Server: http/1.1 Response 204 to host4. Time: 1ms. http://host1/Sessions/Playing/Progress
2023-04-25 14:36:52.400 Info Server: http/1.1 POST http://host1/Sessions/Playing/Progress. UserAgent: okhttp/4.9.2
2023-04-25 14:36:52.401 Info Server: http/1.1 Response 204 to host4. Time: 1ms. http://host1/Sessions/Playing/Progress
2023-04-25 14:36:57.499 Info Server: http/1.1 POST http://host1/Sessions/Playing/Progress. UserAgent: okhttp/4.9.2
2023-04-25 14:36:57.500 Info Server: http/1.1 Response 204 to host4. Time: 1ms. http://host1/Sessions/Playing/Progress
2023-04-25 14:37:02.583 Info Server: http/1.1 POST http://host1/Sessions/Playing/Progress. UserAgent: okhttp/4.9.2
2023-04-25 14:37:02.584 Info Server: http/1.1 Response 204 to host4. Time: 1ms. http://host1/Sessions/Playing/Progress
2023-04-25 14:37:07.696 Info Server: http/1.1 POST http://host1/Sessions/Playing/Progress. UserAgent: okhttp/4.9.2
2023-04-25 14:37:07.697 Info Server: http/1.1 Response 204 to host4. Time: 1ms. http://host1/Sessions/Playing/Progress
2023-04-25 14:37:12.824 Info Server: http/1.1 POST http://host1/Sessions/Playing/Progress. UserAgent: okhttp/4.9.2
2023-04-25 14:37:12.825 Info Server: http/1.1 Response 204 to host4. Time: 1ms. http://host1/Sessions/Playing/Progress

 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...