I’ve cloned Picard locally from my forked repo.
I build it this way: “ICBMx6:picard tdiaz$ pip3 install . --user” and then launch with “picard”
Drag and Drop works at first. I can select any one item. (Track or Folder) and drop it right back where it was. No issues. If I drag it across panes, placing it in the other pane it works.
Then no more drag & drop / proper selecting fully works again until restarting the application.
Two things stop working working fully, and I suspect the latter is part of the former.
Typical behavior when a file is dragged from one pane to the other:
Click to select.
Holding the button, it highlights.
**When you start dragging the file, **
the highlighted rectangle stays with the cursor, turning to a semi-transparent mode, it as you start moving across the window.
When you reach a specific targeted folder, the folder will highlight.
Let go and it goes into that folder. Done.
If you don’t go for a specific target folder, just the window pane in general, it does whatever depending on which side it’s dropped on.
What I’m getting after an initial successful action is I can still select single, or multiple items as usual. (Dragging over the whole list, clicking a single, using the shift and/or Open-Apple key to is at the start of dragging. The intended selection(s) highlight in the expected order based on which keys are used. e.g.: I can select a whole range, hold down the Apple key, click to deselect single ones, add others outside of the range, etc. All good there.
With multiple selections highlighted, I go to grab the selected items, it deselects them all, leaving just the one I clicked on highlighted. But it does not move with the cursor. The same goes if i clock on just a single, continue holding down the button and start to drag. It just stays selected like nothing happened.
Additionally, once it’s in that state, dragging anything from the desktop or File Browser onto Picard is practically ignored. A couple tracks may pop into the Unclustered Files. They won’t scan, lookup, anything. Any attempts to add files/folders to Picard is like you’re dropping the stuff in the wrong place. It’s just not going to have anything to do with it.
Terminal output:
QDragManager::drag in possibly invalid state
QDragManager::drag in possibly invalid state
QDragManager::drag in possibly invalid state
Empty filename passed to function
Empty filename passed to function
I’m doing this stuff with the intention of eventually either adding a selection in Options, or via Plug-in.
The changes I have made are minor, at least to me, given the scope of the whole thing.
init.py: I changed the colons in the time format to “%dh%02dm%02ds” from “%d:%02d:%02d”, and the two place just has the ‘m’, with the ‘s’ added to the end. “%dm%02ds”
This also affects the display in Picard as well, FWIW. (Of course it does, an unintended side effect.) But it does the intended action when saved to disk. I suppose a way around that would be to get a variable for hours, minutes, seconds individually and place the desired h,m,s next to it. But I don’t see that easily happening script wise right now. I may have missed something?
emptydir.py: I added a few more files to ignore when considering the folder empty for deletion.
renaming.py: I added additional sample data in example_1 and example_2
file.py: I changed the center section def _rename to break down the os.path, append the (x) to the next higher folder name, and continue as normal.
I also added the library for discid. I get no errors from the build.
Terminal Output:
ICBMx6:picard tdiaz$ pip3 install . --user
Processing /Users/tdiaz/Merlin/picard
Requirement already satisfied: PyQt5 in /usr/local/lib/python3.7/site-packages (from picard==2.2.1) (5.13.1)
Requirement already satisfied: mutagen in /usr/local/lib/python3.7/site-packages (from picard==2.2.1) (1.42.0)
Requirement already satisfied: PyQt5_sip<13,>=4.19.19 in /usr/local/lib/python3.7/site-packages (from PyQt5->picard==2.2.1) (4.19.19)
Building wheels for collected packages: picard
Building wheel for picard (setup.py) ... done
Stored in directory: /private/var/folders/rc/wr8mtd6n33b4t58sb172c2y40000gn/T/pip-ephem-wheel-cache-m26n0rbv/wheels/b0/63/39/a228f2935157f99654339c887b8925a4ba4bd92c217d74b11e
Successfully built picard
Installing collected packages: picard
Found existing installation: picard 2.2.1
Uninstalling picard-2.2.1:
Successfully uninstalled picard-2.2.1
Successfully installed picard-2.2.1
ICBMx6:picard tdiaz$
Otherwise any other terminal output looks like the usual:
E: 16:57:57,264 /Users/tdiaz/Library/Python/3.7/lib/python/site-packages/picard/webservice/__init__._handle_reply:387: Network request error for https://ia800607.us.archive.org:443/17/items/mbid-517077f0-873a-32ec-b7f1-38841c1eee02/index.json: Error transferring https://ia800607.us.archive.org:443/17/items/mbid-517077f0-873a-32ec-b7f1-38841c1eee02/index.json - server replied: Not Found (QT code 203, HTTP code 404)
E: 16:57:57,264 /Users/tdiaz/Library/Python/3.7/lib/python/site-packages/picard/album.error_append:259: CAA JSON error: Error transferring https://ia800607.us.archive.org:443/17/items/mbid-517077f0-873a-32ec-b7f1-38841c1eee02/index.json - server replied: Not Found
E: 16:57:57,573 /Users/tdiaz/Library/Python/3.7/lib/python/site-packages/picard/webservice/__init__._handle_reply:387: Network request error for https://orion.apiseeds.com:443/api/music/lyric/DEVO/Here%2520to%2520Go%2520%2528Go%2520mix%2520version%2529?apikey=GblsMGUxsxQWdcmCQuZG1Cd9L7sjIM73JJ3W2OTkVplyoOO881q1V1nUF1MHszH9: Error transferring https://orion.apiseeds.com:443/api/music/lyric/DEVO/Here%2520to%2520Go%2520%2528Go%2520mix%2520version%2529?apikey=GblsMGUxsxQWdcmCQuZG1Cd9L7sjIM73JJ3W2OTkVplyoOO881q1V1nUF1MHszH9 - server replied: Not Found (QT code 203, HTTP code 404)
I have not yet gone back and replaced the modules each individually or in total and built again to see if the same behavior continues. I wouldn’t be surprised, but the changes I’ve done just seen so far unreleated to dragging / dropping. I just don’t get it.