Skip to content
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

Cannot set song duration through tags with addtagid #1774

Closed
X-dark opened this issue Apr 3, 2023 · 5 comments
Closed

Cannot set song duration through tags with addtagid #1774

X-dark opened this issue Apr 3, 2023 · 5 comments
Labels
bogus Bogus issue - not a bug, maybe based on wrong assumptions

Comments

@X-dark
Copy link

X-dark commented Apr 3, 2023

Hi,

Among tags, the duration seems to be defined:

SignedSongTime duration = SignedSongTime::Negative();

However there does not seem to be a way to set this through addtagid:

MPD/src/tag/Type.hxx

Lines 11 to 48 in 53ec02d

enum TagType : uint8_t {
TAG_ARTIST,
TAG_ARTIST_SORT,
TAG_ALBUM,
TAG_ALBUM_SORT,
TAG_ALBUM_ARTIST,
TAG_ALBUM_ARTIST_SORT,
TAG_TITLE,
TAG_TITLE_SORT,
TAG_TRACK,
TAG_NAME,
TAG_GENRE,
TAG_MOOD,
TAG_DATE,
TAG_ORIGINAL_DATE,
TAG_COMPOSER,
TAG_COMPOSERSORT,
TAG_PERFORMER,
TAG_CONDUCTOR,
TAG_WORK,
TAG_MOVEMENT,
TAG_MOVEMENTNUMBER,
TAG_ENSEMBLE,
TAG_LOCATION,
TAG_GROUPING,
TAG_COMMENT,
TAG_DISC,
TAG_LABEL,
TAG_MUSICBRAINZ_ARTISTID,
TAG_MUSICBRAINZ_ALBUMID,
TAG_MUSICBRAINZ_ALBUMARTISTID,
TAG_MUSICBRAINZ_TRACKID,
TAG_MUSICBRAINZ_RELEASETRACKID,
TAG_MUSICBRAINZ_WORKID,
TAG_NUM_OF_ITEM_TYPES
};

As a result, external clients like upmpdcli that add streaming tracks to mpd, cannot set the duration and it stays at 0:00, until mpd start playing the track. This breaks other tools that relies on track duration as soon as they are in the playlist.

@MaxKellermann
Copy link
Member

This bug report makes no sense because a song duration is not a tag.

@MaxKellermann MaxKellermann closed this as not planned Won't fix, can't repro, duplicate, stale Apr 3, 2023
@MaxKellermann MaxKellermann added the bogus Bogus issue - not a bug, maybe based on wrong assumptions label Apr 3, 2023
@X-dark
Copy link
Author

X-dark commented Apr 3, 2023

OK, then what would be the proper way to get the track to have its duration set as soon as it is added to the playlist?

@MaxKellermann
Copy link
Member

Not at all. Let MPD figure it out automatically, as you already described.

@X-dark
Copy link
Author

X-dark commented Apr 3, 2023

Yes, but as I have been trying to explain, the duration is unset until the track get played:

❯ mpc playlist --format='%position% - %artist% - %title% - %time%'
[...]
50 - Lars Danielsson - Intermedium -
51 - Lars Danielsson - III. Le Bagatelle -
52 - Lars Danielsson - IV. Scherzo -
[...]
❯ mpc
Lars Danielsson - III. Le Bagatelle
[playing] #51/62   1:32/13:38 (11%)
volume:100%   repeat: off   random: off   single: off   consume: off

@MaxKellermann
Copy link
Member

I know.

This breaks other tools that relies on track duration as soon as they are in the playlist.

These tools are broken. Don't use them or fix them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bogus Bogus issue - not a bug, maybe based on wrong assumptions
Projects
None yet
Development

No branches or pull requests

2 participants