diff --git a/prismedia/upload.py b/prismedia/upload.py index c7dc4c3..a1feb4d 100755 --- a/prismedia/upload.py +++ b/prismedia/upload.py @@ -12,7 +12,7 @@ Usage: prismedia --version Options: - -f, --file=STRING Path to the video file to upload in mp4. This is the only mandatory option. + -f, --file=STRING Path to the video file to upload. This is the only mandatory option. --name=NAME Name of the video to upload. (default to video filename) -d, --description=STRING Description of the video. (default: default description) -t, --tags=STRING Tags for the video. comma separated. @@ -40,8 +40,7 @@ Options: DATE should be in the past --auto-originalDate Automatically use the file modification time as original date --thumbnail=STRING Path to a file to use as a thumbnail for the video. - Supported types are jpg and jpeg. - By default, prismedia search for an image based on video name followed by .jpg or .jpeg + By default, prismedia search for an image based on video name followed by .jpg, .jpeg or .png --channel=STRING Set the channel to use for the video (Peertube only) If the channel is not found, spawn an error except if --channelCreate is set. --channelCreate Create the channel if not exists. (Peertube only, default do not create) diff --git a/prismedia/utils.py b/prismedia/utils.py index 9cb87c2..817af5f 100644 --- a/prismedia/utils.py +++ b/prismedia/utils.py @@ -126,6 +126,8 @@ def searchThumbnail(options): options['--thumbnail'] = video_directory + options.get('--name') + ".jpg" elif isfile(video_directory + options.get('--name') + ".jpeg"): options['--thumbnail'] = video_directory + options.get('--name') + ".jpeg" + elif isfile(video_directory + options.get('--name') + ".png"): + options['--thumbnail'] = video_directory + options.get('--name') + ".png" # Then, if we still not have thumbnail, check for thumbnail based on videofile name if not options.get('--thumbnail'): video_file = splitext(basename(options.get('--file')))[0] @@ -133,6 +135,8 @@ def searchThumbnail(options): options['--thumbnail'] = video_directory + video_file + ".jpg" elif isfile(video_directory + video_file + ".jpeg"): options['--thumbnail'] = video_directory + video_file + ".jpeg" + elif isfile(video_directory + video_file + ".png"): + options['--thumbnail'] = video_directory + video_file + ".png" # Display some info after research if not options.get('--thumbnail'):