Skip to content

Commit f7dcdd5

Browse files
committed
set 1080p flag with recent versions of AtomicParsley
--hdvideo: 0=SD 1=720p 2=1080p
1 parent b0e83ef commit f7dcdd5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

get_iplayer

+8-2
Original file line numberDiff line numberDiff line change
@@ -9373,7 +9373,7 @@ sub tags_from_metadata {
93739373
$tags->{lyrics} = $meta->{desclong};
93749374
$tags->{lyrics} .= "\n\nPLAY: $meta->{player}" if $meta->{player};
93759375
$tags->{lyrics} .= "\n\nINFO: $meta->{web}" if $meta->{web};
9376-
$tags->{hdvideo} = $meta->{mode} =~ /hd/i ? 'true' : 'false';
9376+
$tags->{hdvideo} = $meta->{mode} =~ /hd/i ? ( $meta->{mode} =~ /fhd/i ? 2 : 1 ) : 0;
93779377
$tags->{TVShowName} = $meta->{show};
93789378
$tags->{TVEpisode} = $meta->{sesort} || $meta->{pid};
93799379
$tags->{TVSeasonNum} = $tags->{disk};
@@ -9504,6 +9504,7 @@ sub tag_init {
95049504
# determine AtomicParsley features
95059505
my $ap_help = `"$bin->{atomicparsley}" --help 2>&1`;
95069506
$opt->{myaphdvideo} = 1 if $ap_help =~ /--hdvideo/;
9507+
$opt->{myap1080p} = 1 if $opt->{myaphdvideo} && $ap_help =~ /1080p/;
95079508
$opt->{myaplongdesc} = 1 if $ap_help =~ /--longdesc/;
95089509
$opt->{myaplongdescription} = 1 if $ap_help =~ /--longDescription/;
95099510
$opt->{myaplongdescfile} = 1 if $ap_help =~ /--longdescFile/;
@@ -9540,7 +9541,12 @@ sub tag_cmd {
95409541
# video only
95419542
if ( $tags->{is_video} ) {
95429543
# all video
9543-
push @cmd, ( '--hdvideo', $tags->{hdvideo} ) if $opt->{myaphdvideo};
9544+
if ( $opt->{myaphdvideo} ) {
9545+
if ( ! $opt->{myap1080p} ) {
9546+
$tags->{hdvideo} = $tags->{hdvideo} > 0 ? "true" : "false";
9547+
}
9548+
push @cmd, ( '--hdvideo', $tags->{hdvideo} );
9549+
}
95449550
# tv only
95459551
if ( $tags->{is_tvshow} ) {
95469552
push @cmd, (

0 commit comments

Comments
 (0)