geigi / cozy

🎧 Listen to audio books 📚 on Linux
https://cozy.sh
GNU General Public License v3.0
1.12k stars 88 forks source link

Add mka support #116

Open Dalan94 opened 6 years ago

Dalan94 commented 6 years ago

Bug/Feature description

The mka (Matroska) container is currently not supported. It can handle any format and support chapter so it permit to store audiobook in one single file which is great.

Here is the trace when I try to import it:

['/usr/bin/com.github.geigi.cozy']
19:14:26 [MainThread  ] [main      ] [INFO ]  ('arch', 'Manjaro', 'Linux')
19:14:26 [MainThread  ] [main      ] [INFO ]  Starting up cozy 0.6.0
19:14:27 [MainThread  ] [ui        ] [INFO ]  Initialize main window
19:14:27 [MainThread  ] [ui        ] [INFO ]  Not connecting about close button.
19:14:27 [Thread-2    ] [offline_ca] [INFO ]  Startet processing queue
19:14:27 [UpdateDataba] [importer  ] [INFO ]  Total import time: 2.86102294921875e-06
19:14:27 [UpdateDataba] [offline_ca] [INFO ]  Startet processing queue
Exception in thread DragDropImportThread:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/peewee.py", line 5723, in get
    return clone.execute()[0]
  File "/usr/lib/python3.6/site-packages/peewee.py", line 3523, in __getitem__
    return self.row_cache[item]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.6/site-packages/cozy/importer.py", line 374, in copy
    copy_to_audiobook_folder(path)
  File "/usr/lib/python3.6/site-packages/cozy/importer.py", line 388, in copy_to_audiobook_folder
    shutil.copytree(path, cozy.db.Storage.select().where(cozy.db.Storage.default == True).get().path + "/" + name)
  File "/usr/lib/python3.6/site-packages/peewee.py", line 5728, in get
    (clone.model, sql, params))
cozy.db.StorageDoesNotExist: <Model: Storage> instance matching query does not exist:
SQL: SELECT "t1"."id", "t1"."path", "t1"."location_type", "t1"."default", "t1"."external" FROM "storage" AS "t1" WHERE ("t1"."default" = ?) LIMIT ? OFFSET ?
Params: [True, 1, 0]

19:15:32 [MainThread  ] [ui        ] [INFO ]  Closing.
19:15:32 [MainThread  ] [titlebar  ] [INFO ]  Closing.
19:15:32 [MainThread  ] [player    ] [INFO ]  Closing.
19:15:32 [MainThread  ] [db        ] [INFO ]  Closing.
19:15:32 [MainThread  ] [ui        ] [INFO ]  Closing app.
19:15:32 [MainThread  ] [ui        ] [INFO ]  App closed.

Steps to reproduce

Open cozy and import an mka file.

System Information

alexminder commented 4 years ago

Matroska/WebM + Opus + Chapters + Cover image - it is the best open standard and quality solution for audiobooks. I want cross-post for some thoughts: https://github.com/PaulWoitaschek/Voice/issues/619#issue-238330181 http://zderadicka.eu/opus-audio-codec-for-audio-books-and-more/ https://kodi.wiki/view/Audiobooks#Resume_Points

shellheim commented 7 months ago

Any progress on this?