You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 23, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+57-49Lines changed: 57 additions & 49 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,20 @@
1
-
# About VsMetaFileEncoder
1
+
# About VsMetaFileCodec
2
2
## Summary
3
3
NAS manufacturer [Synology](https://www.synology.com/) provides, for its network attached storage devices (NAS), a video content manager called *Video Station*. The application enables the NAS to stream videos over your LAN. Information about these videos are stored in a local Postgres database and optionally by files with extension *.vsmeta*. The format is proprietary.
4
-
The tool provided here is able to write vsMetaFiles. The structure has been elaborated by reverse engineering and ressources found [here](https://gist.github.com/soywiz/2c10feb1231e70aca19a58aca9d6c16a). Many thanks to [Carlos Ballesteros Velasco](https://github.com/soywiz).
4
+
The tool provided here is able to read and write vsMetaFiles. The structure has been elaborated by reverse engineering and resources found [here](https://gist.github.com/soywiz/2c10feb1231e70aca19a58aca9d6c16a). Many thanks to [Carlos Ballesteros Velasco](https://github.com/soywiz).
5
5
6
6
## Prerequisites
7
7
Once a video is written into a directory, *Video Station* looks for *.vsmeta* files if these conditions are met:
8
8
* The folder is part of a *Video Station* library.
9
-
* At least once, an export of meta data has been triggered. This can be done at the library settings of Video Station.
9
+
* At least once, an export of metadata has been triggered. This can be done at the library settings of Video Station.
10
10
* The *.vsmeta* file has the same name as the video, appended by *.vsmeta*.
11
-
Example: The video is called `video.mpg`, the meta data file shall be named `video.mpg.vsmeta`.
11
+
Example: The video is called `video.mpg`, the metadata file shall be named `video.mpg.vsmeta`.
12
12
* The *.vsmeta* file is available when *Video Station* indexes the video file first time.
13
13
* The content type (movie, series, other) is equal to the type specified in the *.vsmeta* file.
14
14
15
15
## Limitations
16
16
* Media type 'others' is currently not supported.
17
-
*Some fields are not yet supported. See list below.
17
+
*All known fields are supported in this version (See list below).
18
18
19
19
## How to use the code
20
20
@@ -23,8 +23,9 @@ Here's an example piece of code. Other examples can be found in the unit test cl
23
23
```python:
24
24
25
25
import os
26
-
from vsmetaEncoder.vsmetaMovieEncoder import VsMetaMovieEncoder
27
-
from vsmetaEncoder.vsmetaInfo import VsMetaInfo
26
+
from datetime import date
27
+
from vsmetaCodec.vsmetaMovieEncoder import VsMetaMovieEncoder
28
+
from vsmetaCodec.vsmetaInfo import VsMetaInfo
28
29
29
30
class writeVsMetaForMovie():
30
31
@@ -33,15 +34,15 @@ Here's an example piece of code. Other examples can be found in the unit test cl
33
34
writer = VsMetaMovieEncoder()
34
35
35
36
info = writer.info
36
-
info.episodeTitle = 'Nach der Hochzeit'
37
37
info.showTitle = 'Kino - Filme'
38
-
info.setEpisodeDate(date(2021, 3, 8))
38
+
info.episodeTitle = 'Nach der Hochzeit'
39
+
info.episodeReleaseDate = date(2021, 3, 8)
39
40
info.chapterSummary = 'Um die drohende Schließung seines indischen Waisenhauses abzuwenden...'
The code is available on PyPI and can be installed with command `pip install vsMetaEncoder`.
45
+
The code will be available on PyPI soon and can be installed with command `pip install vsMetaCodec`.
45
46
46
47
47
48
# Field mapping
@@ -50,54 +51,61 @@ Here's how to use the vsMetaInfo class for the different media types.
50
51
51
52
## Series
52
53
53
-
To encode the episode of a series, use the `vsMetaInfo` class with a `vsMetaSeriesEncoder`. Have a look at the test classes to see how it works best. The table below describes how to set the `vsMetaInfo` properties.
54
-
55
-
Field in Video Station | vsMetaInfo property | Remark
| TV Show Name |`showTitle`| assign any tv show name as text of type 'str' |
60
+
| Episode Title |`episodeTitle`| assign any text of type 'str' |
61
+
| Publishing Date |`episodeReleaseDate`| assign any date of type 'date' or 'str' in ISO format |
62
+
| Season |`season`| type int: If not set, defaulted with publishing year of episode. |
63
+
| Episode |`episode`| type int: If not set, defaulted with week no. x 10 + weekday no. (Monday=1) |
64
+
| Publishing Date (Episode) |`tvshowReleaseDate`| assign any date of type 'date' or 'str' in ISO format |
65
+
| Poster (of Serie) |`posterImageInfo.image`| assign a jpg-image as bytestring (the md5-hash is calculated automatically) |
66
+
| Locked |`episodeLocked`| assign 'True' if 'VideoStation' may not alter the vsmeta file content |
67
+
| Summary |`chapterSummary`| assign any text of type 'str' |
68
+
| Classification |`classification`| assign any text of type 'str' |
69
+
| Rating |`rating`| assign any float value in the range of 0.0. to 10.0 or -1.0 for unknown |
70
+
| Cast |`list.cast[]`| append 'actor names' of type 'str' to the list |
71
+
| Genre |`list.genre[]`| append 'genres' of type 'str' to the list, e.g. 'Drama', 'Action' |
72
+
| Director |`list.director[]`| append 'director names' of type 'str' to the list |
73
+
| Writer |`list.writer[]`| append 'author names' of type 'str' to the list |
74
+
| Poster (of Episode) |`episodeImageInfo.image`| assign a jpg-image as bytestring (the md5-hash is calculated automatically) |
75
+
| Background (of Serie) |`backdropImageInfo.image`| assign a jpg-image as bytestring (the md5-hash is calculated automatically) |
73
76
74
77
## Movies
75
78
76
-
To encode a TV film or movie, use the `vsMetaInfo` class with a `vsMetaMoviesEncoder`. The property names might be confusing, don't think too much about it - just use them as listed below.
77
-
78
-
Field in Video Station | vsMetaInfo property | Remark
| Title |`showTitle`| assign any title text of type 'str' |
85
+
| Short Title |`episodeTitle`| assign any short title text of type 'str' |
86
+
| Publishing Date |`episodeReleaseDate`| assign any date of type 'date' or 'str' in ISO format |
87
+
| Season |`season`| N/A - not used, set to 0 |
88
+
| Episode |`episode`| N/A - not used, set to 0 |
89
+
| Publishing Date (Episode) |`tvshowReleaseDate`| N/A - not used, set to 1900-01-01 |
90
+
| Poster (of Serie) |`posterImageInfo.image`| N/A - not used, set to VsImageInfo() |
91
+
| Locked |`episodeLocked`| assign 'True' if 'VideoStation' may not alter the vsmeta file content |
92
+
| Summary |`chapterSummary`| assign any text of type 'str' |
93
+
| Classification |`classification`| assign any text of type 'str' |
94
+
| Rating |`rating`| assign any float value in the range of 0.0. to 10.0 or -1.0 for unknown |
95
+
| Cast |`list.cast[]`| append 'actor names' of type 'str' to the list |
96
+
| Genre |`list.genre[]`| append 'genres' of type 'str' to the list, e.g. 'Drama', 'Action' |
97
+
| Director |`list.director[]`| append 'director names' of type 'str' to the list |
98
+
| Writer |`list.writer[]`| append 'author names' of type 'str' to the list |
99
+
| Poster (of Movie) |`episodeImageInfo.image`| assign a jpg-image as bytestring (the md5-hash is calculated automatically) |
100
+
| Background (of Movie) |`backdropImageInfo.image`| assign a jpg-image as bytestring (the md5-hash is calculated automatically) |
93
101
94
102
## Media type 'other'
95
103
96
104
This media type is not supported, and probably won't. It is intended for private videos or artwork, which will be edited most likely manually at uploading.
97
105
98
-
## Screen shots of the property screens for the media types
106
+
## Screenshots of the property screens for the media types
99
107
100
-
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).
108
+
Here are the screenshots of the supported media types in German English (I did not have English screenshots at hand - please add them if you have).
101
109
102
110

0 commit comments