Skip to content

freevo doesn't save resume position in case recording is being #16

@kovalvalerii

Description

@kovalvalerii

Hi,
I faced with that problem when tried to playback a video what is being recorded. When I stopped it the resume position (autobookmark) wasn't saved because the info.filename wasn't existed yet.

In the log I found an exception, fixed the code but after that I found another issue.
Even if the autobookmark was already saved for that video in time when it is being recorded then after it finished the resume will be disabled as well.

Can anyone point me to the place where freevo calls store info at the end of recording?

BTW, here is the code what I fixed:

diff --git a/src/item.py b/src/item.py
index d0eacf6..3251715 100644
--- a/src/item.py
+++ b/src/item.py
@@ -422,9 +422,10 @@ class Item:
         if hasattr(self, 'filename'): logger.log(9, 'filename=%s', self.filename)
 
         if isinstance(self.info, mediainfo.Info):
+            if not hasattr(self.info, 'filename'):
+                self.info.filename = self.filename
             if not self.info.store(key, value):
                 logger.info('cannot store \'%s\':\'%s\' for \'%s\'', key, value, self.filename)
-
         else:
             logger.info('cannot store \'%s\':\'%s\' for \'%s\' item, not mediainfo', key, value, self.filename)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions