manolomartinez / greg

A command-line podcast aggregator
GNU General Public License v3.0
296 stars 37 forks source link

allow using the itunes episode for tagging #110

Closed tbhi closed 2 years ago

manolomartinez commented 3 years ago

LGTM. Could you please add this new placeholder to the relevant section in greg.conf?

jvonhoff commented 2 years ago

Anything needed to merge this PR? The Marvel Wastelander podcasts (radio shows, really) don't lend themselves to get tagged correctly without manual intervention. This itunes:episode tag would fix that right up.

manolomartinez commented 2 years ago

@tbhi, thanks a lot for this! @jvonhoff please let me know if this doesn't work as it should.

jvonhoff commented 2 years ago

This is great news! I do see that it runs correctly with the {itunes_episode} placeholder, but it's not actually tagging my file.

greg.conf

[Marvel]
Tag = yes
tag_artist = {podcasttitle}
tag_title = {date}_{title}
tag_genre = Podcast
tag_track = {itunes_episode}

greg info:

Marvel
------
    url: https://feeds.simplecast.com/YMEDOGw1
    Next sync will download from: 07 Mar 2022 08:00:00.

relevant portion of the feed:

<item>
<guid isPermaLink="false">d305b069-8093-4b93-9bed-7e2e1e906ecb</guid>
<title>Chapter Eight: Bonus</title>
<description>
</description>
<pubDate>Mon, 7 Mar 2022 08:00:00 +0000</pubDate>
<author>Michael.Fische@siriusxm.com (Marvel & SiriusXM)</author>
<link>https://marvel.com/wastelanders</link>
<content:encoded>
</content:encoded>
<enclosure length="31829096" type="audio/mpeg" url="https://chrt.fm/track/288D49/dts.podtrac.com/redirect.mp3/sxm.simplecastaudio.com/33952390-0da9-4cf3-b720-a5519d72c244/episodes/00d18a6b-3b87-48bf-b537-9bc38a4e441c/audio/128/default.mp3?aid=rss_feed&awCollectionId=33952390-0da9-4cf3-b720-a5519d72c244&awEpisodeId=00d18a6b-3b87-48bf-b537-9bc38a4e441c&feed=YMEDOGw1"/>
<itunes:title>Chapter Eight: Bonus</itunes:title>
<itunes:author>Marvel & SiriusXM</itunes:author>
<itunes:image href="https://image.simplecastcdn.com/images/35d70b87-b99a-43ca-86a1-e1d6f053a0b0/6f90f0c5-e90a-48ce-be64-453efab72cde/3000x3000/wlbw-1x1-3000x3000-ep08.jpg?aid=rss_feed"/>
<itunes:duration>00:33:09</itunes:duration>
<itunes:summary>
After revealing her true identity to Lisa, Helen opens up about her past. Alone in the Decadomes, Samantha calls in her own reinforcements. Judy and Helen talk face to face.
</itunes:summary>
<itunes:subtitle>
After revealing her true identity to Lisa, Helen opens up about her past. Alone in the Decadomes, Samantha calls in her own reinforcements. Judy and Helen talk face to face.
</itunes:subtitle>
<itunes:explicit>no</itunes:explicit>
<itunes:episodeType>full</itunes:episodeType>
<itunes:episode>8</itunes:episode>
<itunes:season>3</itunes:season>
</item>

eyeD3:

$ eyeD3 2022-03-07_Chapter_Eight__Bonus.mp3                                                                                                                                                        

/media/Stuff/Podcasts/Marvel/2022-03-07_Chapter_Eight__Bonus.mp3             [ 30.35 MB ]
----------------------------------------------------------------------------------------------------------
Time: 33:14     MPEG1, Layer III        [ 128 kb/s @ 44100 Hz - Joint stereo ]
----------------------------------------------------------------------------------------------------------
ID3 v2.3:
title: 2022-03-07_Chapter Eight: Bonus
artist: Marvel
album: 
recording date: 2021-12-13
track:          genre: Podcast (id 186)
Comment: [Description: ] [Lang: eng]
preroll_2;postroll_2
UserTextFrame: [Description: time_reference]
172972800
UserTextFrame: [Description: originator_reference]
aayQORSgLxKk
UserTextFrame: [Description: umid]
0x060A2B340101010501010F101300000045E51ACAE8A98000A14C0519C9E13E00
----------------------------------------------------------------------------
tbhi commented 2 years ago

think tag_track_num = {itunes_episode}

jvonhoff commented 2 years ago

think tag_track_num = {itunes_episode}

Works perfectly. Should we also update the greg.conf file to say "tag_track_num" rather than just "tag_track"?

manolomartinez commented 2 years ago

Should we also update the greg.conf file to say "tag_track_num" rather than just "tag_track"?

Done.