Shoutcast continuously sends metadata (confuses some streambox / song history programs)

Bug #986981 reported by Stefan
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Low
Dennis Wallace

Bug Description

Hi

I'm new in using Mixxx. I plan to send in a German Internet Radio Station. Most of the guys there are using SAM. I prefer Mixxx and I'm really happy with it. But there is a problem where I need your help.

The station is using shoutcast and a streambox generatet by http://www.ak-webdesign.net/service/sb_generator.htm .
There is also a song history shown on the site of the stataion. This is based on http://www.ak-webdesign.net/service/sh_generator.htm. Here I have the problem. There are always multiple entries of Artist and Songtitle in the list. Most of the time there are more than 10 entries of the same track. For me it looks like Mixxx is sending the information permanently out.
The guys using SAM do not have this problem. There it works fine.

Do you have an idea what I could do, to get this issue solved?

I'm using Windows7 and Mixxx 1.10.0 (build r3034)

Stefan

Tags: shoutcast
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Hm -- looks odd. thanks Stefan.

Changed in mixxx:
importance: Undecided → Low
tags: added: shoutcast
RJ Skerry-Ryan (rryan)
summary: - Multiple Metadata shown in Songhistory
+ Shoutcast continuously sends metadata (confuses some streambox / song
+ history programs)
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Hi Stefan,

Are you using Ogg streaming or MP3 streaming?

Revision history for this message
Stefan (stefan-wahlen) wrote : AW: [Bug 986981] Re: Shoutcast continuously sends metadata (confuses some streambox / song history programs)

Hi Ryan

I'm using MP3.

Stefan

 RJ Ryan <email address hidden> hat geschrieben:

Hi Stefan,

Are you using Ogg streaming or MP3 streaming?

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/986981

Title:
  Shoutcast continuously sends metadata (confuses some streambox / song
  history programs)

Status in Mixxx:
  New

Bug description:
  Hi

  I'm new in using Mixxx. I plan to send in a German Internet Radio
  Station. Most of the guys there are using SAM. I prefer Mixxx and I'm
  really happy with it. But there is a problem where I need your help.

  The station is using shoutcast and a streambox generatet by http://www.ak-webdesign.net/service/sb_generator.htm .
  There is also a song history shown on the site of the stataion. This is based on http://www.ak-webdesign.net/service/sh_generator.htm. Here I have the problem. There are always multiple entries of Artist and Songtitle in the list. Most of the time there are more than 10 entries of the same track. For me it looks like Mixxx is sending the information permanently out.
  The guys using SAM do not have this problem. There it works fine.

  Do you have an idea what I could do, to get this issue solved?

  I'm using Windows7 and Mixxx 1.10.0 (build r3034)

  Stefan

To manage notifications about this bug go to:
https://bugs.launchpad.net/mixxx/+bug/986981/+subscriptions

Revision history for this message
Dennis Wallace (mixxx-lp) wrote :

I'm seeing this as well. In my testing, it appears that when the track changes, the metadata is being sent (correct) but it's the same data as the first-played track (incorrect). Maybe the $artist and $title variables are being set once and never updated?

Revision history for this message
Dennis Wallace (mixxx-lp) wrote :

And investigating the code in engeinshoutcast.cpp this is exactly what's happening. The original string (containing $title and $artist) is gathered when the stream opens. Then, it's replaced directly in that same string object on the first submission of the metadata. Subsequent replacements then do not work as expected as the source title and $artist have already been removed/replaced.

Revision history for this message
Dennis Wallace (mixxx-lp) wrote :

diff --git a/src/engine/sidechain/engineshoutcast.cpp b/src/engine/sidechain/engineshoutcast.cpp
index 1b34953..526731a 100644
--- a/src/engine/sidechain/engineshoutcast.cpp
+++ b/src/engine/sidechain/engineshoutcast.cpp
@@ -613,27 +613,31 @@ void EngineShoutcast::updateMetaData() {
                 // the references to $title and $artist by doing a single
                 // pass over the string
                 int replaceIndex = 0;
+
+ // Make a copy so we don't overwrite the references only
+ // once per streaming session.
+ QString metadataFinal = m_metadataFormat;
                 do {
                     // find the next occurrence
- replaceIndex = m_metadataFormat.indexOf(
+ replaceIndex = metadataFinal.indexOf(
                                       QRegExp("\\$artist|\\$title"),
                                       replaceIndex);

                     if (replaceIndex != -1) {
- if (m_metadataFormat.indexOf(
+ if (metadataFinal.indexOf(
                                           QRegExp("\\$artist"), replaceIndex)
                                           == replaceIndex) {
- m_metadataFormat.replace(replaceIndex, 7, artist);
+ metadataFinal.replace(replaceIndex, 7, artist);
                             // skip to the end of the replacement
                             replaceIndex += artist.length();
                         } else {
- m_metadataFormat.replace(replaceIndex, 6, title);
+ metadataFinal.replace(replaceIndex, 6, title);
                             replaceIndex += title.length();
                         }
                     }
- } while (replaceIndex != -1);
+ } while (replaceIndex != -1);

- QByteArray baSong = encodeString(m_metadataFormat);
+ QByteArray baSong = encodeString(metadataFinal);
                 shout_metadata_add(m_pShoutMetaData, "song", baSong.constData());
             }
             shout_set_metadata(m_pShout, m_pShoutMetaData);

Revision history for this message
Dennis Wallace (mixxx-lp) wrote :

Pull request submitted.

Changed in mixxx:
status: New → Confirmed
Max Linke (max-linke)
Changed in mixxx:
assignee: nobody → Dennis Wallace (mixxx-lp)
status: Confirmed → In Progress
Revision history for this message
jus (jus) wrote :
Changed in mixxx:
milestone: none → 1.12.0
status: In Progress → Fix Committed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/6376

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.