riplex 0.2.5__tar.gz → 0.2.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. {riplex-0.2.5/src/riplex.egg-info → riplex-0.2.7}/PKG-INFO +1 -1
  2. {riplex-0.2.5 → riplex-0.2.7/src/riplex.egg-info}/PKG-INFO +1 -1
  3. {riplex-0.2.5 → riplex-0.2.7}/src/riplex.egg-info/SOURCES.txt +1 -0
  4. {riplex-0.2.5 → riplex-0.2.7}/src/riplex_app/screens/welcome.py +5 -3
  5. riplex-0.2.7/tests/test_updater.py +172 -0
  6. {riplex-0.2.5 → riplex-0.2.7}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  7. {riplex-0.2.5 → riplex-0.2.7}/.github/agents/riplex.agent.md +0 -0
  8. {riplex-0.2.5 → riplex-0.2.7}/.github/copilot-instructions.md +0 -0
  9. {riplex-0.2.5 → riplex-0.2.7}/.github/workflows/publish.yml +0 -0
  10. {riplex-0.2.5 → riplex-0.2.7}/.github/workflows/release.yml +0 -0
  11. {riplex-0.2.5 → riplex-0.2.7}/.gitignore +0 -0
  12. {riplex-0.2.5 → riplex-0.2.7}/MONOREPO_PLAN.md +0 -0
  13. {riplex-0.2.5 → riplex-0.2.7}/PLANNED_FEATURES.md +0 -0
  14. {riplex-0.2.5 → riplex-0.2.7}/README.md +0 -0
  15. {riplex-0.2.5 → riplex-0.2.7}/REFACTOR_PLAN.md +0 -0
  16. {riplex-0.2.5 → riplex-0.2.7}/docs/architecture.md +0 -0
  17. {riplex-0.2.5 → riplex-0.2.7}/docs/changelog.md +0 -0
  18. {riplex-0.2.5 → riplex-0.2.7}/docs/getting-started/configuration.md +0 -0
  19. {riplex-0.2.5 → riplex-0.2.7}/docs/getting-started/installation.md +0 -0
  20. {riplex-0.2.5 → riplex-0.2.7}/docs/guide/lookup.md +0 -0
  21. {riplex-0.2.5 → riplex-0.2.7}/docs/guide/orchestrate.md +0 -0
  22. {riplex-0.2.5 → riplex-0.2.7}/docs/guide/organize.md +0 -0
  23. {riplex-0.2.5 → riplex-0.2.7}/docs/guide/workflow.md +0 -0
  24. {riplex-0.2.5 → riplex-0.2.7}/docs/index.md +0 -0
  25. {riplex-0.2.5 → riplex-0.2.7}/docs/naming-rules.md +0 -0
  26. {riplex-0.2.5 → riplex-0.2.7}/docs/reference/cli.md +0 -0
  27. {riplex-0.2.5 → riplex-0.2.7}/issues/cross-disc-dvdcompare-matching.md +0 -0
  28. {riplex-0.2.5 → riplex-0.2.7}/mkdocs.yml +0 -0
  29. {riplex-0.2.5 → riplex-0.2.7}/plex_naming_rules.md +0 -0
  30. {riplex-0.2.5 → riplex-0.2.7}/pyproject.toml +0 -0
  31. {riplex-0.2.5 → riplex-0.2.7}/setup.cfg +0 -0
  32. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/__init__.py +0 -0
  33. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/cache.py +0 -0
  34. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/config.py +0 -0
  35. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/dedup.py +0 -0
  36. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/detect.py +0 -0
  37. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/disc/__init__.py +0 -0
  38. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/disc/analysis.py +0 -0
  39. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/disc/makemkv.py +0 -0
  40. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/disc/provider.py +0 -0
  41. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/formatter.py +0 -0
  42. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/lookup.py +0 -0
  43. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/manifest.py +0 -0
  44. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/matcher.py +0 -0
  45. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/metadata/__init__.py +0 -0
  46. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/metadata/planner.py +0 -0
  47. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/metadata/provider.py +0 -0
  48. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/metadata/sources/__init__.py +0 -0
  49. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/metadata/sources/tmdb.py +0 -0
  50. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/models.py +0 -0
  51. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/normalize.py +0 -0
  52. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/organizer.py +0 -0
  53. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/scanner.py +0 -0
  54. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/snapshot.py +0 -0
  55. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/splitter.py +0 -0
  56. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/tagger.py +0 -0
  57. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/title.py +0 -0
  58. {riplex-0.2.5 → riplex-0.2.7}/src/riplex/ui.py +0 -0
  59. {riplex-0.2.5 → riplex-0.2.7}/src/riplex.egg-info/dependency_links.txt +0 -0
  60. {riplex-0.2.5 → riplex-0.2.7}/src/riplex.egg-info/entry_points.txt +0 -0
  61. {riplex-0.2.5 → riplex-0.2.7}/src/riplex.egg-info/requires.txt +0 -0
  62. {riplex-0.2.5 → riplex-0.2.7}/src/riplex.egg-info/top_level.txt +0 -0
  63. {riplex-0.2.5 → riplex-0.2.7}/src/riplex_app/__init__.py +0 -0
  64. {riplex-0.2.5 → riplex-0.2.7}/src/riplex_app/main.py +0 -0
  65. {riplex-0.2.5 → riplex-0.2.7}/src/riplex_app/screens/__init__.py +0 -0
  66. {riplex-0.2.5 → riplex-0.2.7}/src/riplex_app/screens/disc_detection.py +0 -0
  67. {riplex-0.2.5 → riplex-0.2.7}/src/riplex_app/screens/done.py +0 -0
  68. {riplex-0.2.5 → riplex-0.2.7}/src/riplex_app/screens/folder_picker.py +0 -0
  69. {riplex-0.2.5 → riplex-0.2.7}/src/riplex_app/screens/metadata.py +0 -0
  70. {riplex-0.2.5 → riplex-0.2.7}/src/riplex_app/screens/organize_done.py +0 -0
  71. {riplex-0.2.5 → riplex-0.2.7}/src/riplex_app/screens/organize_preview.py +0 -0
  72. {riplex-0.2.5 → riplex-0.2.7}/src/riplex_app/screens/progress.py +0 -0
  73. {riplex-0.2.5 → riplex-0.2.7}/src/riplex_app/screens/release.py +0 -0
  74. {riplex-0.2.5 → riplex-0.2.7}/src/riplex_app/screens/selection.py +0 -0
  75. {riplex-0.2.5 → riplex-0.2.7}/src/riplex_app/updater.py +0 -0
  76. {riplex-0.2.5 → riplex-0.2.7}/src/riplex_cli/__init__.py +0 -0
  77. {riplex-0.2.5 → riplex-0.2.7}/src/riplex_cli/commands/__init__.py +0 -0
  78. {riplex-0.2.5 → riplex-0.2.7}/src/riplex_cli/commands/lookup.py +0 -0
  79. {riplex-0.2.5 → riplex-0.2.7}/src/riplex_cli/commands/orchestrate.py +0 -0
  80. {riplex-0.2.5 → riplex-0.2.7}/src/riplex_cli/commands/organize.py +0 -0
  81. {riplex-0.2.5 → riplex-0.2.7}/src/riplex_cli/commands/rip.py +0 -0
  82. {riplex-0.2.5 → riplex-0.2.7}/src/riplex_cli/commands/setup.py +0 -0
  83. {riplex-0.2.5 → riplex-0.2.7}/src/riplex_cli/formatting.py +0 -0
  84. {riplex-0.2.5 → riplex-0.2.7}/src/riplex_cli/main.py +0 -0
  85. {riplex-0.2.5 → riplex-0.2.7}/tests/__init__.py +0 -0
  86. {riplex-0.2.5 → riplex-0.2.7}/tests/fixtures/makemkvcon_frozen_planet_ii_d2.txt +0 -0
  87. {riplex-0.2.5 → riplex-0.2.7}/tests/fixtures/makemkvcon_list.txt +0 -0
  88. {riplex-0.2.5 → riplex-0.2.7}/tests/snapshots/Batman Begins.snapshot.json +0 -0
  89. {riplex-0.2.5 → riplex-0.2.7}/tests/snapshots/Blade Runner (Blu-ray 4k).snapshot.json +0 -0
  90. {riplex-0.2.5 → riplex-0.2.7}/tests/snapshots/Blade Runner The Final Cut.snapshot.json +0 -0
  91. {riplex-0.2.5 → riplex-0.2.7}/tests/snapshots/Seven Worlds One Planet.snapshot.json +0 -0
  92. {riplex-0.2.5 → riplex-0.2.7}/tests/snapshots/The Dark Knight Rises.snapshot.json +0 -0
  93. {riplex-0.2.5 → riplex-0.2.7}/tests/snapshots/The Dark Knight.snapshot.json +0 -0
  94. {riplex-0.2.5 → riplex-0.2.7}/tests/snapshots/Waterworld.snapshot.json +0 -0
  95. {riplex-0.2.5 → riplex-0.2.7}/tests/test_cache.py +0 -0
  96. {riplex-0.2.5 → riplex-0.2.7}/tests/test_cli_utils.py +0 -0
  97. {riplex-0.2.5 → riplex-0.2.7}/tests/test_config.py +0 -0
  98. {riplex-0.2.5 → riplex-0.2.7}/tests/test_dedup.py +0 -0
  99. {riplex-0.2.5 → riplex-0.2.7}/tests/test_detect.py +0 -0
  100. {riplex-0.2.5 → riplex-0.2.7}/tests/test_disc_analysis.py +0 -0
  101. {riplex-0.2.5 → riplex-0.2.7}/tests/test_disc_provider.py +0 -0
  102. {riplex-0.2.5 → riplex-0.2.7}/tests/test_formatter.py +0 -0
  103. {riplex-0.2.5 → riplex-0.2.7}/tests/test_makemkv.py +0 -0
  104. {riplex-0.2.5 → riplex-0.2.7}/tests/test_matcher.py +0 -0
  105. {riplex-0.2.5 → riplex-0.2.7}/tests/test_normalize.py +0 -0
  106. {riplex-0.2.5 → riplex-0.2.7}/tests/test_organizer.py +0 -0
  107. {riplex-0.2.5 → riplex-0.2.7}/tests/test_planner.py +0 -0
  108. {riplex-0.2.5 → riplex-0.2.7}/tests/test_rip_guide.py +0 -0
  109. {riplex-0.2.5 → riplex-0.2.7}/tests/test_scanner.py +0 -0
  110. {riplex-0.2.5 → riplex-0.2.7}/tests/test_snapshot.py +0 -0
  111. {riplex-0.2.5 → riplex-0.2.7}/tests/test_splitter.py +0 -0
  112. {riplex-0.2.5 → riplex-0.2.7}/tests/test_tagger.py +0 -0
  113. {riplex-0.2.5 → riplex-0.2.7}/tests/test_ui.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: riplex
3
- Version: 0.2.5
3
+ Version: 0.2.7
4
4
  Summary: Automates the tedious manual work around MakeMKV: figuring out what to rip, which MKV files are actually what, and organizing everything into Plex-compatible folder structures.
5
5
  License: MIT
6
6
  Requires-Python: >=3.11
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: riplex
3
- Version: 0.2.5
3
+ Version: 0.2.7
4
4
  Summary: Automates the tedious manual work around MakeMKV: figuring out what to rip, which MKV files are actually what, and organizing everything into Plex-compatible folder structures.
5
5
  License: MIT
6
6
  Requires-Python: >=3.11
@@ -99,6 +99,7 @@ tests/test_snapshot.py
99
99
  tests/test_splitter.py
100
100
  tests/test_tagger.py
101
101
  tests/test_ui.py
102
+ tests/test_updater.py
102
103
  tests/fixtures/makemkvcon_frozen_planet_ii_d2.txt
103
104
  tests/fixtures/makemkvcon_list.txt
104
105
  tests/snapshots/Batman Begins.snapshot.json
@@ -188,8 +188,8 @@ class WelcomeScreen:
188
188
  self.update_banner = ft.Container(
189
189
  ft.Row(
190
190
  [
191
- ft.Icon(ft.Icons.SYSTEM_UPDATE, color=ft.Colors.BLUE),
192
- ft.Text("", size=13, ref=None),
191
+ ft.Icon(ft.Icons.SYSTEM_UPDATE, color=ft.Colors.BLUE_700),
192
+ ft.Text("", size=13, color=ft.Colors.BLUE_900),
193
193
  ft.TextButton("Download", on_click=self._open_update),
194
194
  ],
195
195
  spacing=8,
@@ -269,7 +269,9 @@ class WelcomeScreen:
269
269
  async def _show():
270
270
  banner_row = self.update_banner.content
271
271
  banner_row.controls[1] = ft.Text(
272
- f"Update available: {info['tag']}", size=13
272
+ f"Update available: {info['tag']}",
273
+ size=13,
274
+ color=ft.Colors.BLUE_900,
273
275
  )
274
276
  self.update_banner.visible = True
275
277
  self.app.page.update()
@@ -0,0 +1,172 @@
1
+ """Tests for riplex_app.updater and welcome screen install logic."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import json
6
+ from unittest.mock import patch, MagicMock
7
+
8
+ import pytest
9
+
10
+ from riplex_app.updater import (
11
+ _parse_version,
12
+ check_for_update,
13
+ get_current_version,
14
+ get_download_url,
15
+ )
16
+
17
+
18
+ # ---------------------------------------------------------------------------
19
+ # _parse_version
20
+ # ---------------------------------------------------------------------------
21
+
22
+
23
+ class TestParseVersion:
24
+ def test_standard(self):
25
+ assert _parse_version("v1.2.3") == (1, 2, 3)
26
+
27
+ def test_no_prefix(self):
28
+ assert _parse_version("0.2.5") == (0, 2, 5)
29
+
30
+ def test_dev_suffix(self):
31
+ # Stops at non-integer part
32
+ assert _parse_version("v0.2.5.dev3") == (0, 2, 5)
33
+
34
+ def test_two_parts(self):
35
+ assert _parse_version("v1.0") == (1, 0)
36
+
37
+
38
+ # ---------------------------------------------------------------------------
39
+ # check_for_update
40
+ # ---------------------------------------------------------------------------
41
+
42
+
43
+ class TestCheckForUpdate:
44
+ def test_returns_none_when_dev(self):
45
+ with patch("riplex_app.updater.get_current_version", return_value="dev"):
46
+ assert check_for_update() is None
47
+
48
+ def test_returns_none_on_network_error(self):
49
+ with patch("riplex_app.updater.get_current_version", return_value="0.2.3"):
50
+ with patch("urllib.request.urlopen", side_effect=OSError("no network")):
51
+ assert check_for_update() is None
52
+
53
+ def test_returns_none_when_up_to_date(self):
54
+ response_data = json.dumps({
55
+ "tag_name": "v0.2.3",
56
+ "html_url": "https://github.com/AnyCredit5518/riplex/releases/tag/v0.2.3",
57
+ "assets": [],
58
+ }).encode()
59
+
60
+ mock_resp = MagicMock()
61
+ mock_resp.read.return_value = response_data
62
+ mock_resp.__enter__ = lambda s: s
63
+ mock_resp.__exit__ = MagicMock(return_value=False)
64
+
65
+ with patch("riplex_app.updater.get_current_version", return_value="0.2.3"):
66
+ with patch("urllib.request.urlopen", return_value=mock_resp):
67
+ assert check_for_update() is None
68
+
69
+ def test_returns_update_info_when_newer(self):
70
+ response_data = json.dumps({
71
+ "tag_name": "v0.3.0",
72
+ "html_url": "https://github.com/AnyCredit5518/riplex/releases/tag/v0.3.0",
73
+ "assets": [
74
+ {"name": "riplex-ui-windows.exe", "browser_download_url": "https://example.com/win.exe"},
75
+ {"name": "riplex-ui-macos.zip", "browser_download_url": "https://example.com/mac.zip"},
76
+ ],
77
+ }).encode()
78
+
79
+ mock_resp = MagicMock()
80
+ mock_resp.read.return_value = response_data
81
+ mock_resp.__enter__ = lambda s: s
82
+ mock_resp.__exit__ = MagicMock(return_value=False)
83
+
84
+ with patch("riplex_app.updater.get_current_version", return_value="0.2.3"):
85
+ with patch("urllib.request.urlopen", return_value=mock_resp):
86
+ result = check_for_update()
87
+
88
+ assert result is not None
89
+ assert result["tag"] == "v0.3.0"
90
+ assert "riplex-ui-windows.exe" in result["assets"]
91
+ assert "riplex-ui-macos.zip" in result["assets"]
92
+
93
+
94
+ # ---------------------------------------------------------------------------
95
+ # get_download_url
96
+ # ---------------------------------------------------------------------------
97
+
98
+
99
+ class TestGetDownloadUrl:
100
+ def test_windows(self):
101
+ info = {
102
+ "tag": "v0.3.0",
103
+ "url": "https://github.com/releases/v0.3.0",
104
+ "assets": {
105
+ "riplex-ui-windows.exe": "https://example.com/win.exe",
106
+ "riplex-macos": "https://example.com/mac",
107
+ },
108
+ }
109
+ with patch("sys.platform", "win32"):
110
+ assert get_download_url(info) == "https://example.com/win.exe"
111
+
112
+ def test_macos(self):
113
+ info = {
114
+ "tag": "v0.3.0",
115
+ "url": "https://github.com/releases/v0.3.0",
116
+ "assets": {
117
+ "riplex-ui-windows.exe": "https://example.com/win.exe",
118
+ "riplex-ui-macos.zip": "https://example.com/mac.zip",
119
+ },
120
+ }
121
+ with patch("sys.platform", "darwin"):
122
+ assert get_download_url(info) == "https://example.com/mac.zip"
123
+
124
+ def test_fallback_to_release_page(self):
125
+ info = {
126
+ "tag": "v0.3.0",
127
+ "url": "https://github.com/releases/v0.3.0",
128
+ "assets": {},
129
+ }
130
+ with patch("sys.platform", "linux"):
131
+ assert get_download_url(info) == "https://github.com/releases/v0.3.0"
132
+
133
+
134
+ # ---------------------------------------------------------------------------
135
+ # Install tools logic (from welcome screen)
136
+ # ---------------------------------------------------------------------------
137
+
138
+
139
+ class TestInstallToolsLogic:
140
+ """Test the package mapping logic used by the welcome screen."""
141
+
142
+ def test_windows_package_mapping(self):
143
+ """Verify correct winget package IDs for missing tools."""
144
+ packages = {
145
+ "makemkvcon": "MakeMKV.MakeMKV",
146
+ "ffprobe": "Gyan.FFmpeg",
147
+ "mkvmerge": "MKVToolNix.MKVToolNix",
148
+ }
149
+ missing = ["ffprobe", "mkvmerge"]
150
+ to_install = sorted(set(packages[t] for t in missing if packages.get(t)))
151
+ assert to_install == ["Gyan.FFmpeg", "MKVToolNix.MKVToolNix"]
152
+
153
+ def test_macos_package_mapping(self):
154
+ """Verify correct brew package names for missing tools."""
155
+ packages = {
156
+ "makemkvcon": "makemkv",
157
+ "ffprobe": "ffmpeg",
158
+ "mkvmerge": "mkvtoolnix",
159
+ }
160
+ missing = ["makemkvcon", "ffprobe", "mkvmerge"]
161
+ to_install = sorted(set(packages[t] for t in missing if packages.get(t)))
162
+ assert to_install == ["ffmpeg", "makemkv", "mkvtoolnix"]
163
+
164
+ def test_deduplicates_packages(self):
165
+ """mkvmerge and mkvpropedit map to same package."""
166
+ packages = {
167
+ "mkvmerge": "MKVToolNix.MKVToolNix",
168
+ "mkvpropedit": "MKVToolNix.MKVToolNix",
169
+ }
170
+ missing = ["mkvmerge", "mkvpropedit"]
171
+ to_install = sorted(set(packages[t] for t in missing if packages.get(t)))
172
+ assert to_install == ["MKVToolNix.MKVToolNix"]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes