Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve cover art retrieval / prevent errors #1035

Conversation

chronicrebellion
Copy link
Contributor

Description

I noticed that when ripping certain CDs, the ARM UI will show unknown for State and ETA along with no cover art.
Screenshot 2024-01-12 193044

The log files showed this:
ERROR ARM: music_brainz.music_brainz Try 2 - ERROR: 'NoneType' object has no attribute 'group'
ARM attempts to use robobrowser to find the cover art but there is no cover art image on the page.

We end up trying to extract the image url from None - which is not a WebServiceError and get caught in the Try 2 exception.
The error prevents updating the job with the current number of tracks.

Current Logic
The code chooses the first release to find the cover art.

if there is no cover art present, it uses the release id (same as job.crc_id) to find the cover art image from musicbrainz release page.

The issue here is that if there is no cover art from the info json - there will not be an image on musicbrainz either.

This is the info for Mest - Destination Unknown CD: https://musicbrainz.org/ws/2/discid/5FRS8CUPDRvXXBnoE0Jpzw8SlXU-?inc=artist-credits+recordings

The first release does not have cover art but the second one does.

Proposed Change
I have changed the logic to loop through all the releases to find a release with cover art.
This also means we do not need to use RoboBrowser at all.

If an image exists, it will be shown and the tracks and ETA will be populated in the ARM UI
Screenshot 2024-01-12 195920

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Docker
  • Other (Please state here)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have tested that my fix is effective or that my feature works

Changelog:

Include the details of changes made here

  • Find cover art by looping through releases
  • Remove white space from PROCESS_COMPLETE constant
  • Update code that uses PROCESS_COMPLETE
  • Added a . after Ripping all tracks

Logs

Attach logs from successful test runs here

Copy link

sonarcloud bot commented Jan 13, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@chronicrebellion
Copy link
Contributor Author

@microtechno9000 could i get a review when you have some free time?

@shitwolfymakes shitwolfymakes self-assigned this Jan 17, 2024
@shitwolfymakes
Copy link
Member

Great work!

@shitwolfymakes shitwolfymakes merged commit 5ed353f into automatic-ripping-machine:main Jan 17, 2024
9 checks passed
@chronicrebellion chronicrebellion deleted the music-cd-find-cover-art branch January 17, 2024 15:25
truecharts-admin added a commit to truecharts/charts that referenced this pull request Jan 21, 2024
…-ripping-machine to v2.6.69@c364433 by renovate (#17405)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[automaticrippingmachine/automatic-ripping-machine](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine)
| patch | `2.6.67` -> `2.6.69` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>automatic-ripping-machine/automatic-ripping-machine
(automaticrippingmachine/automatic-ripping-machine)</summary>

###
[`v2.6.69`](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine/releases/tag/2.6.69)

[Compare
Source](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine/compare/2.6.67...2.6.69)

#### What's Changed

- Add configurable URL for notifications by
[@&#8203;anthonylavado](https://togithub.com/anthonylavado) in
[automatic-ripping-machine/automatic-ripping-machine#972
- Bugfix for Music Rips Title issue on initial Job start Issue
[#&#8203;866](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine/issues/866)
by [@&#8203;microtechno9000](https://togithub.com/microtechno9000) in
[automatic-ripping-machine/automatic-ripping-machine#980
- Update README-OMDBAPI.md by
[@&#8203;MNTech68](https://togithub.com/MNTech68) in
[automatic-ripping-machine/automatic-ripping-machine#981
- Make the installation/how-to/contributing links longer and easier to
click by [@&#8203;charmarkk](https://togithub.com/charmarkk) in
[automatic-ripping-machine/automatic-ripping-machine#994
- Allow disabling auto-ejects by
[@&#8203;marcusds](https://togithub.com/marcusds) in
[automatic-ripping-machine/automatic-ripping-machine#991
- Fix bad use of "ln -sf" by
[@&#8203;fizbin](https://togithub.com/fizbin) in
[automatic-ripping-machine/automatic-ripping-machine#986
- Images Fix for Reverse Proxy by
[@&#8203;Jarlotee](https://togithub.com/Jarlotee) in
[automatic-ripping-machine/automatic-ripping-machine#997
- Bump tj-actions/branch-names from 7 to 8 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1005
- Bump actions/stale from 8 to 9 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1004
- Bump actions/setup-python from 4 to 5 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1002
- Bump docker/metadata-action from 5.0.0 to 5.3.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#998
- Bump github/codeql-action from 2 to 3 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1011
- Fixes for when musicbrainz returns a cdstub by
[@&#8203;fizbin](https://togithub.com/fizbin) in
[automatic-ripping-machine/automatic-ripping-machine#990
- bugfix for issue
[#&#8203;1026](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine/issues/1026)
- typo in docker-setup.sh by
[@&#8203;microtechno9000](https://togithub.com/microtechno9000) in
[automatic-ripping-machine/automatic-ripping-machine#1027
- Bump docker/metadata-action from 5.3.0 to 5.4.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1016
- Update greetings.yml by
[@&#8203;microtechno9000](https://togithub.com/microtechno9000) in
[automatic-ripping-machine/automatic-ripping-machine#999
- fix: use job.title to show meaningful music notifications by
[@&#8203;chronicrebellion](https://togithub.com/chronicrebellion) in
[automatic-ripping-machine/automatic-ripping-machine#1033
- Improve cover art retrieval / prevent errors by
[@&#8203;chronicrebellion](https://togithub.com/chronicrebellion) in
[automatic-ripping-machine/automatic-ripping-machine#1035
- Bump docker/metadata-action from 5.4.0 to 5.5.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1032
- 933 dvd might have a label containing a / by
[@&#8203;1337-server](https://togithub.com/1337-server) in
[automatic-ripping-machine/automatic-ripping-machine#1041

#### New Contributors

- [@&#8203;MNTech68](https://togithub.com/MNTech68) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#981
- [@&#8203;charmarkk](https://togithub.com/charmarkk) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#994
- [@&#8203;marcusds](https://togithub.com/marcusds) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#991
- [@&#8203;fizbin](https://togithub.com/fizbin) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#986
- [@&#8203;Jarlotee](https://togithub.com/Jarlotee) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#997
- [@&#8203;chronicrebellion](https://togithub.com/chronicrebellion) made
their first contribution in
[automatic-ripping-machine/automatic-ripping-machine#1033

**Full Changelog**:
automatic-ripping-machine/automatic-ripping-machine@2.6.67...2.6.69

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 10pm on monday" in timezone
Europe/Amsterdam, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNDAuMTYiLCJ1cGRhdGVkSW5WZXIiOiIzNy4xNDAuMTYiLCJ0YXJnZXRCcmFuY2giOiJtYXN0ZXIifQ==-->
discretizer pushed a commit to discretizer/charts that referenced this pull request Jan 29, 2024
…-ripping-machine to v2.6.69@c364433 by renovate (truecharts#17405)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[automaticrippingmachine/automatic-ripping-machine](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine)
| patch | `2.6.67` -> `2.6.69` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>automatic-ripping-machine/automatic-ripping-machine
(automaticrippingmachine/automatic-ripping-machine)</summary>

###
[`v2.6.69`](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine/releases/tag/2.6.69)

[Compare
Source](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine/compare/2.6.67...2.6.69)

#### What's Changed

- Add configurable URL for notifications by
[@&truecharts#8203;anthonylavado](https://togithub.com/anthonylavado) in
[automatic-ripping-machine/automatic-ripping-machine#972
- Bugfix for Music Rips Title issue on initial Job start Issue
[#&truecharts#8203;866](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine/issues/866)
by [@&truecharts#8203;microtechno9000](https://togithub.com/microtechno9000) in
[automatic-ripping-machine/automatic-ripping-machine#980
- Update README-OMDBAPI.md by
[@&truecharts#8203;MNTech68](https://togithub.com/MNTech68) in
[automatic-ripping-machine/automatic-ripping-machine#981
- Make the installation/how-to/contributing links longer and easier to
click by [@&truecharts#8203;charmarkk](https://togithub.com/charmarkk) in
[automatic-ripping-machine/automatic-ripping-machine#994
- Allow disabling auto-ejects by
[@&truecharts#8203;marcusds](https://togithub.com/marcusds) in
[automatic-ripping-machine/automatic-ripping-machine#991
- Fix bad use of "ln -sf" by
[@&truecharts#8203;fizbin](https://togithub.com/fizbin) in
[automatic-ripping-machine/automatic-ripping-machine#986
- Images Fix for Reverse Proxy by
[@&truecharts#8203;Jarlotee](https://togithub.com/Jarlotee) in
[automatic-ripping-machine/automatic-ripping-machine#997
- Bump tj-actions/branch-names from 7 to 8 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1005
- Bump actions/stale from 8 to 9 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1004
- Bump actions/setup-python from 4 to 5 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1002
- Bump docker/metadata-action from 5.0.0 to 5.3.0 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#998
- Bump github/codeql-action from 2 to 3 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1011
- Fixes for when musicbrainz returns a cdstub by
[@&truecharts#8203;fizbin](https://togithub.com/fizbin) in
[automatic-ripping-machine/automatic-ripping-machine#990
- bugfix for issue
[#&truecharts#8203;1026](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine/issues/1026)
- typo in docker-setup.sh by
[@&truecharts#8203;microtechno9000](https://togithub.com/microtechno9000) in
[automatic-ripping-machine/automatic-ripping-machine#1027
- Bump docker/metadata-action from 5.3.0 to 5.4.0 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1016
- Update greetings.yml by
[@&truecharts#8203;microtechno9000](https://togithub.com/microtechno9000) in
[automatic-ripping-machine/automatic-ripping-machine#999
- fix: use job.title to show meaningful music notifications by
[@&truecharts#8203;chronicrebellion](https://togithub.com/chronicrebellion) in
[automatic-ripping-machine/automatic-ripping-machine#1033
- Improve cover art retrieval / prevent errors by
[@&truecharts#8203;chronicrebellion](https://togithub.com/chronicrebellion) in
[automatic-ripping-machine/automatic-ripping-machine#1035
- Bump docker/metadata-action from 5.4.0 to 5.5.0 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1032
- 933 dvd might have a label containing a / by
[@&truecharts#8203;1337-server](https://togithub.com/1337-server) in
[automatic-ripping-machine/automatic-ripping-machine#1041

#### New Contributors

- [@&truecharts#8203;MNTech68](https://togithub.com/MNTech68) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#981
- [@&truecharts#8203;charmarkk](https://togithub.com/charmarkk) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#994
- [@&truecharts#8203;marcusds](https://togithub.com/marcusds) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#991
- [@&truecharts#8203;fizbin](https://togithub.com/fizbin) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#986
- [@&truecharts#8203;Jarlotee](https://togithub.com/Jarlotee) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#997
- [@&truecharts#8203;chronicrebellion](https://togithub.com/chronicrebellion) made
their first contribution in
[automatic-ripping-machine/automatic-ripping-machine#1033

**Full Changelog**:
automatic-ripping-machine/automatic-ripping-machine@2.6.67...2.6.69

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 10pm on monday" in timezone
Europe/Amsterdam, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNDAuMTYiLCJ1cGRhdGVkSW5WZXIiOiIzNy4xNDAuMTYiLCJ0YXJnZXRCcmFuY2giOiJtYXN0ZXIifQ==-->
GabrielBarzen pushed a commit to GabrielBarzen/charts that referenced this pull request Feb 2, 2024
…-ripping-machine to v2.6.69@c364433 by renovate (truecharts#17405)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[automaticrippingmachine/automatic-ripping-machine](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine)
| patch | `2.6.67` -> `2.6.69` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>automatic-ripping-machine/automatic-ripping-machine
(automaticrippingmachine/automatic-ripping-machine)</summary>

###
[`v2.6.69`](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine/releases/tag/2.6.69)

[Compare
Source](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine/compare/2.6.67...2.6.69)

#### What's Changed

- Add configurable URL for notifications by
[@&truecharts#8203;anthonylavado](https://togithub.com/anthonylavado) in
[automatic-ripping-machine/automatic-ripping-machine#972
- Bugfix for Music Rips Title issue on initial Job start Issue
[#&truecharts#8203;866](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine/issues/866)
by [@&truecharts#8203;microtechno9000](https://togithub.com/microtechno9000) in
[automatic-ripping-machine/automatic-ripping-machine#980
- Update README-OMDBAPI.md by
[@&truecharts#8203;MNTech68](https://togithub.com/MNTech68) in
[automatic-ripping-machine/automatic-ripping-machine#981
- Make the installation/how-to/contributing links longer and easier to
click by [@&truecharts#8203;charmarkk](https://togithub.com/charmarkk) in
[automatic-ripping-machine/automatic-ripping-machine#994
- Allow disabling auto-ejects by
[@&truecharts#8203;marcusds](https://togithub.com/marcusds) in
[automatic-ripping-machine/automatic-ripping-machine#991
- Fix bad use of "ln -sf" by
[@&truecharts#8203;fizbin](https://togithub.com/fizbin) in
[automatic-ripping-machine/automatic-ripping-machine#986
- Images Fix for Reverse Proxy by
[@&truecharts#8203;Jarlotee](https://togithub.com/Jarlotee) in
[automatic-ripping-machine/automatic-ripping-machine#997
- Bump tj-actions/branch-names from 7 to 8 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1005
- Bump actions/stale from 8 to 9 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1004
- Bump actions/setup-python from 4 to 5 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1002
- Bump docker/metadata-action from 5.0.0 to 5.3.0 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#998
- Bump github/codeql-action from 2 to 3 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1011
- Fixes for when musicbrainz returns a cdstub by
[@&truecharts#8203;fizbin](https://togithub.com/fizbin) in
[automatic-ripping-machine/automatic-ripping-machine#990
- bugfix for issue
[#&truecharts#8203;1026](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine/issues/1026)
- typo in docker-setup.sh by
[@&truecharts#8203;microtechno9000](https://togithub.com/microtechno9000) in
[automatic-ripping-machine/automatic-ripping-machine#1027
- Bump docker/metadata-action from 5.3.0 to 5.4.0 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1016
- Update greetings.yml by
[@&truecharts#8203;microtechno9000](https://togithub.com/microtechno9000) in
[automatic-ripping-machine/automatic-ripping-machine#999
- fix: use job.title to show meaningful music notifications by
[@&truecharts#8203;chronicrebellion](https://togithub.com/chronicrebellion) in
[automatic-ripping-machine/automatic-ripping-machine#1033
- Improve cover art retrieval / prevent errors by
[@&truecharts#8203;chronicrebellion](https://togithub.com/chronicrebellion) in
[automatic-ripping-machine/automatic-ripping-machine#1035
- Bump docker/metadata-action from 5.4.0 to 5.5.0 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1032
- 933 dvd might have a label containing a / by
[@&truecharts#8203;1337-server](https://togithub.com/1337-server) in
[automatic-ripping-machine/automatic-ripping-machine#1041

#### New Contributors

- [@&truecharts#8203;MNTech68](https://togithub.com/MNTech68) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#981
- [@&truecharts#8203;charmarkk](https://togithub.com/charmarkk) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#994
- [@&truecharts#8203;marcusds](https://togithub.com/marcusds) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#991
- [@&truecharts#8203;fizbin](https://togithub.com/fizbin) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#986
- [@&truecharts#8203;Jarlotee](https://togithub.com/Jarlotee) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#997
- [@&truecharts#8203;chronicrebellion](https://togithub.com/chronicrebellion) made
their first contribution in
[automatic-ripping-machine/automatic-ripping-machine#1033

**Full Changelog**:
automatic-ripping-machine/automatic-ripping-machine@2.6.67...2.6.69

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 10pm on monday" in timezone
Europe/Amsterdam, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNDAuMTYiLCJ1cGRhdGVkSW5WZXIiOiIzNy4xNDAuMTYiLCJ0YXJnZXRCcmFuY2giOiJtYXN0ZXIifQ==-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants