Skip to content
This repository was archived by the owner on Nov 28, 2024. It is now read-only.

Commit 5e79fc6

Browse files
committed
documentation
1 parent 2873a49 commit 5e79fc6

File tree

5 files changed

+85
-24
lines changed

5 files changed

+85
-24
lines changed

README.md

Lines changed: 84 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,70 @@
11
# mediathekDownloader
2-
## Summary
2+
## What it does
33
Downloads series and movies from German public media libraries (Öffentlich-Rechtliche Sender) to your Synology NAS, for use with Synology Video Station. It works from the command line and should be used from scripts.
44

5-
## How to use
5+
## Setup
66

7-
### Using the search string
7+
### Prepare your NAS
88

9-
- Go to [https://mediathekviewweb.de](https://mediathekviewweb.de) and search for your download.
9+
Make sure these packages are installed:
10+
* Python 3.8 package is installed.
11+
* Video Station
12+
This can be done in the package center ('Paket-Zentrum').
13+
14+
### Prepare your media library
15+
16+
1. Open Video Station. In settings, select the library you want to use. Click on ```Export Metadata```. This will write ```.vsmeta``` files into the directories it's using, but triggers as well to use such file format to retrieve information about new videos the indexer finds.
17+
18+
1. When downloading videos, you will have to specify if you are either downloading episodes of a series (```-S``` option) or movies (```-M``` option). So, make sure your library is set-up correctly. Otherwise, media information provided by the ```.vsmeta``` file won't be interpreted. Important to remember: the path you are downloading to isn't the library - but needs to be assigned to your library. So, all directories below a library share the same media type setting implicitely.
19+
20+
### Install the python app
21+
22+
Steps to install via SSH (and currently, there is no other):
23+
24+
1. Access your NAS via SSH.
25+
1. Choose a folder, e.g. home (```cd ~```), and create a virtual environment. Activate it.
26+
27+
```bash
28+
python3 -m venv mediathekDL
29+
cd mediathekDL
30+
source scripts/activate
31+
```
32+
33+
1. Install pip.
34+
1. Install the mediathekdownloader:
35+
36+
```bash
37+
pip --install mediathekdownloader
38+
```
39+
40+
### Test your installation
41+
42+
Still at the SSH shell, enter this command:
43+
44+
```bash
45+
python3 -m nediathekDownloader -h
46+
```
47+
48+
As a result, you should get a help text, as shown below. You are done with the setup.
49+
50+
## How to use the app
51+
52+
### Principles
53+
54+
The app uses [https://mediathekviewweb.de](https://mediathekviewweb.de) to retrieve a list of files for download (more exactly: a feed). It sorts out any special emissions for disabled (sorry for that, but I tried to minimize download and will add an option to override this if necessary - just mail me).
55+
Then, it starts multiple threads for downloading, writes a metadata file for Synology's videostation and triggers a re-indexing for the upload directory. To download only relevant file, I check for files already downloaded (saved in a history file called ```download.txt```) and existing files. If either exists, the download is skipped. Then, for episodes, it tries to detect strings saying something about the season and episode. If nothing can be found, then it takes the current year as season and the calendar week number * 10 + weekday (with Monday = 1, Sunday = 7) as episode number. Please mail me if you think you have a better method to set it for your downloads.
56+
57+
### Methods to tell how to find the media for download
58+
59+
- Using the search term: Go to [https://mediathekviewweb.de](https://mediathekviewweb.de) and search for your download.
1060

1161
Example: ```!ARD #Maus >10``` to search for all episodes of "Die Sendung mit der Maus" at station "ARD" that are longer than 10 minutes (they provide a lot of short cuts for each episode, which is not really helpful if you want to retrieve an episode as broadcasted each Sunday morning).
1262

63+
The command ```python3 -m nediathekDownloader -s '!ARD #Maus >10' -[S/M] directory ``` will download based on the search string.
64+
65+
- Using the feed. Same procedure, but now generate a feed at [https://mediathekviewweb.de](https://mediathekviewweb.de) and use the feed URL for retrieval. Example: ```python3 -m nediathekDownloader -f 'https://mediathekviewweb.de/feed?query=!ard%20%23maus%20%3E10' -[S/M] directory ``` will do the job.
1366

14-
### Command line
67+
## Command line
1568

1669
```sh
1770
$:>python -m mediathekDownloader -h
@@ -61,6 +114,8 @@ Options:
61114
62115
### Example script
63116
117+
#### To be used in your NAS' task scheduler
118+
64119
```bash
65120
#!/bin/sh
66121
#encoding: utf8
@@ -75,24 +130,30 @@ bin/python3 -m mediathekDownloader -S -m 20 -v -s '!ARD #Maus >10 <40' /volume1
75130
/usr/syno/bin/synoindex -R /volume1/video/Maus &
76131
```
77132
78-
## Installation
133+
#### To be used at the command line
79134
80-
### Command line
135+
To download series, I use this script:
81136
82-
Prerequisites:
83-
* Make sure the Python 3.8 package is installed.
137+
```bash
138+
#!/bin/sh
139+
#encoding: utf8
84140

85-
Steps:
86-
1. Access your NAS via SSH.
87-
1. Choose a folder, e.g. home (```cd ~```), and create a virtual environment. Activate it.
88-
```bash
89-
python3 -m venv mediathekDL
90-
cd mediathekDL
91-
source scripts/activate
92-
```
93-
3. Install pip.
94-
3. Install the mediathekdownloader:
95-
```bash
96-
pip --install mediathekdownloader
97-
```
98-
3. Test your installation: ```python3
141+
cd /volume2/nas-processes/mediathek-dl
142+
bin/python3 -m mediathekDownloader -S -p 2 -s "$1" -m 4 /volume1/video/Serien-Mediathek-DL
143+
144+
/usr/syno/bin/synoindex -R /volume1/video/Serien-Mediathek-DL &
145+
```
146+
147+
## Apendix
148+
149+
### Screen shots of the property screens for the media types
150+
151+
Here are the screenshots of the supported media types in German English (I did not had English screenshots at hand - please add them if you have).
152+
153+
![Properties of series](doc/properties_series.png) ![Properties of movies](doc/properties_movie.png)
154+
155+
# References
156+
157+
* Synology Video Station:
158+
* [Help in Support Center](https://www.synology.com/en-en/knowledgebase/DSM/help/VideoStation/VideoStation_desc)
159+
* [Product Page](https://www.synology.com/en-en/dsm/feature/video_station)

doc/Thumbs.db

32.5 KB
Binary file not shown.

doc/properties_movie.png

72.1 KB
Loading

doc/properties_series.png

63.3 KB
Loading

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
long_description = fh.read()
55

66
setuptools.setup(name='mediathekDownloader',
7-
version='0.9.0',
7+
version='0.9.5',
88
description=' Downloads series and movies from German public media libraries (Öffentlich-Rechtliche Sender) to your Synology NAS, for use with Synology Video Station.',
99
long_description=long_description,
1010
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)