Bug 5718 - File Types cannot be re-enabled in SC settings
: File Types cannot be re-enabled in SC settings
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Transcoding
: 7.0
: PC Windows XP
: P2 normal (vote)
: ---
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-08 02:10 UTC by rmgmailbox-sqbox
Modified: 2007-10-23 16:10 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rmgmailbox-sqbox 2007-10-08 02:10:55 UTC
Windows Nightly 10-08 build 13644

Native wma plays OK, but none of the wma conversions to flac, mp3 or wav work. These conversions cannot be enabled in squeezecentre settings, getting the message "required binary not found for all 3 when trying to save the changes.

wmadec is present in the Bin\MSWin32-x86-multi-thread, along with the other binaries. Have substituted wmadec with a known working version to no effect.

I've rolled back as far as the 10-04 nightly with the same results.
Comment 1 Bryan Alton 2007-10-08 07:07:00 UTC
The problem also occurs on Linux and it seems any format change not just WMA - disable Apples Lossless and then it fails trying to re-enable - can't find binary.

The os.paths log doesn't show any rentries as if SC is not looking for the binary.
Comment 2 rmgmailbox-sqbox 2007-10-08 07:33:06 UTC
None of the disabled format can be re-enabled from the File Types Settings page.  The formats can be re-enabled by deleting slim.prefs and starting over from scratch.
Comment 3 Bryan Alton 2007-10-08 13:07:51 UTC
The problem is in checkBin - it doesn't check for existance of binary if the saved setting for a conversion is disabled. checkbin is called from FileTypes::handler when trying to enable a conversion with a disabled saved setting. Catch-22.
Comment 4 Bryan Alton 2007-10-09 01:39:52 UTC
Looking at the 6.5. and 7.0 code - the difference is in the calling routines and not in checkBin.  In 6.5 the calling routine made allowance for this "disabled " situation by having two passes.  The 7.0 rework seems to have lost the two-pass approach.  
Comment 5 Bryan Alton 2007-10-11 14:47:23 UTC
I have a patch for the bug - I'd commit it but I think it should be reviewed as I am not familiar with this part of SqueezeCenter.

The file is Slim/Web/Settings/Server/FileTypes.pm

Index: FileTypes.pm
===================================================================
--- FileTypes.pm        (revision 13737)
+++ FileTypes.pm        (working copy)
@@ -39,8 +39,19 @@

                my $formatslistref = Slim::Player::TranscodingHelper::Conversions();

+# Patch removes all requested Enabled settings from the disabledformats pref settings
+# as checkBin looks at prefs setting before checking for the binary
                foreach my $profile (sort {$a cmp $b} (grep {$_ !~ /transcode/} (keys %{$formatslistref}))) {
+                       if ($paramRef->{$profile} eq 'DISABLED') {
+                               push @disabled, $profile;
+                       }
+               }
+               $prefs->set('disabledformats', \@disabled);

+               my @disabled = ();
+
+               foreach my $profile (sort {$a cmp $b} (grep {$_ !~ /transcode/} (keys %{$formatslistref}))) {
+
                        # If the conversion pref is enabled confirm that
                        # it's allowed to be checked.
                        if ($paramRef->{$profile} ne 'DISABLED' && $disabledformats{$profile}) {
Comment 6 Bryan Alton 2007-10-22 15:14:30 UTC
Discussed proposed patch with KDF and decided not to use proposed patch.  Instead a flag parameter was added to checkBin. New patch has been applied in change 14022
Comment 7 rmgmailbox-sqbox 2007-10-23 03:52:50 UTC
Tested build 14031 on 23/10/07 nightly, and bug appears to be fixed.