Marekkon5 / onetagger

Music tagger for Windows, MacOS and Linux with Beatport, Discogs, Musicbrainz, Spotify, Traxsource and many other platforms support.
https://onetagger.github.io/
GNU General Public License v3.0
597 stars 31 forks source link

Request: Add MEDIATYPE from Discogs #175

Closed andylundqvist closed 1 year ago

andylundqvist commented 1 year ago

I need the MEDIATYPE (a.k.a. "Format") value from Discogs, would it be possible to add this to OneTagger?

An example of the field I mean is "Format: 2 x Vinyl, LP, Compilation" on this page: https://www.discogs.com/release/35408-Various-Wipeout-2097-The-Soundtrack

The reason is that this is the only place where the information for compilations is added on Discogs. I use Mp3tag as a last step (i.e. I would use it after OneTagger) to read the MEDIATYPE field (and move around some other tag fields), and in this case if the MEDIATYPE field includes the word "Compilation", it adds a COMPILATION = 1 tag via a tag action in that software. This way the files end up correctly marked as compilations in my music library.

Thanks for considering this! 🤞

Marekkon5 commented 1 year ago

Hello, I've added this in the latest commit, you can download it from the Actions tab to try it out. It will be written if you select the Other tag, since it's single platform niche specific tag.

andylundqvist commented 1 year ago

Wow, thank you for the quick response!

I downloaded the Mac build from the bottom of that workflow and tried it. In Auto Tag I activated the "Other" checkmark but the finished files still have empty MEDIATYPE/Format for me. Did I do it right?

Also I have a test directory with a total of 64 files. Yesterday when I tried with OneTagger 1.5.1 it found 61 out of 64 (3 failed) but today with the exact same settings and same original source files it found only 38 (and failed on 26). I am sure I didn't change anything. I use only Discogs as source and I had set Strictness to 70% (both yesterday and today). Did anything else change in this build?

(My other reported problem with the track numbers work now, yay, thanks!)

Marekkon5 commented 1 year ago

Hello,

  1. The Format value is only present on releases, not on masters (master releases), so in case 1T matches the master and not release, it won't be written.

  2. There has been a bunch of changes in between 1.5.1 release and latest commit (also labeled 1.5.1 currently, but will be 1.5.2/1.6), so that might've caused it. Could you please send the log (Settings > Open Data Folder > onetagger.log), and exact title and artist tag values from the unmatched tracks, so I can test myself and debug this? Thank you.

andylundqvist commented 1 year ago
  1. Oh, I wasn't aware of that. Too bad! I guess there is no solution then. In my case it found 0 of 64, so I think the field will not be very useful. But hopefully it's different for other users...
  2. Log: https://pastebin.com/YzNH8mcZ / Tag values: https://pastebin.com/UkmN9ZwU (;CSV)
andylundqvist commented 1 year ago

@Marekkon5 Another issue with the build I tested is that if I press the top right settings cog icon, I only get a popup that says "Saved" instead of seeing the preferences window. But I managed to find the log via the file system anyway.

Marekkon5 commented 1 year ago

Hello,

  1. Thanks to the log I found the bug, it was related to the MEDIATYPE/Format tag, should be fixed by now. Since most of the errors were related to that I haven't tried all the tracks from the list, however the ones I've tried:

Alessandro Arigliano;Tag Machine - Original Mix;Alessandro Arigliano - Tag Machine - Original Mix.mp3

Let me know if it improves / if you have different tracks that cannot be found on the latest Actions build.

As for the Settings popup - I wasn't able to reproduce it locally, so I will try to verify it in the release builds on Mac and other OSes.

andylundqvist commented 1 year ago

Wow, thank you, those are already much better results. The one you didn't find was indeed one of those 3 tracks which are not available on Discogs. But 61 of 64 are found so that's a great result.

The MEDIATYPE is still a bit different though. Example release: https://www.discogs.com/release/8750611-Głós-Prayers

The complete format field here is: '12", 33 â…“ RPM, 45 RPM, EP' however the output file from 1T is only '1 x Vinyl'. If I go to the Edit Release page on Discogs I see:

mediatype

OneTagger fetches the green but not the red. Would it be possible to include all this? The data you have already pulled isn't from only the master so it should be possible, I hope. Also Mp3tag can pull this data correctly. And in there is my wished for Compilation checkbox. 😃

Thanks!

Marekkon5 commented 1 year ago

Fixed in latest commit, was caused because of a typo.

andylundqvist commented 1 year ago

Brilliant! Seems to work fine for me. I hope there will be a new version released soon, with all these neat new features.

I wonder, is a (one time) donation via PayPal, Patreon or Github Sponsors better for you? Considering the percentage share you receive or having as little as possible bureaucracy.

Also you should consider a Discord server. If not for support (which is maybe better structured here), but for general OneTagger topics and tips.

Marekkon5 commented 1 year ago
  1. We usually make a new release when enough changes were made, so it is kinda random. However the Actions builds in 99% cases are safe.

  2. PayPal charges me no fees. Thank you for the donation.

  3. I don't think the ""community"" is big enough to even consider this now, however possible in future. However feel free to open issues on any topic (bugs, support questions, feature requests, or discussion).

andylundqvist commented 1 year ago

Hey @Marekkon5 - I just tried 1.6.0 and when I choose Discogs the Other field (with media type) is grayed out and can't be selected. Is there a reason why this was left out in the latest stable version? I miss it!

Edit: Actually I see now that the text when hovering over the Other checkbox text mentions Discogs so maybe it's been forgotten.

Marekkon5 commented 1 year ago

@andylundqvist there has been a internal refactor of the platforms, so it is my mistake that I forgot to mark Discogs with the other tag. You can get the latest build from the Actions tab where it's fixed, or in the current build enable some platform with Other tag, and then disable the platform (the checkbox will be checked even if it's disabled). However I recommend updating to the Actions build. Thanks

andylundqvist commented 1 year ago

Thank you, it works again for me in the latest build!

andylundqvist commented 1 year ago

Sorry, I think I spoke to soon. In the latest build I sometimes get this error in the log:

2023-05-12 09:58:10 [ERROR] onetagger_shared: PANIC: panicked at 'index out of bounds: the len is 2 but the index is 3', crates/onetagger-platforms/src/discogs.rs:355:24
2023-05-12 09:58:10 [ERROR] onetagger_shared: LOCATION: File: crates/onetagger-platforms/src/discogs.rs, Line: 355

The weird thing is: The tagging process works perfectly on some directories, and on some it only works half-way and then stops, on some it just skips all tracks and says the tagging is complete with zero changes. These are directories that I have previously tagged with the Discogs source, I am rescanning them to add mediatype ("Other" option). So it should catch all files.

I have Overwrite tags ON and Skip already tagged tracks OFF. I have Strictness at 60% and Search threads at 20 and Max albums to check 4, if those things matter.

I'm going to try the stable version with your options fix and see if that works better.

Marekkon5 commented 1 year ago

Hello, this is a new issue. Could you provide track name and artist of the track(s) that do this, or full log? Thank you.

andylundqvist commented 1 year ago

Let me know if you need a full log, otherwise here an example:

2023-05-12 09:46:13 [INFO] onetagger::socket: AutoTagger config: TaggerConfig { platforms: ["discogs"], path: Some("/Users/me/Test/"), title: true, artist: true, album: true, key: false, bpm: true, genre: true, style: true, label: true, release_date: true, publish_date: false, album_art: true, other_tags: true, catalog_number: true, url: true, track_id: false, release_id: true, version: false, duration: false, album_artist: true, remixer: false, track_number: true, track_total: true, disc_number: true, isrc: false, mood: false, synced_lyrics: false, unsynced_lyrics: false, meta_tags: false, separators: TagSeparators { id3: ", ", vorbis: None, mp4: ", " }, id3v24: true, overwrite: true, threads: 20, strictness: 0.6, merge_genres: false, album_art_file: false, camelot: true, parse_filename: false, filename_template: Some("%artists% - %title%"), short_title: true, match_duration: false, max_duration_difference: 30, match_by_id: true, multiple_matches: Default, post_command: None, styles_options: MergeToGenres, styles_custom_tag: Some(FrameName { id3: "STYLE", vorbis: "STYLE", mp4: "STYLE" }), track_number_leading_zeroes: 0, enable_shazam: false, force_shazam: false, skip_tagged: false, include_subfolders: true, only_year: true, title_regex: None, move_success: true, move_success_path: Some("/Users/me/Test/__D/"), move_failed: false, move_failed_path: None, write_lrc: false, enhanced_lrc: false, multiplatform: true, custom: {}, spotify: None }
2023-05-12 09:46:13 [INFO] onetagger_autotag: Starting tagger with: 276 files!
2023-05-12 09:46:13 [INFO] onetagger_autotag: Starting tagging: 276 files, 1 threads!
2023-05-12 09:46:13 [INFO] onetagger_autotag: Starting discogs
2023-05-12 09:46:13 [INFO] onetagger_autotag: Tagging: /Users/me/Test/Noir, WestBoy - She's Got My Heart - Uner & Coyu Remix.mp3
2023-05-12 09:46:15 [ERROR] onetagger_shared: PANIC: panicked at 'index out of bounds: the len is 4 but the index is 10', crates/onetagger-platforms/src/discogs.rs:355:24
2023-05-12 09:46:15 [ERROR] onetagger_shared: LOCATION: File: crates/onetagger-platforms/src/discogs.rs, Line: 355
2023-05-12 09:46:15 [INFO] onetagger_autotag: Written failed songs to: /Users/me/Library/Preferences/com.OneTagger.OneTagger/runs/failed-1683877575270.m3u, successful to: /Users/me/Library/Preferences/com.OneTagger.OneTagger/runs/success-1683877575270.m3u
2023-05-12 09:46:15 [INFO] onetagger::socket: Tagging finished, took: 1 seconds.
Marekkon5 commented 1 year ago

Hello, the bug was related to the track number + release ID matching. Should be fixed in latest commit. You can get the binary from the Actions tab.

andylundqvist commented 1 year ago

With the latest build I get no matches at all. I reverted back to 1.6.0 and tried your checkbox workaround and that seems to work, but I think something is wrong with the latest fix of yours. If I can help with testing, let me know!

Marekkon5 commented 1 year ago

Hello, I can't really reproduce the issue. I've made a fix, you can get it from the Actions tab. If the issue still persist, could you please send me the Discogs link, your DISCOGS_RELEASE_ID frame value, and title + artist? Thank you.