Skip to content

Commit

Permalink
remove " - Topic" from artist name
Browse files Browse the repository at this point in the history
  • Loading branch information
Araxeus committed Apr 14, 2021
1 parent 46ac0a1 commit a2207a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions providers/song-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ const handleData = async (responseText, win) => {
let data = JSON.parse(responseText);
songInfo.title = data?.videoDetails?.title;
songInfo.artist = data?.videoDetails?.author;
if (songInfo.artist.endsWith(" - Topic")) {
songInfo.artist = songInfo.artist.slice(0, -8);
}
songInfo.views = data?.videoDetails?.viewCount;
songInfo.imageSrc = data?.videoDetails?.thumbnail?.thumbnails?.pop()?.url;
songInfo.songDuration = data?.videoDetails?.lengthSeconds;
Expand Down

0 comments on commit a2207a2

Please sign in to comment.