New user registration is currently disabled due to spam abuse / Регистрация новых пользователей в настоящее время приостановлена из-за злоупотреблений спаммерами

Sound dirs and Portable version

Report bugs here

Sound dirs and Portable version

Postby chulai » Mon Dec 24, 2012 9:52 pm

Anybody (ikm?) knows why Sound dirs are not available in portable version of GoldenDict? Was the reason lack of times back then?
I'm sure this is not a bug but an expected behavior but I don't know the reason behind this decision.
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm

Re: Sound dirs and Portable version

Postby chulai » Wed Jan 02, 2013 12:18 am

Anyone? I like portable version very much but I'm missing sound dirs feature. Is there any good reason for this to not be available in portable GoldenDict?
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm

Re: Sound dirs and Portable version

Postby Tvangeste » Wed Jan 02, 2013 9:30 am

chulai wrote:Anyone? I like portable version very much but I'm missing sound dirs feature. Is there any good reason for this to not be available in portable GoldenDict?

I think the main reason was that it required some additional code that wasn't ready. If you just re-enable the sound dirs feature, it would allow users to provide directories outside of the portable directory, hence making GD nonportable in general sense. And it wasn't possible to specify some predefined and fixed directory (like 'content') since sound dirs by definition are not traversing subdirectories.

I think it is doable to add a little bit of code that looks into, say 'soundDirs' directory, finds all top-level directories there and creates sounddir-dictionaries for all of them.

But, there is better way to use your sound files. Just zip them up into *.zips archive, and put the resulting file into "content" directory. GD now unedrstands such zipped sound files. And it is much more efficient to store all sounds inside a zip file, not just inside a directory. This is especially true for huge sound libraries.
Tvangeste
 
Posts: 893
Joined: Thu Jun 02, 2011 11:42 am

Re: Sound dirs and Portable version

Postby chulai » Wed Jan 02, 2013 1:52 pm

Good to know that we have the option to zip the files.
Anyhow, I would like to see the same level of features in both portable and non-portable versions. If not it looks like the portable version is crippled in a way.
Shouldn't portable version automatically looks sound dirs inside 'content' folder? Or maybe a harcoded 'content/sounds' path. No need to traverse additional subdirectories with that setup.
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm

Re: Sound dirs and Portable version

Postby Tvangeste » Wed Jan 02, 2013 3:32 pm

chulai wrote:Anyhow, I would like to see the same level of features in both portable and non-portable versions. If not it looks like the portable version is crippled in a way.

Agreed. Somebody just needs to write that code. :)

chulai wrote:Shouldn't portable version automatically looks sound dirs inside 'content' folder? Or maybe a harcoded 'content/sounds' path. No need to traverse additional subdirectories with that setup.

With that setup you'll end up only with a single sounddir-based dictionary (the one that resides in content/sounds). If users have more than one such dictionary, you'd have to somehow scan for them.
Tvangeste
 
Posts: 893
Joined: Thu Jun 02, 2011 11:42 am

Re: Sound dirs and Portable version

Postby Tvangeste » Wed Jan 02, 2013 3:36 pm

Just in case, I've filed an Issue #150 to track this.
Tvangeste
 
Posts: 893
Joined: Thu Jun 02, 2011 11:42 am

Re: Sound dirs and Portable version

Postby chulai » Wed Jan 02, 2013 4:32 pm

Tvangeste wrote:
chulai wrote:Anyhow, I would like to see the same level of features in both portable and non-portable versions. If not it looks like the portable version is crippled in a way.

Agreed. Somebody just needs to write that code. :)

chulai wrote:Shouldn't portable version automatically looks sound dirs inside 'content' folder? Or maybe a harcoded 'content/sounds' path. No need to traverse additional subdirectories with that setup.

With that setup you'll end up only with a single sounddir-based dictionary (the one that resides in content/sounds). If users have more than one such dictionary, you'd have to somehow scan for them.


The way I see it we wouldn't end up with just one single directory:
Suppose we have "content/sounds/AmericanEnglish" and "content/sounds/BritishEnglish". GoldenDict portable should scan "content/sounds" and create automatically 2 entries in "Dictionaries > Sources > Sound Dirs": "AmericanEnglish" and "BritishEnglish".
Inside "content/sounds/AmericanEnglish" and "content/sounds/BritishEnglish" the sound files must not be inside additional sub-folders. I think you mentioned this is a requirement because GoldenDict is not traversing subdirectories to find sound files.
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm

Re: Sound dirs and Portable version

Postby chulai » Wed Jan 02, 2013 5:15 pm

Tvangeste wrote:I think it is doable to add a little bit of code that looks into, say 'soundDirs' directory, finds all top-level directories there and creates sounddir-dictionaries for all of them.


I just realized you describe the same solution as mine.
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm

Re: Sound dirs and Portable version

Postby Tvangeste » Wed Jan 02, 2013 5:56 pm

chulai wrote:I just realized you describe the same solution as mine.

Exactly! :)
Tvangeste
 
Posts: 893
Joined: Thu Jun 02, 2011 11:42 am


Return to Bugs

Who is online

Users browsing this forum: No registered users and 10 guests