Jump to content

Playback Reporting


TeamB
 Share

Recommended Posts

Hi @TeamB

First of all - amazing Plugin - thanks very much for this, I use it daily. :)

Could I request one small update to the logging in the Emby main log though please ?

Currently, the 'report' itself does not conform to the logging standard, and thus you get all the watched items in the logging 'class' when you try and filter the logs.

I believe you simply need to insert a TAB before you write the report detail - then it is classed as a continuation of the previous log entry.

Let me show you an example if I may :

play1.PNG.1430e5c28a611e1d496edd380aa0a673.PNG

So for the highlighted line - you will see it has multiple line content (shown in the grey section underneath).  I have gone onto the log and manually added a' TAB' infront of the 'report' items - thus the logging software thinks it is part of the previous log entry - which it is.

On the entries I have not added a tab to - these are classed as 'new entries' on the log - and thus they break the log parsing, and show as individual log entries - which I can't filter on etc.

I've attached the actual example log (with annotations) so you can hopefully see how the above has been created.

Please let me know if you need any further detail or examples.

Many Thanks !

embyserver - playback_reporting_test.txt

Edited by rbjtech
Link to comment
Share on other sites

the log info is not meant to be parse-able, it is for tracking and finding issues. I just dump this info out to the log before sending the notification, it is just so you can see what would be in the notification.

I have no control over the Emby server logger and how it formats the output, this could change at any time.

What are you using this info for?

Link to comment
Share on other sites

Hi - thanks for getting back to me.

The emby log uses standard log formatting - so it is fully parse-able by logging software - it has a date, type, class and message - pretty standard industry stuff.

You plugin does not conform to the logging standards and just dumps text into the log - thus if I want to filter Class by 'App' (for example) then I get a load of other stuff picked up as 'Class' when it is not - ie names of Recorded Items ..

play2.PNG.46946038fcf3c27293e4c7a9532e5bc2.PNG

If you don't have control of what is being written to the log - then would it be possible to just prefix each line with a Tab before writing it - that will achieve the same result - and presumably any reports or notifications will just be indented by a Tab ? 

Either that, or have an option not to dump the 'report' contents to the emby log - just keep the proper log entries - that would also work.

Thanks !

Edited by rbjtech
Link to comment
Share on other sites

Thanks @TeamB - I just loaded, so need to wait for the end of day report via a Notification - thanks for the update 👍

edit - All good :).  My log filter now only includes the correct Classes.   Thanks again.

Edited by rbjtech
Link to comment
Share on other sites

  • 3 months later...
1 hour ago, jscoys said:

Hello! is the playback reporting plugin missing from the catalog? Can’t find it anymore…

What do you mean?

image.png.1b2ce6d77b4dc52a78da0c173c09a703.png

Link to comment
Share on other sites

  • 3 weeks later...
worthington_j

Is there a report that will show if Movie or TV Show has ever been watched by any user?  

Link to comment
Share on other sites

26 minutes ago, worthington_j said:

Is there a report that will show if Movie or TV Show has ever been watched by any user?  

SELECT * FROM PlaybackActivity
WHERE ItemName = 'The Matrix Resurrections'

Something like this as a Custom Report (SQL) will show every user ever to have watched 'The Matrix Resurrections' for example.

Possible query items (database Schema) is :-

image.png.face19b39a28300d054efc2415ce0dad.png

Edited by rbjtech
Link to comment
Share on other sites

  • 4 weeks later...

Hey there, been using this plugin for ages. I migrated by Emby server a while ago and now my user UIDs have been updated, I think. As a result Playback reporting shows I have two 'users' one of whom is 'unknown'. I know for a fact they are the same and I'd like it to show as much.

If there's some kind of SQL query that I can run to unify the database that'd be great.

Many thanks in advance,
Ben

2022-02-03 23_13_37-Window.png

Link to comment
Share on other sites

I'm in the same boat as BenVenn. It would be nice to have a way to remap users, like the configuration backup/restore plugin does for users.

Link to comment
Share on other sites

Happy2Play
On 2/3/2022 at 3:16 PM, BenVenn said:

Hey there, been using this plugin for ages. I migrated by Emby server a while ago and now my user UIDs have been updated, I think. As a result Playback reporting shows I have two 'users' one of whom is 'unknown'. I know for a fact they are the same and I'd like it to show as much.

If there's some kind of SQL query that I can run to unify the database that'd be great.

Many thanks in advance,
Ben

2022-02-03 23_13_37-Window.png

 

1 hour ago, rhodges said:

I'm in the same boat as BenVenn. It would be nice to have a way to remap users, like the configuration backup/restore plugin does for users.

I would probably just open the database with a viewer and update the UserId column but you would need to know the corresponding server userids.

Don't know how to get it to work in plugin query menu, but directly in DB view you can use this query.

UPDATE PlaybackActivity
SET UserId= replace(UserId, 'Unknown userid', 'change to userid')
where UserId like 'Unknown userid';

example
UPDATE PlaybackActivity
SET UserId= replace(UserId, '3d4755c2dbde454494c33954155f7edc123', '3d4755c2dbde454494c33954155f7edc')
where UserId like '3d4755c2dbde454494c33954155f7edc123';

 

Edited by Happy2Play
  • Like 1
Link to comment
Share on other sites

You use the query tab in the plugin to run whatever SQL you need, here are some examples

https://emby.media/community/index.php?/topic/105485-playback-reporting-plug-in-deleting-data/#comment-1110377

You can get all your user ID using the following query, make sure you check the box "Replace UserId with UserName" this will replace the first UserId with the actual user name for reference.

SELECT UserId, UserId
FROM PlaybackActivity
GROUP BY UserId

then do do the update:

UPDATE PlaybackActivity
SET UserId = '<new user if here>'
where UserId = '<old user id here>';

 

Link to comment
Share on other sites

  • 2 months later...

Hello,

I'm trying to find out if a user has read 2 media at the same time via the "Query". I'm not an expert in SQL but if someone could help me it would be great.

I managed to make some other nice queries like, the number of unique users per month, per year. 

Link to comment
Share on other sites

  • 1 month later...
horstepipe

hey @TeamB
Is this plugin 4.7.4.0 compatible?

Just noticed that the "activity playlists" created by the plugin contain less movies than they should.

Link to comment
Share on other sites

horstepipe

As you can’t get to the info dialogue from a playlist, would you mind adding an option creating a collection instead of a playlist?

Link to comment
Share on other sites

horstepipe
21 minutes ago, TeamB said:

yeah it should work with 4.7

thanks,

but something about these playlists seems to go wrong.

If I create a movie playlist for the last 7 days, size 15 - it creates a playlist containing 13 items.

If I change the settings to size 20, it creates a playlist containing 17 items.

 

So the playlists items are always below the selected value.

 

Link to comment
Share on other sites

horstepipe
59 minutes ago, TeamB said:

Is there any pattern to it?

Didn’t notice one yet but will take a deeper look at the weekend.

Link to comment
Share on other sites

10 hours ago, horstepipe said:

As you can’t get to the info dialogue from a playlist, would you mind adding an option creating a collection instead of a playlist?

Is this in kodi, does the context menu not work?

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
 Share

×
×
  • Create New...