Browse Source

Merge pull request #218 from akordowski/master

Fix Comedy Category ID, add --embeddable option.
Arnau Sanchez 6 years ago
parent
commit
2259a75d46
3 changed files with 5 additions and 1 deletions
  1. 1 0
      README.md
  2. 1 1
      youtube_upload/categories.py
  3. 3 0
      youtube_upload/main.py

+ 1 - 0
README.md

@@ -74,6 +74,7 @@ $ youtube-upload \
   --client-secrets="my_client_secrets.json" \
   --credentials-file="my_credentials.json" \
   --playlist="My favorite music" \
+  --embeddable=True|False \
   anne_sophie_mutter.flv
 tx2Zb-145Yz
 ```

+ 1 - 1
youtube_upload/categories.py

@@ -19,7 +19,7 @@ IDS = {
     "Gaming": 20,
     "Videoblogging": 21,
     "People & Blogs": 22,
-    "Comedy": 34,
+    "Comedy": 23,
     "Entertainment": 24,
     "News & Politics": 25,
     "Howto & Style": 26,

+ 3 - 0
youtube_upload/main.py

@@ -123,6 +123,7 @@ def upload_youtube_video(youtube, options, video_path, total_videos, index):
 
         },
         "status": {
+            "embeddable": options.embeddable,
             "privacyStatus": ("private" if options.publish_at else options.privacy),
             "publishAt": options.publish_at,
 
@@ -226,6 +227,8 @@ def main(arguments):
     parser.add_option('', '--title-template', dest='title_template',
         type="string", default="{title} [{n}/{total}]", metavar="string",
         help='Template for multiple videos (default: {title} [{n}/{total}])')
+    parser.add_option('', '--embeddable', dest='embeddable', default=True,
+        help='Video is embeddable')
 
     # Authentication
     parser.add_option('', '--client-secrets', dest='client_secrets',