Comments (4)
Thanks for finding this, I had not thought this far ahead for the upgrade process.
For a quick fix, in ReadConfig()
I made Shell_SelectedItem
select CMD
as default if it has loaded an empty value.
// read from conf
VM.ConfigureView.Shell_SelectedItem = conf.Read("Settings", "Shell_SelectedItem");
// default if empty
if (string.IsNullOrEmpty(VM.ConfigureView.Shell_SelectedItem))
{
VM.ConfigureView.Shell_SelectedItem = "CMD";
}
I've released an update.
I deleted the config and did a test upgrading v1.7.8.1
to v1.8.4.1
and it seems to work, both Run and Convert buttons function.
from axiom.
Another way I've decided to go.
I've set null checks for all items in the ReadConfig()
.
If it imports an empty
value from axiom.conf
, it will skip it and let the ViewModel
LoadControlsDefaults()
set the default value.
ReadConfig()
// Shell
// read from conf to temp string
string shell_SelectedItem = conf.Read("Settings", "Shell_SelectedItem");
// skip if value is empty
if (!string.IsNullOrEmpty(shell_SelectedItem) &&
!string.IsNullOrWhiteSpace(shell_SelectedItem))
{
// use imported conf value
VM.ConfigureView.Shell_SelectedItem = shell_SelectedItem;
}
LoadControlsDefaults()
// load at startup
Shell_SelectedItem = "CMD";
Let me know if this works for you.
from axiom.
It works now π.
This is good way to check the value before set but it would be better if you wrote a static method to prevent you from repeating your code.
In addition the string.IsNullOrWhiteSpace
method also checks for empty so there is no need to IsNullOrEmpty
.
from axiom.
That's good to know about string.IsNullOrWhiteSpace
, I thought empty and whitespace each had their own.
I will go through and optimize the code.
from axiom.
Related Issues (20)
- δΈζζ―ζ :sweat_smile: HOT 7
- Simple bug with standard settings
- Preserve folder structure?
- Axiom crashes upon loading preset HOT 3
- Does it auto-update?
- [REQ] Versatile Video Coding (aka x266) support
- AV1 container
- Not able to batch convert? HOT 1
- [SUGGESTION] Optimal parms for "Coding to DVD with FFMPEG"
- Not sure. Issues pasting a link into the input box (youtube-dl)
- video to gif animation? HOT 1
- No exe file anywhere HOT 2
- Project Status HOT 4
- Custom Presets not loading properly.
- Converting DNxHR gives error
- Saving configurations
- language HOT 1
- Crash when input a double quotation mark to Input or Output box HOT 1
- [Question] Is it possible to burn specific subtitles from Input File ?
- cant understand how to just extract files, without encoding with ffmpeg gui? and how to download from youtube with GUI on windows? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from axiom.