horstepipe 356 Posted June 25, 2022 Share Posted June 25, 2022 20 hours ago, TeamB said: Is this in kodi, does the context menu not work? No, Emby all platforms. Guess it wasn’t designed by that, hopefully the overhaul playlists rewrite comes soon Link to comment Share on other sites More sharing options...
Guest worthington_j Posted June 28, 2022 Share Posted June 28, 2022 Does anybody have a query to view the IP Address a user or device is logging in from? I want to be able to audit a few logins and make sure they are not coming from strange locations. Link to comment Share on other sites More sharing options...
TeamB 2352 Posted June 28, 2022 Author Share Posted June 28, 2022 Unfortunately the ip is not logged in the playback info table so there is no query in playback reporting you can run to get this info. Link to comment Share on other sites More sharing options...
Happy2Play 8281 Posted June 28, 2022 Share Posted June 28, 2022 4 hours ago, worthington_j said: Does anybody have a query to view the IP Address a user or device is logging in from? I want to be able to audit a few logins and make sure they are not coming from strange locations. Pretty sure you would have to look at Emby Activitylog.db. Link to comment Share on other sites More sharing options...
seanbuff 840 Posted June 28, 2022 Share Posted June 28, 2022 1 hour ago, TeamB said: Unfortunately the ip is not logged in the playback info table so there is no query in playback reporting you can run to get this info. Really? I find the Active Clients tab stores 'Remote Address' for up to 2 or more days usually. Where is this stored then? Or is it just being read from the DB that Happy mentioned above? Link to comment Share on other sites More sharing options...
TeamB 2352 Posted June 29, 2022 Author Share Posted June 29, 2022 yes this is just comming from the active sessions info, it is not stored my the playback reporting plugin. it is in the Emby Activitylog.db 1 Link to comment Share on other sites More sharing options...
bretswinney 20 Posted July 15, 2022 Share Posted July 15, 2022 (edited) I need help with the query that I can combine old user data with new data @TeamB Edited July 15, 2022 by bretswinney Link to comment Share on other sites More sharing options...
TeamB 2352 Posted July 15, 2022 Author Share Posted July 15, 2022 (edited) @bretswinney if these are the same user then you can update the old user ID to the new one using SQL. First run this with the "Replace UserId with UserName" turn on in the Query tab of the plugin SELECT UserId, UserId FROM PlaybackActivity GROUP BY UserId It should give yo a list of users with ids, if the user was not sound in the system then it will show you the UserId twice. You will need to work out which unmapped user IDs belong to which user and then run a query to update all the unmapped user to the new user id. UPDATE PlaybackActivity SET UserId = '<to UserId>' WHERE UserId = '<from UserId>' This is a destructive action and you should take a backup of your playback_reporting.db file before running it in case you screw up. Edited July 15, 2022 by TeamB Link to comment Share on other sites More sharing options...
bretswinney 20 Posted July 15, 2022 Share Posted July 15, 2022 @TeamBIt shows the user twice now Link to comment Share on other sites More sharing options...
TeamB 2352 Posted July 15, 2022 Author Share Posted July 15, 2022 what is the result of this query SELECT UserId, UserId FROM PlaybackActivity GROUP BY UserId does it show the user twice, post the result Link to comment Share on other sites More sharing options...
bretswinney 20 Posted July 16, 2022 Share Posted July 16, 2022 Link to comment Share on other sites More sharing options...
Happy2Play 8281 Posted July 16, 2022 Share Posted July 16, 2022 Wouldn't enabling "Replace UserId with UserName" on the query screen help with the duplicates? Link to comment Share on other sites More sharing options...
bretswinney 20 Posted July 16, 2022 Share Posted July 16, 2022 Didn't help Link to comment Share on other sites More sharing options...
Happy2Play 8281 Posted July 16, 2022 Share Posted July 16, 2022 Ah looking at the headers you already had it enabled in the first image, but UserName is not shown except on those three. And there is something wrong with KK as it has no UserID. Not sure how you will be able to link the unknown user to known users besides guess work. Dev might have some ideas. How many users do you have? Link to comment Share on other sites More sharing options...
bretswinney 20 Posted July 16, 2022 Share Posted July 16, 2022 16 Link to comment Share on other sites More sharing options...
TeamB 2352 Posted July 16, 2022 Author Share Posted July 16, 2022 (edited) 1 hour ago, bretswinney said: I think you got the UPDATE query wrong You dont want to replace the UserId with the name, you want to replace it with the new UserId, you are swapping out the old UserId for the new one. Example: Lets say old user id 8d17115859ec48cf9b150d8e1611e011 is for JP Luna that has current UserId of 9811b261884b4f32b892d6d3d14ec170 The query would be UPDATE PlaybackActivity SET UserId = '9811b261884b4f32b892d6d3d14ec170' WHERE UserId = '8d17115859ec48cf9b150d8e1611e011' you are updating the old userid with the new one. The above ID could be wrong as I had to type them in manually. Edited July 16, 2022 by TeamB Link to comment Share on other sites More sharing options...
bretswinney 20 Posted July 16, 2022 Share Posted July 16, 2022 Now it's doing this Link to comment Share on other sites More sharing options...
TeamB 2352 Posted July 16, 2022 Author Share Posted July 16, 2022 Just now, bretswinney said: Now it's doing this yeah you probably broke it lol You kept a backup of the playback_repoting.db file correct? shut down the server roll back the changes. Start again, see the above example query, note the iD might not be correct. Link to comment Share on other sites More sharing options...
bretswinney 20 Posted July 16, 2022 Share Posted July 16, 2022 I have just started using Synoloogy & don't know how to change .db file. Anyone know how to? Link to comment Share on other sites More sharing options...
Happy2Play 8281 Posted July 16, 2022 Share Posted July 16, 2022 15 minutes ago, bretswinney said: I have just started using Synoloogy & don't know how to change .db file. Anyone know how to? Not a Synology user but you would have to ssh to the db location. Did you make a backup of this database before making changes? Do you have backups setup in the plugin settings? Link to comment Share on other sites More sharing options...
bretswinney 20 Posted July 16, 2022 Share Posted July 16, 2022 17 minutes ago, Happy2Play said: Not a Synology user but you would have to ssh to the db location. Did you make a backup of this database before making changes? I do from my old mac server Do you have backups setup in the plugin settings? yes Link to comment Share on other sites More sharing options...
Happy2Play 8281 Posted July 16, 2022 Share Posted July 16, 2022 9 minutes ago, bretswinney said: Do you have backups setup in the plugin settings? yes You should be able to load a backup if the current db is corrupt. But ideally you should ensure you have a backup of the db before making any changes. 12 minutes ago, bretswinney said: Did you make a backup of this database before making changes? I do from my old mac server No sure how reliable this will be on a new server. I am guessing all the userids changed when you switched from Mac to Synology? Link to comment Share on other sites More sharing options...
bretswinney 20 Posted July 16, 2022 Share Posted July 16, 2022 2 minutes ago, Happy2Play said: You should be able to load a backup if the current db is corrupt. But ideally you should ensure you have a backup of the db before making any changes. No sure how reliable this will be on a new server. I am guessing all the userids changed when you switched from Mac to Synology? yes Link to comment Share on other sites More sharing options...
Happy2Play 8281 Posted July 16, 2022 Share Posted July 16, 2022 4 minutes ago, bretswinney said: I am guessing all the userids changed when you switched from Mac to Synology? yes Did you use the server configuration plugin to restore users on the new server or just manually add them? But the difficulty will be aligned userids. Is the Mac server still functional? If so you could run the query on it to get pervious username/userids. Link to comment Share on other sites More sharing options...
bretswinney 20 Posted July 16, 2022 Share Posted July 16, 2022 Yeah db is now messed up & I can't get in it to fix it. The one thing I don't like about the synology server. Link to comment Share on other sites More sharing options...
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