@@ -142,12 +142,9 @@ namespace Ciano.Controllers {
142
142
SList<string> uris = chooser_file. get_filenames ();
143
143
144
144
foreach (unowned string uri in uris) {
145
-
146
- var file = File . new_for_uri (uri);
147
- int index = file. get_basename (). last_index_of(" /" );
148
- string name = file. get_basename (). substring(index + 1 , - 1 );
149
- string directory = file. get_basename (). substring(0 , index + 1 );
150
-
145
+ int index = uri. last_index_of(" /" );
146
+ string name = Path . get_basename (uri);
147
+ string directory = Path . get_dirname (uri)+ " /" ;
151
148
list_store. append (out iter);
152
149
list_store. set (iter, 0 , name, 1 , directory);
153
150
tree_view. expand_all ();
@@ -487,6 +484,13 @@ namespace Ciano.Controllers {
487
484
if (str_return. contains (" time=" ) && str_return. contains (" size=" ) && str_return. contains (" bitrate=" ) ) {
488
485
int index_time = str_return. index_of (" time=" );
489
486
time = str_return. substring ( index_time + 5 , 11 );
487
+ string time_to_display = time;
488
+
489
+ // This is really an ugly fix...
490
+ if (time. contains(" N/A" )) {
491
+ time= " 00:00:00.00" ;
492
+ time_to_display = " N/A" ;
493
+ }
490
494
491
495
int loading = TimeUtil . duration_in_seconds (time);
492
496
double progress = (100 * loading) / total;
@@ -498,7 +502,12 @@ namespace Ciano.Controllers {
498
502
int index_bitrate = str_return. index_of (" bitrate=" );
499
503
bitrate = str_return. substring ( index_bitrate + 8 , 11 );
500
504
501
- row. status. label = Properties . TEXT_PERCENTAGE + progress. to_string() + " %" + Properties . TEXT_SIZE_CUSTOM + size. strip () + Properties . TEXT_TIME_CUSTOM + time. strip () + Properties . TEXT_BITRATE_CUSTOM + bitrate. strip ();
505
+ // Another ugly fix...
506
+ if (bitrate. contains(" N/A" )) {
507
+ bitrate= " N/A" ;
508
+ }
509
+
510
+ row. status. label = Properties . TEXT_PERCENTAGE + progress. to_string() + " %" + Properties . TEXT_SIZE_CUSTOM + size. strip () + Properties . TEXT_TIME_CUSTOM + time_to_display. strip () + Properties . TEXT_BITRATE_CUSTOM + bitrate. strip ();
502
511
}
503
512
504
513
if (str_return. contains (" No such file or directory" )) {
0 commit comments