devz3ro 2 Posted November 21, 2024 Posted November 21, 2024 Emby Server Version: Both 4.8.10.0 and 4.9.0.31 Having an issue where if a user on an Apple TV doesn't stop playback gracefully, it creates a "ghost session" on the server that survives even a full reboot of the server's host. curl -s "http://$EMBY_SERVER_URL:8096/emby/Sessions?api_key=$EMBY_API_KEY" | jq '.[] | select(.Id == "b0673bfe9f49d3b39bd4ddf1991fd3cc")' { "PlayState": { "PositionTicks": 48189705111, "CanSeek": true, "IsPaused": false, "IsMuted": false, "VolumeLevel": 100, "AudioStreamIndex": 1, "SubtitleStreamIndex": -1, "MediaSourceId": "76fc4d4f7eff43178062b199503c2b4e", "PlayMethod": "DirectStream", "RepeatMode": "RepeatNone", "SubtitleOffset": 0, "Shuffle": false, "PlaybackRate": 1 }, "AdditionalUsers": [], "RemoteEndPoint": "X.X.X.X", "Protocol": "HTTP/1.1", "PlayableMediaTypes": [ "Audio", "Video" ], "PlaylistIndex": 0, "PlaylistLength": 1, "Id": "b0673bfe9f49d3b39bd4ddf1991fd3cc", "ServerId": "XXXX", "UserId": "894bf79f45e84006a2d30762ac3aec22", "UserName": "testuser", "Client": "Emby for Apple TV", "LastActivityDate": "2024-11-20T23:37:44.2182466Z", "DeviceName": "Apple TV", "NowPlayingItem": { "Name": "Paramount TV", "ServerId": "XXXX", "Id": "1315161", "DateCreated": "2024-04-17T00:19:39.0000000Z", "PresentationUniqueKey": "776d58b8c9434750f268e8e612288964", "ExternalUrls": [], "Taglines": [], "Number": "41", "ChannelNumber": "41", "ProviderIds": {}, "IsFolder": false, "ParentId": "3", "Type": "TvChannel", "PrimaryImageAspectRatio": 1.3333333333333333, "ImageTags": { "Primary": "673b8eaef702ceed6827a23ece39840f", "LogoLight": "031e1148149ccece25f42b0ea5926005", "LogoLightColor": "0e3cadd96cdc75c74b5e5f8ddbcbfa6f" }, "BackdropImageTags": [], "MediaType": "Video", "CurrentProgram": { "Name": "Two and a Half Men", "ServerId": "XXXX", "Id": "2578660", "DateCreated": "2024-11-19T22:50:34.0000000Z", "PresentationUniqueKey": "EP005927330062", "PremiereDate": "2006-01-09T05:00:00.0000000Z", "ExternalUrls": [], "OfficialRating": "TV-14", "ChannelId": "1315161", "ChannelName": "Paramount TV", "Overview": "Alan's emotional breakdown after dropping Jake off for a weekend away sends Charlie to a therapist.", "Taglines": [], "Genres": [ "Sitcom" ], "RunTimeTicks": 18000000000, "ProductionYear": 2006, "ChannelNumber": "41", "IndexNumber": 12, "ParentIndexNumber": 3, "ProviderIds": { "Seriesgracenote": "184925", "SeriesZap2It": "EP00592733" }, "ParentId": "1315161", "Type": "Program", "GenreItems": [ { "Name": "Sitcom", "Id": 133672 } ], "PrimaryImageAspectRatio": 0.6666666666666666, "SeasonName": "Season 3", "ImageTags": { "Primary": "2b9de4cfe6bd221f653f205c470f62d2" }, "BackdropImageTags": [], "MediaType": "Video", "EndDate": "2024-11-20T22:30:00.0000000Z", "Width": 1920, "Height": 1080, "ChannelPrimaryImageTag": "673b8eaef702ceed6827a23ece39840f", "StartDate": "2024-11-20T22:00:00.0000000Z", "IsRepeat": true, "EpisodeTitle": "That Special Tug", "IsSeries": true } }, "InternalDeviceId": 208, "DeviceId": "C23F122F-1057-42A9-B15D-C477A3EC60FC", "ApplicationVersion": "1.8.8 (2)", "AppIconUrl": "https://github.com/MediaBrowser/Emby.Resources/raw/master/images/devices/appletv.png", "SupportedCommands": [ "MoveUp", "MoveDown", "MoveLeft", "MoveRight", "PageUp", "PageDown", "PreviousLetter", "NextLetter", "ToggleOsd", "ToggleContextMenu", "Select", "Back", "SendKey", "SendString", "GoHome", "GoToSettings", "VolumeUp", "VolumeDown", "Mute", "Unmute", "ToggleMute", "SetVolume", "SetAudioStreamIndex", "SetSubtitleStreamIndex", "RefreshMediaSource", "DisplayContent", "GoToSearch", "DisplayMessage", "SetRepeatMode", "SetSubtitleOffset", "SetPlaybackRate", "ChannelUp", "ChannelDown", "PlayMediaSource", "PlayTrailers" ], "SupportsRemoteControl": true } Unable to terminate the session, please see the attached screenshots. curl -X DELETE "http://$EMBY_SERVER_URL:8096/emby/Sessions/b0673bfe9f49d3b39bd4ddf1991fd3cc?api_key=$EMBY_API_KEY" The file '/emby/Sessions/b0673bfe9f49d3b39bd4ddf1991fd3cc' cound not be found.
devz3ro 2 Posted November 21, 2024 Author Posted November 21, 2024 Just saw that version 1.9.2 is the latest of the Emby AppleTV client. I will update from 1.8.8 and try again, hopefully this issue is addressed in that version. 1
devz3ro 2 Posted November 21, 2024 Author Posted November 21, 2024 (edited) Thanks for the quick reply, from what I was told by the user: "I am just turning my television off and letting the Apple TV go to sleep". I don't have this issue with any other client besides Apple TV. I wouldn't mind if it was cosmetic, but unfortunately it's not. The ghost session *does* takes up an active session in my defined limit. If you know of a way to force kill the session through the API please let me know. I tried to locate it using the db file + sqlite3 but can't find it, maybe you're caching it in memory? NOTE(S): 1. It is worth mentioning that this is happening specifically with the m3u IPTV tuner, not static content (I haven't tried with static content yet). 2. These ghost sessions also appear if I restart the emby server application while an active Apple TV client is in use (utilizing the m3u tuner). 3. The ghost session will disappear if the user that created it initiates a new session and exits from that gracefully. Edited November 21, 2024 by devz3ro
Luke 42078 Posted November 21, 2024 Posted November 21, 2024 Please attach the emby server log from when the problem occurred: How to Report a Problem Thanks.
Carlo 4561 Posted December 16, 2024 Posted December 16, 2024 @devz3ro Are you still having a problem?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now