refactor!: rename title field to name

This commit is contained in:
ThetaDev 2022-12-27 23:28:25 +01:00
parent 5188527b94
commit 1b94dc1f40
88 changed files with 2142 additions and 2142 deletions

View file

@ -103,7 +103,7 @@ impl From<ChannelRss> for crate::model::ChannelRss {
.into_iter()
.map(|item| crate::model::ChannelRssVideo {
id: item.video_id,
title: item.title,
name: item.title,
description: item.media_group.description,
thumbnail: item.media_group.thumbnail.into(),
publish_date: item.published,

View file

@ -626,7 +626,7 @@ impl MusicListMapper {
self.items.push(MusicItem::Track(TrackItem {
id,
title,
name: title,
duration,
cover: item.thumbnail.into(),
artists,
@ -751,7 +751,7 @@ impl MusicListMapper {
self.items.push(MusicItem::Track(TrackItem {
id,
title: item.title,
name: item.title,
duration: None,
cover: item.thumbnail_renderer.into(),
artist_id: artists.first().and_then(|a| a.id.to_owned()),
@ -1016,7 +1016,7 @@ pub(crate) fn map_queue_item(item: QueueMusicItem, lang: Language) -> TrackItem
TrackItem {
id: item.video_id,
title: item.title,
name: item.title,
duration: item
.length_text
.and_then(|txt| util::parse_video_length(&txt)),

View file

@ -183,7 +183,7 @@ impl TryFrom<PlaylistVideoRenderer> for crate::model::PlaylistVideo {
fn try_from(video: PlaylistVideoRenderer) -> Result<Self, Self::Error> {
Ok(Self {
id: video.video_id,
title: video.title,
name: video.title,
length: video.length_seconds,
thumbnail: video.thumbnail.into(),
channel: crate::model::ChannelId::try_from(video.channel)?,

View file

@ -443,7 +443,7 @@ impl<T> YouTubeListMapper<T> {
VideoItem {
id: video.video_id,
title: video.title,
name: video.title,
length: length_text.and_then(|txt| util::parse_video_length(&txt)),
thumbnail: video.thumbnail.into(),
channel: video
@ -501,7 +501,7 @@ impl<T> YouTubeListMapper<T> {
VideoItem {
id: video.video_id,
title: video.headline,
name: video.headline,
length: video.accessibility.and_then(|acc| {
ACCESSIBILITY_SEP_REGEX
.captures(&acc)