Skip to main content

minimalistic media manager

Project description

File        : README.md
Maintainer  : Felix C. Stegerman <flx@obfusk.net>
Date        : 2017-12-10

Copyright   : Copyright (C) 2017  Felix C. Stegerman
Version     : v0.2.1

PyPI Version Build Status

Description

m - minimalistic media manager

m keeps track of which files you’ve played (or are still playing) and thus allows you to easily continue playing the next file (using vlc).

  • Supports importing existing playing/watched data from Kodi.

  • Stores its data in JSON files (one per directory) in ~/.obfusk-m; you can put this directory in git if you want a changelog :)

NB: extracting the timestamp from the vlc config is a little hacky :(

NB: m uses $PWD to make sure it sees the current path the same as the shell it is run from (i.e. it does not resolve the path by following symlinks, allowing the link targets to be relocated); unfortunately, this means that it does not see two directories as identical if they are accessed using different paths, even if the resolved path is the same. So you may want to avoid using different paths to the same directory (and --dir).

Examples

$ cd /some/media/dir
$ m ls    # list files ([*] = skip, [x] = done, [>] = playing, [ ] = new)
[x] Something - 01.mkv
[x] Something - 02.mkv
[x] Something - 03.mkv
[x] Something - 04.mkv
[x] Something - 05.mkv
[x] Something - 06.mkv
[>] Something - 07.mkv 0:04:04
[ ] Something - 08.mkv
[ ] Something - 09.mkv
$ m next  # plays current/next episode (i.e. #7) w/ vlc
$ m ld    # list dirs (shows #playing, #new for indexed subdirectories)
(   2!) Dir A
(     ) Dir B
(1> 0!) Dir C
(   0!) Dir D

Commands include: list/ls, list-dirs/ld, list-all/la, next, play FILE, mark FILE, unmark FILE, skip FILE, index, playing, watched, skipped.

See also the tests in the source code for more examples.

Installing

You can just put m.py somewhere on your $PATH (in e.g. ~/bin; I suggest calling it m, but you’re free to choose another name).

Alternatively, you can use pip:

$ pip3 install --user mmm   # for Debian; on other OS's you may need
                            # pip instead of pip3 and/or no --user

TODO

  • ack TODO

  • only use safe() when stdout is a tty?

  • bash completion?

  • more file extensions!

  • --tree for playing etc.?

  • kodi db export/sync?

  • sign pypi package?

License

GPLv3+.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mmm-0.2.1.tar.gz (22.4 kB view hashes)

Uploaded Source

Built Distribution

mmm-0.2.1-py3-none-any.whl (11.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page