diff --git a/lib/application_manager.rb b/lib/application_manager.rb index 59fe69a..7cf2251 100644 --- a/lib/application_manager.rb +++ b/lib/application_manager.rb @@ -306,7 +306,7 @@ class W3DHub install_directory = Cache.install_path(task.application, task.channel) application_data = { install_directory: install_directory, - installed_version: task.channel.current_version, + installed_version: task.target_version, install_path: "#{install_directory}/game.exe", wine_prefix: task.wine_prefix } diff --git a/lib/application_manager/task.rb b/lib/application_manager/task.rb index f29c9bc..072d482 100644 --- a/lib/application_manager/task.rb +++ b/lib/application_manager/task.rb @@ -8,7 +8,7 @@ class W3DHub include CyberarmEngine::Common - attr_reader :app_id, :release_channel, :application, :channel, + attr_reader :app_id, :release_channel, :application, :channel, :target_version, :manifests, :packages, :files, :wine_prefix, :status def initialize(app_id, release_channel) @@ -20,6 +20,8 @@ class W3DHub @application = Store.applications.games.find { |g| g.id == app_id } @channel = @application.channels.find { |c| c.id == release_channel } + @target_version = type == :repairer ? Store.settings[:games][:"#{app_id}_#{@channel.id}"][:installed_version] : @channel.current_state + @packages_to_download = [] @total_bytes_to_download = -1 @bytes_downloaded = -1 @@ -203,8 +205,8 @@ class W3DHub @status.step = :fetching_manifests - if fetch_manifest("games", app_id, "manifest.xml", @channel.current_version) - manifest = load_manifest("games", app_id, "manifest.xml", @channel.current_version) + if fetch_manifest("games", app_id, "manifest.xml", @target_version) + manifest = load_manifest("games", app_id, "manifest.xml", @target_version) @manifests << manifest until(manifest.full?) diff --git a/lib/pages/download_manager.rb b/lib/pages/download_manager.rb index f9206c6..4ffd744 100644 --- a/lib/pages/download_manager.rb +++ b/lib/pages/download_manager.rb @@ -33,7 +33,7 @@ class W3DHub stack(margin_left: 8, width: 0.75) do @application_name_label = tagline "#{task.application.name}" - @application_version_label = inscription "Version: #{task.channel.current_version} (#{task.channel.id})" + @application_version_label = inscription "Version: #{task.target_version} (#{task.channel.id})" end end