tiny-dlna 0.5.0__tar.gz → 0.5.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tiny-dlna
3
- Version: 0.5.0
3
+ Version: 0.5.2
4
4
  Summary: a tiny DLNA receiver
5
5
  Home-page: https://github.com/mitnk/tiny-dlna
6
6
  Author: mitnk
@@ -27,7 +27,10 @@ $ ln -sf /Applications/mpv.app/Contents/MacOS/mpv /usr/local/bin/
27
27
 
28
28
  ## Tiny DLNA Cli
29
29
 
30
- To do.
30
+ List available DLNA devices:
31
+ ```
32
+ $ tiny-cli list
33
+ ```
31
34
 
32
35
  ## Related projects
33
36
 
@@ -28,7 +28,7 @@ Note: mpv needs to be installed on your system.
28
28
 
29
29
  setup(
30
30
  name='tiny-dlna',
31
- version='0.5.0',
31
+ version='0.5.2',
32
32
  description='a tiny DLNA receiver',
33
33
  long_description=DESC,
34
34
  url='https://github.com/mitnk/tiny-dlna',
@@ -44,5 +44,6 @@ setup(
44
44
  },
45
45
  install_requires=[
46
46
  'flask>=3.0.0',
47
+ 'psutil>=6.0.0',
47
48
  ],
48
49
  )
@@ -1,3 +1,4 @@
1
+ import argparse
1
2
  import json
2
3
  import logging
3
4
  import socket
@@ -71,16 +72,11 @@ def get_dlna_devices():
71
72
  print(json.dumps(result, sort_keys=True, indent=2))
72
73
 
73
74
 
74
- def main(args):
75
- if args.command == 'list':
76
- if args.verbose:
77
- logger.setLevel(logging.DEBUG)
78
-
79
- get_dlna_devices()
80
-
81
-
82
- if __name__ == '__main__':
83
- import argparse
75
+ def main():
76
+ logging.basicConfig(
77
+ level=logging.ERROR,
78
+ format='[%(asctime)s][%(levelname)s] %(message)s',
79
+ )
84
80
 
85
81
  parser = argparse.ArgumentParser(prog='tiny-cli')
86
82
  subparsers = parser.add_subparsers(dest='command', help='Choose a command', required=True)
@@ -89,10 +85,12 @@ if __name__ == '__main__':
89
85
  greet_parser.add_argument('-v', dest='verbose', action='store_true', help='Enable verbose logs')
90
86
 
91
87
  args = parser.parse_args()
88
+ if args.command == 'list':
89
+ if args.verbose:
90
+ logger.setLevel(logging.DEBUG)
92
91
 
93
- logging.basicConfig(
94
- level=logging.ERROR,
95
- format='[%(asctime)s][%(levelname)s] %(message)s',
96
- )
92
+ get_dlna_devices()
97
93
 
98
- main(args)
94
+
95
+ if __name__ == '__main__':
96
+ main()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tiny-dlna
3
- Version: 0.5.0
3
+ Version: 0.5.2
4
4
  Summary: a tiny DLNA receiver
5
5
  Home-page: https://github.com/mitnk/tiny-dlna
6
6
  Author: mitnk
@@ -0,0 +1,2 @@
1
+ flask>=3.0.0
2
+ psutil>=6.0.0
@@ -1 +0,0 @@
1
- flask>=3.0.0
File without changes
File without changes
File without changes