Code Monkey home page Code Monkey logo

Comments (11)

DerBeutlin avatar DerBeutlin commented on May 29, 2024 1

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.

DerBeutlin avatar DerBeutlin commented on May 29, 2024 1

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.

DerBeutlin avatar DerBeutlin commented on May 29, 2024

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.

novoid avatar novoid commented on May 29, 2024

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.

novoid avatar novoid commented on May 29, 2024

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.

DerBeutlin avatar DerBeutlin commented on May 29, 2024

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.

novoid avatar novoid commented on May 29, 2024

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.

novoid avatar novoid commented on May 29, 2024

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.

novoid avatar novoid commented on May 29, 2024

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.

DerBeutlin avatar DerBeutlin commented on May 29, 2024

I have actually totally forgotten about this but might try it out again in the next weeks, thanks for testing it!

from memacs.

novoid avatar novoid commented on May 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.