Browse Source

string from URF-8 encoded files have not the "unicode" type

Zykino 11 months ago
parent
commit
f66ba6cc21
2 changed files with 5 additions and 4 deletions
  1. 2
    1
      README.md
  2. 3
    3
      prismedia_upload.py

+ 2
- 1
README.md View File

@@ -98,7 +98,8 @@ Options:
98 98
   --disable-comments  Disable comments (Peertube only as YT API does not support) (default: comments are enabled)
99 99
   --nsfw  Set the video as No Safe For Work (Peertube only as YT API does not support) (default: video is safe)
100 100
   --nfo=STRING  Configure a specific nfo file to set options for the video.
101
-                By default Prismedia search a .txt based on video name
101
+                By default Prismedia search a .txt based on the video name and will
102
+                decode the file as UTF-8 (so make sure your nfo file is UTF-8 encoded)
102 103
                 See nfo_example.txt for more details
103 104
   --platform=STRING  List of platform(s) to upload to, comma separated.
104 105
                      Supported platforms are youtube and peertube (default is both)

+ 3
- 3
prismedia_upload.py View File

@@ -167,17 +167,17 @@ if __name__ == '__main__':
167 167
     schema = Schema({
168 168
         '--file': And(str, validateVideo, error='file is not supported, please use mp4'),
169 169
         Optional('--name'): Or(None, And(
170
-                                unicode,
170
+                                basestring,
171 171
                                 lambda x: not x.isdigit(),
172 172
                                 error="The video name should be a string")
173 173
                                ),
174 174
         Optional('--description'): Or(None, And(
175
-                                        unicode,
175
+                                        basestring,
176 176
                                         lambda x: not x.isdigit(),
177 177
                                         error="The video description should be a string")
178 178
                                       ),
179 179
         Optional('--tags'): Or(None, And(
180
-                                    unicode,
180
+                                    basestring,
181 181
                                     lambda x: not x.isdigit(),
182 182
                                     error="Tags should be a string")
183 183
                                ),

Loading…
Cancel
Save