TeamB 2410 Posted April 23, 2023 Author Posted April 23, 2023 (edited) 7 hours ago, danmarcoux said: 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! if you are running an external script you can use the item id to query the emby api for the item details that would include the path and filename. The API you can use is http://<address:port>/emby/Items/?ids=<ids of item>&fields=path&api_key=<your api key> <address:port> = your abbress and port for your Emby server <ids of items> = this is a single ID or a list of ids comma seperated <your api key> = is the server API key you generate in the Emby server Api Key settings you will get back some JSON you can parse to get your item details, the path is in there. Edited April 23, 2023 by TeamB
pwhodges 1799 Posted April 23, 2023 Posted April 23, 2023 On 22/04/2023 at 01:59, TeamB said: 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. After the import mine has all my data up to the present without any missing gap. Thanks for the instructions. Paul
Neminem 767 Posted April 24, 2023 Posted April 24, 2023 (edited) Guess this is the new thing Guess it only applyes from app update. Edited April 24, 2023 by jaycedk
TeamB 2410 Posted April 24, 2023 Author Posted April 24, 2023 2 hours ago, jaycedk said: Guess this is the new thing Guess it only applyes from app update. if you are referring to the remote address then yes it is new and if you restore from backup it will be undefined for old data as it was not logged until the latest version.
Q-Droid 848 Posted April 24, 2023 Posted April 24, 2023 This plugin just updated for me on Emby stable to v2.0.0.3 but there was no data after the update. Was this supposed to happen? Since the query returned no rows I just restored from from backup. I may have jumped the gun...
TeamB 2410 Posted April 25, 2023 Author Posted April 25, 2023 4 hours ago, Q-Droid said: This plugin just updated for me on Emby stable to v2.0.0.3 but there was no data after the update. Was this supposed to happen? Since the query returned no rows I just restored from from backup. I may have jumped the gun... yes it was expected, either restore from backup or there is an sql command you can run (see a few posts back) to import all the old data
Q-Droid 848 Posted April 25, 2023 Posted April 25, 2023 (edited) 7 hours ago, TeamB said: yes it was expected, either restore from backup or there is an sql command you can run (see a few posts back) to import all the old data That's what I ended up doing and also found the renamed backup table. They were both the same so the restore from backup was enough. I just wasn't expecting the plugin update on Emby stable to not migrate the data and I suspect you're going to have some fresh posts about that. Edited April 25, 2023 by Q-Droid
fahad92 6 Posted April 26, 2023 Posted April 26, 2023 On 4/21/2023 at 4:20 PM, TeamB said: 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. Hi , thank you for this amazing plugin. I don't have a backup and wasn't aware that I will lose all my data and I'm not sure what I should do to get my data back, your steps above is obviously not nooby friendly. What I should from this screenshot. Well like what Michael scott said: explain this like I'm five. Joke aside this is something up to you to do and in all cases love your work.
TeamB 2410 Posted April 26, 2023 Author Posted April 26, 2023 (edited) @fahad92 you are almost there, just run this now in the query tab like you did for the first query INSERT INTO PlaybackActivity SELECT *, "" AS RemoteAddress FROM PlaybackActivity_20230424_160540 WHERE DateCreated NOT IN (SELECT DateCreated FROM PlaybackActivity) Edited April 26, 2023 by TeamB 1
dual-o 19 Posted April 26, 2023 Posted April 26, 2023 Hello, my report DB was gone too after autoupdate to 2.0.0.3. I delete the DB in the filesystem and restart emby-server. The restore from backup doesn't work for me Is there a process to check if the restore is complete. My Backup File is 13M.
TeamB 2410 Posted April 26, 2023 Author Posted April 26, 2023 32 minutes ago, dual-o said: I delete the DB in the filesystem and restart emby-server. umm why did you do that?
fahad92 6 Posted April 26, 2023 Posted April 26, 2023 (edited) 9 hours ago, TeamB said: @fahad92 you are almost there, just run this now in the query tab like you did for the first query INSERT INTO PlaybackActivity SELECT *, "" AS RemoteAddress FROM PlaybackActivity_20230424_160540 WHERE DateCreated NOT IN (SELECT DateCreated FROM PlaybackActivity) Thank you so much for your help Edited April 26, 2023 by fahad92
dual-o 19 Posted April 27, 2023 Posted April 27, 2023 (edited) 8 hours ago, TeamB said: umm why did you do that? I understand that the DB must be started from scratch cause of the new schema. Anyway I have a backup of my DB File, after the update and a backup tsv from Monday. How can I restore it? Thanks in advance Edited April 27, 2023 by dual-o
TeamB 2410 Posted April 27, 2023 Author Posted April 27, 2023 29 minutes ago, dual-o said: I understand that the DB must be started from scratch cause of the new schema. yes but the plugin does this for you, at no point did i mention deleting your db file manually. 30 minutes ago, dual-o said: backup tsv from Monday. How can I restore it? yes use your backup from monday to restore.
seanbuff 1050 Posted April 27, 2023 Posted April 27, 2023 31 minutes ago, dual-o said: How can I restore it? Within the plugin, 'Settings' tab > 'Backup' > 'Load Backup Data'
Clangrijan 19 Posted April 28, 2023 Posted April 28, 2023 I just wanted to write to say thank you and congratulations on this amazing plugin. I encourage you to keep maintaining it, as you are doing us all a favor. Thank you very much. 1
dual-o 19 Posted April 28, 2023 Posted April 28, 2023 On 4/27/2023 at 9:16 AM, seanbuff said: Within the plugin, 'Settings' tab > 'Backup' > 'Load Backup Data' It works, but it takes a long time in the background. Thanks for your quick reply. P.S. it would be helpful to have a visual restore progress
horstepipe 373 Posted May 23, 2023 Posted May 23, 2023 On 12/15/2022 at 1:53 PM, horstepipe said: a little request @TeamB Would you mind adding a sorting option (by Devices, Clients, Users etc.) at the Active Clients screen? Did you oversee that one or is that no option? Best regards
TeamB 2410 Posted May 23, 2023 Author Posted May 23, 2023 3 hours ago, horstepipe said: Did you oversee that one or is that no option? Best regards i forgot ;-/ i will have a look at this 1
MangoMC 50 Posted July 14, 2023 Posted July 14, 2023 Is there a query to see all never watched movies and / or TV Shows? 1
rbjtech 4881 Posted July 14, 2023 Posted July 14, 2023 23 minutes ago, MangoMC said: Is there a query to see all never watched movies and / or TV Shows? I don't believe this is possible from the PlaybackActivity database - as it will only record details for 'played' items. To query what has never been watched, then you'll need to run the query on the main Emby database for each user, or query via the API.
Schleudertrauma 10 Posted July 28, 2023 Posted July 28, 2023 Hey there, is it possible to clear the database and start from scratch? I had to set up the server new due to a change of the OS. I implemented a backup but now several users have the same colour and i don't know how to fix that. I have i.e. 2 users and in the playback chart both users are shown in pink and when i set the colour to blue in the settings tab then the colour changes for both users.
TeamB 2410 Posted July 28, 2023 Author Posted July 28, 2023 you have a few options to reset the usage data. 1. Set the retention to say 1 day and then run the DB clean task in the scheudled tasks area, remember to set it back after 2. Run "delete from playback_reporting" in the query tab 3. Shut down emby server and delete the playback_reporting.db file in the data directory, restart emby
vaise 324 Posted August 1, 2023 Posted August 1, 2023 I want to produce a list of the biggest watchers in a time period. I pul back data for a year, the data shows 'weeks, days, hours, minutes' i.e : 5w 5d 7h 32m. This is impossible to sort on in excel. Can you tell me how hours are calculated here ? is is 24 hours in a day, 168 in a week ? So I can work it the correct conversion formular in excel to change to hours.
TeamB 2410 Posted August 1, 2023 Author Posted August 1, 2023 1 hour ago, vaise said: I want to produce a list of the biggest watchers in a time period. I pul back data for a year, the data shows 'weeks, days, hours, minutes' i.e : 5w 5d 7h 32m. This is impossible to sort on in excel. Can you tell me how hours are calculated here ? is is 24 hours in a day, 168 in a week ? So I can work it the correct conversion formular in excel to change to hours. how and where are you pulling this data from? try the query tab to write a query to give you the data you need.
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