Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/azatoth/minidlna.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Maggard <jmaggard@users.sourceforge.net>2011-02-15 04:03:15 +0300
committerJustin Maggard <jmaggard@users.sourceforge.net>2011-02-15 04:03:15 +0300
commitfd1b82ae35c893ca4900e6e45f8baebba78b0f40 (patch)
tree13c9d8f40b4040e0741fdf477847be529148e67a
parent87d3e696f22d0d16ee204cf13bf735c81c141e2a (diff)
* Reorder a couple artist roles, to be more similar to the familar WMP organisation.
-rw-r--r--tagutils/tagutils-asf.c10
-rw-r--r--tagutils/tagutils.h8
2 files changed, 12 insertions, 6 deletions
diff --git a/tagutils/tagutils-asf.c b/tagutils/tagutils-asf.c
index c7e3e1a..b6ba0d7 100644
--- a/tagutils/tagutils-asf.c
+++ b/tagutils/tagutils-asf.c
@@ -62,7 +62,7 @@ _asf_read_audio_stream(FILE *fp, struct song_metadata *psong, int size)
case WMAV2:
if( (psong->bitrate/1000+1) >= 385 || psong->samplerate > 48000 )
asprintf(&(psong->dlna_pn), "WMAPRO");
- else if( (psong->bitrate / 1000)+1 < 192 )
+ else if( ((psong->bitrate+1) / 1000) <= 192 )
asprintf(&(psong->dlna_pn), "WMABASE");
else
asprintf(&(psong->dlna_pn), "WMAFULL");
@@ -140,7 +140,7 @@ _asf_read_stream_object(FILE *fp, struct song_metadata *psong, __u32 size)
_asf_read_audio_stream(fp, psong, s.TypeSpecificSize);
else if(IsEqualGUID(&s.StreamType, &ASF_StreamBufferStream))
_asf_read_media_stream(fp, psong, s.TypeSpecificSize);
- else
+ else if(!IsEqualGUID(&s.StreamType, &ASF_VideoStream))
{
DPRINTF(E_ERROR, L_SCANNER, "Unknown asf stream type.\n");
}
@@ -521,6 +521,12 @@ _get_asffileinfo(char *file, struct song_metadata *psong)
if(buf[0])
psong->contributor[ROLE_CONDUCTOR] = strdup(buf);
}
+ else if(!strcasecmp(buf, "WM/Composer"))
+ {
+ if(_asf_load_string(fp, ValueType, ValueLength, buf, sizeof(buf)))
+ if(buf[0])
+ psong->contributor[ROLE_COMPOSER] = strdup(buf);
+ }
else if(!strcasecmp(buf, "WM/Picture") && (ValueType == ASF_VT_BYTEARRAY))
{
psong->image = _asf_load_picture(fp, ValueLength, psong->image, &psong->image_size);
diff --git a/tagutils/tagutils.h b/tagutils/tagutils.h
index 4387e93..395e6c5 100644
--- a/tagutils/tagutils.h
+++ b/tagutils/tagutils.h
@@ -34,11 +34,11 @@
#define ROLE_NOUSE 0
#define ROLE_START 1
#define ROLE_ARTIST 1
-#define ROLE_COMPOSER 2
-#define ROLE_CONDUCTOR 3
+#define ROLE_TRACKARTIST 2
+#define ROLE_ALBUMARTIST 3
#define ROLE_BAND 4
-#define ROLE_ALBUMARTIST 5
-#define ROLE_TRACKARTIST 6
+#define ROLE_CONDUCTOR 5
+#define ROLE_COMPOSER 6
#define ROLE_LAST 6
#define N_ROLE 7