Comments (11)
I played a bit with it and got to work a very simple addon which just logs all starts, pauses and ends of any media played with title, artist, filename etc.
Do you want any other information?
Possible would be:
- current position in the movie/audio track
- when ended (duration since started)
I'm open for other ideas
from memacs.
I chose the Simple stupid Addon solution:
Here is a prototype.
You can download the zip file and install it in Kodi. In the settings you have to provide a folder in which to save the logs. Video and Audio logs are separated.
Currently it saves
- Timestamp
- event (play|pause|resume|stop)
- time point in track
- total time of track
- filename
- title
plus in the audio case
- Artist
- Album
and in the video case
- video type (movie|episode)
- TV Show Title (blank if movie)
- Season (-1 if movie)
- Episode Number (-1 if movie)
At the end of the month I might have time to work on the Memacs module
from memacs.
I would love such a feature and I looked a bit into this. I did not find any log file or anything similar which included information about the playback. However there are ways to ask Kodi while it is running for its playback status, so one would be able to create a simple daemon which would run on the computer on which Kodi is running and periodically (like every second) ask for the current status and log it to some file. However this daemon would be very different from the rest of the Memacs modules ( as it would have to run all the time).
I therefore would suggest to implement such a tool separate from Memacs (best way would be to write a Kodi addon) and then use Memacs' csv module to read in the output of this tool.
from memacs.
I also looked whether or not I could extract played files from any log and did not find any. You rationale is perfectly understandable. My KODI runs on LibreELEC GNU/Linux. Maybe someone volunteers for this so that we can link this separate repository.
from memacs.
I, personally, am interested in Org mode entries like:
** <2018-09-29 Sat 16:46-18:58> 2009 Avatar -- english.avi
for any video (start/end time + file name)
From your comment above, I do assume that your end result consists of multiple separate Org mode headings for one movie, correct?
I did not make up my mind whether or not I am interested in audio logs as well.
from memacs.
Yes multiple sperate Org mode headings would be the easiest solution. But I agree with you that a time range in Org would be nice. I would appreciate your advice on two points:
- How to deal with breaks in which the move is paused. Maybe use a minimum duration for breaks.
- Should this complexity ( compute start and end and determine breaks) be inside the Kodi addon? Then one could just use the Memacs csv module to read in the data. The other alternative would be to keep the Kodi addon simple and stupid and let it log all the events and then create a dedicated Memacs module for importing the Kodi data.
Finally video or audio logs are nearly the same (only the metadata is different), so I will include both but obviously the user can toggle both on or off.
from memacs.
Good question on "put complexity in KODI or CSV part". I don't have a strong opinion on that. With simplephonelogs I had a similar issue but the answer was quite easy to find: either put login into Tasker (hard to code/maintain) or into the Memacs module (much easier to do). With KODI, it's a different story. Probably I'd choose Python/Memacs just because I do feel more comfortable compared to the KODI environment.
Breaks: my approach would be: if the pause is less than 15(?) minutes, ignore it and handle it like no pause happened.
Audio/video: I'd love to see different settings (artist, file name, ...) because with music I actually would prefer more meta-data in contrast to movies where the only meta-data that makes sense is the file name on my setup. However, I can't tell whether KODI tries to get more meta-data (potential wrong ones) from the web or if the files contain more meta-data which I don't care.
from memacs.
Verzeihung!
Somehow, I was losing touch with this issue for way too long. Will soon spend some time trying out this code and give feedback.
All this lost playback log data of mine since Oct 2018 😩
from memacs.
https://github.com/DerBeutlin/KodiPlayEventLogger/releases successfully tested on my old LibreELEC 8.2.2 with Kodi 17.6. I will most probably re-flash to the newest LibreELEC 9.2 with Kodi 18.5 in the next weeks.
And I need to test the Memacs module as well, of course. So I need to gather some playback log data first. ;-)
from memacs.
I have actually totally forgotten about this but might try it out again in the next weeks, thanks for testing it!
from memacs.
I'll consider this issue as solved although I personally am "blocked" by the issue DerBeutlin/KodiPlayEventLogger#1 which is tracked at the Kodi add-on (as it should be).
I'm very thankful for the module so far and the logging method on Kodi!
from memacs.
Related Issues (20)
- Difference to Orger + plans for a Hypothesis module HOT 1
- memacs_firefox output does not include url title HOT 7
- Updating to Python 3.9 results in 'HTMLParser' object has no attribute 'unescape' error HOT 4
- memacs/ical fails to parse valid iCalendar files & generally mishandles timezones HOT 1
- memacs_filenametimestamps exclude multiple directories not working HOT 1
- Can't parse timestamp HOT 1
- suggest: screencast examples HOT 5
- memacs_csv: help parameter is not working HOT 3
- implement sub-packages to install only selected module dependencies HOT 6
- suggest revision installation via pip, provision of test/reference data HOT 2
- a few links in `README.org` are dysfunctional HOT 1
- suggest: extension of general README.org (though pending revision) HOT 1
- Project dependencies may have API risk issues HOT 1
- redirecting Memacs std output to file causes broken Orgdown format (instead of using -o parameter) HOT 8
- Add optional parameter for body text
- Feature Request: Matrix Module HOT 1
- --add-to-time-stamps doesn't work at least with filenametimestamp module
- AttributeError: type object 'OrgFormat' has no attribute 'datetime' - after ubuntu update HOT 3
- kodi: probable issue with content of row (OrderedDict) HOT 3
- filenametimestamps exclusion not working if excluded directory contains "bad files" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from memacs.