-
Notifications
You must be signed in to change notification settings - Fork 18
Always set 'title' element #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1753,11 +1753,12 @@ sub _trackItem { | |
| my $genre = $track->{album}->{genre}; | ||
|
|
||
| my $item = { | ||
| name => $tags ? $title : sprintf('%s %s %s %s %s', $title, cstring($client, 'BY'), $artist, cstring($client, 'FROM'), $album), | ||
| line1 => $title, | ||
| line2 => $artist . ($artist && $album ? ' - ' : '') . $album, | ||
| image => Plugins::Qobuz::API::Common->getImageFromImagesHash($track->{album}->{image}), | ||
| name => sprintf('%s %s %s %s %s', $title, cstring($client, 'BY'), $artist, cstring($client, 'FROM'), $album), | ||
| line1 => $title, | ||
| line2 => $artist . ($artist && $album ? ' - ' : '') . $album, | ||
| image => Plugins::Qobuz::API::Common->getImageFromImagesHash($track->{album}->{image}), | ||
| hasMetadata => 'track', | ||
| title => $track->{title}, | ||
| album => $track->{album}->{title}, | ||
| artist => $track->{performer}->{name}, | ||
| secs => $track->{duration}, | ||
|
|
@@ -1770,6 +1771,7 @@ sub _trackItem { | |
| }; | ||
|
|
||
| if ( $track->{hires_streamable} && $item->{name} !~ /hi.?res|bits|khz/i && $prefs->get('labelHiResAlbums') && Plugins::Qobuz::API::Common->getStreamingFormat($track->{album}) eq 'flac' ) { | ||
| $item->{title} .= ' (' . cstring($client, 'PLUGIN_QOBUZ_HIRES') . ')'; | ||
| $item->{name} .= ' (' . cstring($client, 'PLUGIN_QOBUZ_HIRES') . ')'; | ||
| $item->{line1} .= ' (' . cstring($client, 'PLUGIN_QOBUZ_HIRES') . ')'; | ||
| } | ||
|
|
@@ -1791,12 +1793,14 @@ sub _trackItem { | |
| my @titleSplit = split /:\s*/, $track->{title}; | ||
| my $tempTitle = @titleSplit[-1]; | ||
| $item->{work} =~ s/:\s*\Q$tempTitle\E//; | ||
| $item->{title} =~ s/\Q$item->{work}\E://; | ||
| $item->{line1} =~ s/\Q$item->{work}\E://; | ||
| } | ||
| $item->{displayWork} = $item->{work}; | ||
| if ( $track->{composer}->{name} ) { | ||
| $item->{displayWork} = $track->{composer}->{name} . string('COLON') . ' ' . $item->{work}; | ||
| my $composerSurname = (split ' ', $track->{composer}->{name})[-1]; | ||
| $item->{title} =~ s/\Q$composerSurname\E://; | ||
| $item->{line1} =~ s/\Q$composerSurname\E://; | ||
| } | ||
| $item->{line2} .= " - " . $item->{work} if $item->{work}; | ||
|
|
@@ -1807,6 +1811,7 @@ sub _trackItem { | |
| } | ||
|
|
||
| if ( $prefs->get('parentalWarning') && $track->{parental_warning} ) { | ||
| $item->{title} .= ' [E]'; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's really try to leave the title alone. This should be the title and nothing else, as it might be used to look up additional metadata etc. Let's see whether anyone would miss that additional piece of information. The same applies to the asterisk for the samples.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The "explicit" indicator was a user-requested enhancement (there's also the But in this case, we could set a different element with these indicators, with corresponding client changes to append to the displayed title. The
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd be in support of an extra element for such additions. As you might know I'm often struggling trying to match names and titles to whatever a web site might be using. And all these additions complicate things considerably. |
||
| $item->{name} .= ' [E]'; | ||
| $item->{line1} .= ' [E]'; | ||
| } | ||
|
|
@@ -1816,10 +1821,12 @@ sub _trackItem { | |
| name => cstring($client, 'PLUGIN_QOBUZ_NOT_AVAILABLE'), | ||
| type => 'textarea' | ||
| }]; | ||
| $item->{title} = '* ' . $item->{name}; | ||
| $item->{name} = '* ' . $item->{name}; | ||
| $item->{line1} = '* ' . $item->{line1}; | ||
| } | ||
| else { | ||
| $item->{title} = '* ' . $item->{title} if !$track->{streamable}; | ||
| $item->{name} = '* ' . $item->{name} if !$track->{streamable}; | ||
| $item->{line1} = '* ' . $item->{line1} if !$track->{streamable}; | ||
| $item->{play} = Plugins::Qobuz::API::Common->getUrl($client, $track); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.