tiny-dlna 0.7.0__tar.gz → 0.7.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.
- {tiny-dlna-0.7.0 → tiny-dlna-0.7.2}/PKG-INFO +1 -1
- {tiny-dlna-0.7.0 → tiny-dlna-0.7.2}/README.md +34 -9
- {tiny-dlna-0.7.0 → tiny-dlna-0.7.2}/setup.py +1 -1
- {tiny-dlna-0.7.0 → tiny-dlna-0.7.2}/tiny_dlna/tiny_cli.py +15 -15
- {tiny-dlna-0.7.0 → tiny-dlna-0.7.2}/tiny_dlna.egg-info/PKG-INFO +1 -1
- {tiny-dlna-0.7.0 → tiny-dlna-0.7.2}/setup.cfg +0 -0
- {tiny-dlna-0.7.0 → tiny-dlna-0.7.2}/tiny_dlna/__init__.py +0 -0
- {tiny-dlna-0.7.0 → tiny-dlna-0.7.2}/tiny_dlna/tiny_render.py +0 -0
- {tiny-dlna-0.7.0 → tiny-dlna-0.7.2}/tiny_dlna/tiny_ssdp.py +0 -0
- {tiny-dlna-0.7.0 → tiny-dlna-0.7.2}/tiny_dlna/tiny_xmls.py +0 -0
- {tiny-dlna-0.7.0 → tiny-dlna-0.7.2}/tiny_dlna.egg-info/SOURCES.txt +0 -0
- {tiny-dlna-0.7.0 → tiny-dlna-0.7.2}/tiny_dlna.egg-info/dependency_links.txt +0 -0
- {tiny-dlna-0.7.0 → tiny-dlna-0.7.2}/tiny_dlna.egg-info/entry_points.txt +0 -0
- {tiny-dlna-0.7.0 → tiny-dlna-0.7.2}/tiny_dlna.egg-info/requires.txt +0 -0
- {tiny-dlna-0.7.0 → tiny-dlna-0.7.2}/tiny_dlna.egg-info/top_level.txt +0 -0
|
@@ -16,14 +16,8 @@ $ tiny-render
|
|
|
16
16
|
|
|
17
17
|
This will activate a DLNA receiver named "Tiny Render", which can stream videos
|
|
18
18
|
from apps like 虎牙直播, Bilibili, and other video platforms. Additionally, you
|
|
19
|
-
can also use `
|
|
20
|
-
|
|
21
|
-
Note that [mpv](https://mpv.io/) needs to be installed on your system. On Mac,
|
|
22
|
-
do following (for Windows, add the mpv's root into PATH):
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
$ ln -sf /Applications/mpv.app/Contents/MacOS/mpv /usr/local/bin/
|
|
26
|
-
```
|
|
19
|
+
can also use `tiny-cli play` (see below) to play local videos (like in your
|
|
20
|
+
RaspberryPi) on it.
|
|
27
21
|
|
|
28
22
|
## Tiny DLNA Cli
|
|
29
23
|
|
|
@@ -38,7 +32,38 @@ $ tiny-cli play ~/Movies/foo/bar.mp4 -q TV
|
|
|
38
32
|
```
|
|
39
33
|
|
|
40
34
|
If there is a `bar.srt` in the same directory, it will be served as long as
|
|
41
|
-
the DLNA
|
|
35
|
+
the DLNA render supports subtitles.
|
|
36
|
+
|
|
37
|
+
## Requirements for your System
|
|
38
|
+
|
|
39
|
+
### For Render
|
|
40
|
+
|
|
41
|
+
For running the render, [mpv](https://mpv.io/) needs to be installed. On Mac,
|
|
42
|
+
you may do following:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
$ ln -sf /Applications/mpv.app/Contents/MacOS/mpv /usr/local/bin/
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
For Windows, after installed mpv, add `mpv.exe`'s directory [into
|
|
49
|
+
PATH](https://stackoverflow.com/a/2571200/665869).
|
|
50
|
+
|
|
51
|
+
### For Cli
|
|
52
|
+
|
|
53
|
+
On Windows, you need [config your current
|
|
54
|
+
user](https://stackoverflow.com/a/65504258/665869) to have permission to create
|
|
55
|
+
soft links:
|
|
56
|
+
|
|
57
|
+
1. Open gpedit.msc
|
|
58
|
+
2. Computer Configuration → Windows Settings → Security Settings → Local
|
|
59
|
+
Policies → User Rights Assignment → Create symbolic links
|
|
60
|
+
3. Type the user name (checkout `whoami` command) and click “Check Names” then
|
|
61
|
+
OK.
|
|
62
|
+
4. Reboot the computer
|
|
63
|
+
|
|
64
|
+
You can also use [Develper Mode](https://stackoverflow.com/a/76292992/665869) I
|
|
65
|
+
guess.
|
|
66
|
+
|
|
42
67
|
|
|
43
68
|
## Dev
|
|
44
69
|
|
|
@@ -3,7 +3,6 @@ import json
|
|
|
3
3
|
import logging
|
|
4
4
|
import os.path
|
|
5
5
|
import random
|
|
6
|
-
import shutil
|
|
7
6
|
import signal
|
|
8
7
|
import socket
|
|
9
8
|
import threading
|
|
@@ -27,7 +26,7 @@ MSEARCH_MSG = (
|
|
|
27
26
|
'ST: urn:schemas-upnp-org:service:AVTransport:1\r\n'
|
|
28
27
|
'\r\n'
|
|
29
28
|
)
|
|
30
|
-
DIR_LINKS = '
|
|
29
|
+
DIR_LINKS = os.path.join('~', '.config', 'tiny-dlna', 'symlinks')
|
|
31
30
|
|
|
32
31
|
|
|
33
32
|
def _get_device_info(location):
|
|
@@ -171,10 +170,14 @@ def send_play(url_control):
|
|
|
171
170
|
|
|
172
171
|
def send_stop(url_control):
|
|
173
172
|
dir_links = os.path.expanduser(DIR_LINKS)
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
173
|
+
if not os.path.isdir(dir_links):
|
|
174
|
+
return
|
|
175
|
+
|
|
176
|
+
for item in os.listdir(dir_links):
|
|
177
|
+
item_path = os.path.join(dir_links, item)
|
|
178
|
+
if os.path.islink(item_path):
|
|
179
|
+
os.unlink(item_path)
|
|
180
|
+
|
|
178
181
|
send_dlna_command(url_control, XML_STOP, 'Stop')
|
|
179
182
|
|
|
180
183
|
|
|
@@ -185,15 +188,12 @@ def create_link(path_file):
|
|
|
185
188
|
os.makedirs(dir_links, exist_ok=True)
|
|
186
189
|
|
|
187
190
|
path_link = os.path.join(dir_links, name_file)
|
|
188
|
-
if os.path.
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
os.symlink(path_file, path_link)
|
|
196
|
-
logger.info(f'created softlink: {path_link}')
|
|
191
|
+
if os.path.islink(path_link):
|
|
192
|
+
os.unlink(path_link)
|
|
193
|
+
|
|
194
|
+
path_abs = os.path.abspath(path_file)
|
|
195
|
+
os.symlink(path_abs, path_link)
|
|
196
|
+
logger.info(f'created softlink: {path_abs} --> {path_link}')
|
|
197
197
|
|
|
198
198
|
|
|
199
199
|
def get_control_url(args):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|