LongMan 97 Posted April 4, 2023 Posted April 4, 2023 (edited) @TeamB, Thanks for this extremely useful plugin. On the Active (Devices) tab there is an undefined device which had been added with an API Key. However, there doesn't seems to be any further tracking. Do you track "users" from API keys? Edited April 4, 2023 by LongMan
TeamB 2410 Posted April 4, 2023 Author Posted April 4, 2023 i don't know, i did not know it was possible to use an api key in a client playback device/app. What client is it?
LongMan 97 Posted April 5, 2023 Posted April 5, 2023 (edited) ersatztv server Edit: https://ersatztv.org/ Edited April 5, 2023 by LongMan
TeamB 2410 Posted April 5, 2023 Author Posted April 5, 2023 when this client is playing back media what does the standard dashboard show?
LongMan 97 Posted April 5, 2023 Posted April 5, 2023 When it is playing, there is nothing in the dashboard.
TeamB 2410 Posted April 5, 2023 Author Posted April 5, 2023 When the client starts and stops playback do you see the play started and stopped messages in the standard dashboard events? I am not sure if the client is not reporting in correctly and the session is not correctly created and then logging will not work. I am not sure I can do a lot about this.
pünktchen 1343 Posted April 5, 2023 Posted April 5, 2023 As a generated api key isn't tied to any user, i don't think Emby will report any playback progress. It's more like an anonymous session.
rbjtech 4881 Posted April 5, 2023 Posted April 5, 2023 26 minutes ago, pünktchen said: As a generated api key isn't tied to any user, i don't think Emby will report any playback progress. It's more like an anonymous session. Agreed - but if you name the API keys in emby - then you'll know exactly what connected as it lists it in the 'Device' column in the Playback Reporting 'Active' screen. The user is undefined though - so I don't think these can be individually reported on.. ?
LongMan 97 Posted April 5, 2023 Posted April 5, 2023 (edited) Your comments make perfect sense. I asked the Dev if he could add user authentication. Hopefully he does. Thanks for taking the time to answer and comment. LongMan Edited April 5, 2023 by LongMan
crocobc 0 Posted April 19, 2023 Posted April 19, 2023 Hi there, Thank you for the plugin Is it possible to add users IP Address in "User Playback Summary" ? If i run "SELECT ROWID, * FROM PlaybackActivity LIMIT 10" i do not see any IP ADDRESS stored in the DB... Would be very helpful to check if users are sharing login/pass with others.... If this question is not where she meant to be, SORRY ^^ Regards
rbjtech 4881 Posted April 19, 2023 Posted April 19, 2023 3 hours ago, crocobc said: Hi there, Thank you for the plugin Is it possible to add users IP Address in "User Playback Summary" ? If i run "SELECT ROWID, * FROM PlaybackActivity LIMIT 10" i do not see any IP ADDRESS stored in the DB... Would be very helpful to check if users are sharing login/pass with others.... If this question is not where she meant to be, SORRY ^^ Regards That level of data is not held in the Playback Reporting db - try the Activity Log db from the main emby server. You'll need to take a copy to query it live.
TeamB 2410 Posted April 19, 2023 Author Posted April 19, 2023 9 hours ago, crocobc said: Hi there, Thank you for the plugin Is it possible to add users IP Address in "User Playback Summary" ? If i run "SELECT ROWID, * FROM PlaybackActivity LIMIT 10" i do not see any IP ADDRESS stored in the DB... Would be very helpful to check if users are sharing login/pass with others.... If this question is not where she meant to be, SORRY ^^ Regards i work for a large software company that takes privacy and pii data very very seriously, to the point of having to have privacy audits and reviews of code bases as part of a release cycle of a project. ip addresses always trigger many many discussions and the ultimate result is we can log it if it is actually needed so for this reason i usually am very cautious about logging data like this in personal projects. however given this data is only viewable by an admin and an admin should already have access to this in the log files then i guess it is ok. I will look into it.
rbjtech 4881 Posted April 20, 2023 Posted April 20, 2023 10 hours ago, TeamB said: i work for a large software company that takes privacy and pii data very very seriously, to the point of having to have privacy audits and reviews of code bases as part of a release cycle of a project. ip addresses always trigger many many discussions and the ultimate result is we can log it if it is actually needed so for this reason i usually am very cautious about logging data like this in personal projects. however given this data is only viewable by an admin and an admin should already have access to this in the log files then i guess it is ok. I will look into it. The source IP is already held in the activity db, along with user, date and time ..
vaise 324 Posted April 21, 2023 Posted April 21, 2023 This just updated on the beta - to version 2.1.0.1. Should it be working ? The only data there is the connected current users. Nothing else is there. All historical data is not showing - has it gone ? Its like it was just reset.
TeamB 2410 Posted April 21, 2023 Author Posted April 21, 2023 I have added Remote Address to the logged data. This required a schema change and the easiest way was to create a new table. The old data is there in a renamed table that with a few sql commands in the query tab you can migrate it across or you can restore from a backup file.
vaise 324 Posted April 21, 2023 Posted April 21, 2023 If you can provide the instructions for that old data migration transfer that would be good. I believe you will be hit with a load of posts like this.
rbjtech 4881 Posted April 21, 2023 Posted April 21, 2023 Restoring the data works ok - but as I only scheduled the task once a week, I have missing data but that's ok. But agree the update should automatically import the previous data - especially as you do not get advised it is being removed before the update.
TeamB 2410 Posted April 21, 2023 Author Posted April 21, 2023 it looks like the emby server beta is broken for me at the moment, when i can get it back up I will write a query to do the import.
rbjtech 4881 Posted April 21, 2023 Posted April 21, 2023 14 minutes ago, TeamB said: it looks like the emby server beta is broken for me at the moment, when i can get it back up I will write a query to do the import. yep - me too (.30) - non web clients appear to be ok ..
TeamB 2410 Posted April 21, 2023 Author Posted April 21, 2023 (edited) STOP this is destructive, back up your playback reporting data first. stop emby server and take a copy of the playback_reporting.db DB before you start. In the query tab run this to get a list of all the tables SELECT name FROM sqlite_master It should give you a list like this PlaybackActivity_20230420_134941 UserList deep_search deep_search_data deep_search_idx deep_search_content deep_search_docsize deep_search_config PlaybackActivity the two tables you are interested in are PlaybackActivity and any table with the date sting in the end like PlaybackActivity_20230420_134941 Edit the following query with the name you have in your above results (DONT USE MINE) INSERT INTO PlaybackActivity SELECT *, "" AS RemoteAddress FROM PlaybackActivity_<TABLE NAME HERE> WHERE DateCreated NOT IN (SELECT DateCreated FROM PlaybackActivity) This will import all the old data into the new table. Edited April 22, 2023 by TeamB 3 1 1
vaise 324 Posted April 21, 2023 Posted April 21, 2023 Yay - Thanks for that - all data is back - just missing the last 12 hours or so.........
vaise 324 Posted April 22, 2023 Posted April 22, 2023 (edited) After this little issue, I have now changed my playback reporting backups to happen daily instead of weekly. Can I ask how I am to restore these however ? Thanks in advance. Doh - Ignore - what a knob : Edited April 22, 2023 by vaise
TeamB 2410 Posted April 22, 2023 Author Posted April 22, 2023 59 minutes ago, vaise said: Yay - Thanks for that - all data is back - just missing the last 12 hours or so......... that is weird, it should have been logging all data still and the import/restore just merges the old so into the new table you should still have the most recent items. can you confirm new data is being logged.
danmarcoux 6 Posted April 23, 2023 Posted April 23, 2023 @TeamB - this is a great plug in!! I've only been using it a few days, but it's great for what I'm doing. One thing that I'd like to see is the addition of the actual filepath/name being played - if at all possible. It looks the ItemName field is the name in the Library, but the actual filenames may be slightly different usually due invalid characters (plus no path) (or it could be totally different if it's recognized differently or may not have an episode name (for a TV show), etc.. For my particular use case right now, I don't really need the path, but I can see where it might be useful to some. My file naming convention is really close to the ItemName field, so the script I'm using works 95% of the time, but knowing the actual filename, well then my script would work 100% of the time! So anyways, thanks again, great work!
crocobc 0 Posted April 23, 2023 Posted April 23, 2023 On 4/21/2023 at 3:26 PM, TeamB said: I have added Remote Address to the logged data. This required a schema change and the easiest way was to create a new table. The old data is there in a renamed table that with a few sql commands in the query tab you can migrate it across or you can restore from a backup file. This is perfect. Thank-you for your prompt response
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