An extension to the LMS routine Slim::Utils::Scanner::parseOggHeader
which already checks for ogg Flac, to also check for Ogg Opus solves
this issue.


Code:
--------------------
    
        # search for Ogg FLAC headers within the data - if so change the 
content type to ogf for OggFlac
        # OggFlac header defined: http://flac.sourceforge.net/ogg_mapping.html
        if (substr($data, 0, 5) eq "\x7fFLAC" && substr($data, 9,4) eq 'fLaC') {
                main::DEBUGLOG && $log->is_debug && $log->debug("Ogg stream is 
OggFlac - setting content type [ogf]");
                Slim::Schema->clearContentTypeCache( $track->url );
                Slim::Music::Info::setContentType( $track->url, 'ogf' );
                $track->content_type('ogf');
        # search for Ogg Opus header within the data - if so change the content 
type to opus for OggOpus
        } elsif (substr($data, 0, 8) eq 'OpusHead') {
                main::DEBUGLOG && $log->is_debug && $log->debug("Ogg stream is 
OggOpus - setting content type [ops]");
                Slim::Schema->clearContentTypeCache( $track->url );
                Slim::Music::Info::setContentType( $track->url, 'ops' );
                $track->content_type('ops');
        }       
  
  
--------------------


Shall I suggest to Michael to add it to LMS ?


------------------------------------------------------------------------
bpa's Profile: http://forums.slimdevices.com/member.php?userid=1806
View this thread: http://forums.slimdevices.com/showthread.php?t=111959

_______________________________________________
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter

Reply via email to