Commit Graph

279 Commits

Author SHA1 Message Date
Keith Edmunds
c5f5155332 Remove link to database object from playlist. Fixes #16 2021-06-06 11:36:27 +01:00
Keith Edmunds
e498457395 Add option to force DEBUG message to stderr
If the default log level for stderr is greater than DEBUG, DEBUG
message won't be shown. The DEBUG(msg) function now takes an optional
Boolean second parameter. If that is True, the DEBUG message is always
sent to stderr.
2021-06-06 10:50:40 +01:00
Keith Edmunds
dbf0c27a09 Set up session before calling DbDialog. Fixes #13 2021-06-06 10:23:27 +01:00
Keith Edmunds
e1b9dacd34 Enable play controls after fade command 2021-06-05 09:01:03 +01:00
Keith Edmunds
5847345cdd Fix dimming of played tracks 2021-06-04 17:25:59 +01:00
Keith Edmunds
0cf649bb01 More 'detached session' fixes 2021-06-04 16:29:16 +01:00
Keith Edmunds
4bae0b8548 Hugely simplify save_playlist
Don't try to work out how tracks may have moved. Instead, delete all
track from current playlist and re-add them.
2021-06-04 15:45:29 +01:00
Keith Edmunds
a4bdbfccd0 Explicitly save playlist id in playlist 2021-06-04 15:44:29 +01:00
Keith Edmunds
52d48406ea Reordered functions in model.Playlists 2021-06-04 15:43:35 +01:00
Keith Edmunds
403313c0dd Add session.commit() when adding track 2021-06-04 14:47:17 +01:00
Keith Edmunds
6efc103ba5 More session fixups 2021-06-04 14:46:59 +01:00
Keith Edmunds
1abe377b4c Workaround for issue #10 2021-06-04 12:38:33 +01:00
Keith Edmunds
9eac5caf09 Separate out sessions. Starts addressing issue #10
We were creating a session in the "Add from database" dialog, and then
creating another session (with the first still active) in _repaint().

Separated out sessions; also don't call _save_playlist from _repaint
as it doesn't really have any connection.
2021-06-04 12:37:37 +01:00
Keith Edmunds
70f693a86b Enable play controls on Stop. Fixes #7 2021-06-03 21:11:24 +01:00
Keith Edmunds
ad717aeb2c Fix error inserting note (and track?) above selected row 2021-06-02 08:27:45 +01:00
Keith Edmunds
4984ddec98 Use sessions correctly (fixes #5) 2021-06-02 08:26:54 +01:00
Keith Edmunds
caa13b6693 Update database when playlist closed. Fixes #8 2021-06-01 21:20:32 +01:00
Keith Edmunds
326dc3655e Remove superfluous print statement 2021-06-01 18:32:32 +01:00
Keith Edmunds
4a24640666 Select next/previous non-note row with j/k 2021-05-31 12:08:50 +01:00
Keith Edmunds
0c67ba7b3e Add ^N to set next track 2021-05-31 11:24:14 +01:00
Keith Edmunds
453fe87bf9 Co-ordinate right-click play next - Fixes #2 2021-05-30 21:51:23 +01:00
Keith Edmunds
b10e729627 Hopefully addressing segfault in issue #3 2021-05-30 21:50:02 +01:00
Keith Edmunds
8366fed1be Fix no path being shown in playlist 2021-05-30 20:02:31 +01:00
Keith Edmunds
5d61b514b5 Remove current track highlighting when track ends 2021-05-30 19:48:26 +01:00
Keith Edmunds
00c9509c12 Have one "info" button for both Songfacts and Wikipedia 2021-05-30 19:46:38 +01:00
Keith Edmunds
5492ad58d5 Explcitly stop player and release it at end of track 2021-05-30 19:30:12 +01:00
Keith Edmunds
97524c201b Remove dummy 2021-05-29 19:36:03 +01:00
Keith Edmunds
98b23d9c48 Testing gitea. Fixes #1 2021-05-29 19:34:30 +01:00
Keith Edmunds
30e3332795 Fix issue #1: Add playlist table headers 2021-05-29 12:55:51 +01:00
Keith Edmunds
a35181bae7 Add Export Playist 2021-05-28 11:33:24 +01:00
Keith Edmunds
280e966f01 Fix bug where next track wasn't highlighted 2021-05-27 19:57:23 +01:00
Keith Edmunds
b7861ffcf9 Preserve tags on normalise; output time to stdout logs 2021-05-27 16:15:14 +01:00
Keith Edmunds
21c7b234fb Fix adding a new note 2021-05-26 21:19:09 +01:00
Keith Edmunds
0465fb45c4 Move tracks between playlists 2021-05-16 22:56:11 +01:00
Keith Edmunds
997627582f Ensure playlists are marked as open in db 2021-05-16 22:54:36 +01:00
Keith Edmunds
eedd898df9 Improve Add from Database dialog
- remember size of dialog box
 - show path of selected entry
2021-05-16 15:12:15 +01:00
Keith Edmunds
51cc3bfbca Add database reference to playlist
Also lots of cleaning up so that headers and playlist track colours
correct follow which playlist has the current/next track.
2021-05-16 12:39:19 +01:00
Keith Edmunds
ca9d0c75f8 proof of concept 2021-05-04 19:32:39 +01:00
Keith Edmunds
88e7ef2bca Update connection string and requirements.txt 2021-05-04 18:11:28 +01:00
Keith Edmunds
cc273f305b update requirements 2021-05-03 17:01:49 +01:00
Keith Edmunds
ffef3cd1c7 Close playlists; refine opening playlists 2021-05-02 23:35:00 +01:00
Keith Edmunds
ada25eaa26 Set default volume 2021-05-02 23:34:03 +01:00
Keith Edmunds
551319bb59 Wikipedia and Songsearch icons 2021-05-02 16:58:06 +01:00
Keith Edmunds
dc4b8dafd7 Add icons to Wikipedia and Songsearch buttons 2021-05-02 16:57:25 +01:00
Keith Edmunds
f54955c43a Clear current track header at end of track 2021-05-02 16:55:59 +01:00
Keith Edmunds
1c9c82cc1c Add rescan_database function 2021-05-02 16:11:08 +01:00
Keith Edmunds
cc9b168e81 Add buttons for Wikipedia and Songfacts 2021-05-02 16:10:44 +01:00
Keith Edmunds
74eac83c82 Add Wikipedia and Songfacts buttons 2021-05-02 10:36:25 +01:00
Keith Edmunds
ca995c8794 Change playlist menu names 2021-05-02 09:04:34 +01:00
Keith Edmunds
90b322f282 Scroll current track to centre of screen when played 2021-04-30 02:55:54 +01:00
Keith Edmunds
858bf4392e Display uncaught exceptions red on white 2021-04-30 02:48:06 +01:00
Keith Edmunds
51b2dd43e5 Tabbed playlists working 2021-04-29 22:20:24 +01:00
Keith Edmunds
4d852f7a4e Tabbed playlist proof-of-concept (via menu Test) 2021-04-27 18:34:03 +01:00
Keith Edmunds
e086dd35c6 Improve behaviour of select playlist dialog 2021-04-25 18:39:47 +01:00
Keith Edmunds
839f550e4a Rewrite of save_playlist (extensive) 2021-04-25 17:23:36 +01:00
Keith Edmunds
d113b9fc20 Name internal functions with underscore in playlists.py 2021-04-25 09:44:32 +01:00
Keith Edmunds
b2fe5f6f38 Maintain track headers when changing playlists 2021-04-25 00:04:01 +01:00
Keith Edmunds
d157dbd7c0 Check next track is readable 2021-04-25 00:02:41 +01:00
Keith Edmunds
4f4e81ab75 Use one master VLC instance 2021-04-25 00:01:32 +01:00
Keith Edmunds
2e41a673f4 Normalise tracks on import 2021-04-24 19:35:10 +01:00
Keith Edmunds
7fb76417d0 Fix showing track start times 2021-04-21 08:40:30 +01:00
Keith Edmunds
f452362c2a Add volume and stop, improve fading 2021-04-21 08:39:49 +01:00
Keith Edmunds
1c078a2d69 Show track start times rather than end times 2021-04-19 22:22:02 +01:00
Keith Edmunds
04f5a07c3e Better DEBUG messages 2021-04-19 21:01:27 +01:00
Keith Edmunds
2d80e20d5b New layout 2021-04-19 21:01:09 +01:00
Keith Edmunds
2f991da6ea Handle window closes better 2021-04-19 21:00:38 +01:00
Keith Edmunds
c5917b9df4 Bugfix: music.playing() sometimes wrongly returned False 2021-04-19 20:55:16 +01:00
Keith Edmunds
bb4d1d466c Rework buttons for main window 2021-04-19 07:53:39 +01:00
Keith Edmunds
c9c7331bb2 Use Python 3.8 f strings for DEBUG log 2021-04-16 06:06:08 +01:00
Keith Edmunds
3bcf66d036 Use env to find Python 2021-04-16 06:04:56 +01:00
Keith Edmunds
f049f410fc Enable play controls after fading a track 2021-04-12 18:56:20 +01:00
Keith Edmunds
b4079c2b13 Allow configuration of max VLC volume 2021-04-12 18:55:41 +01:00
Keith Edmunds
00fbfa334e Ensure tracks are visible when added to playlist 2021-04-11 15:40:01 +01:00
Keith Edmunds
0c041d0bf6 Improve detecting when track is playing. 2021-04-11 15:24:06 +01:00
Keith Edmunds
b049f3207d Ensure all rows in playlist are updated. 2021-04-11 15:13:39 +01:00
Keith Edmunds
958c3a8086 Yet another colour for notes 2021-04-11 15:12:57 +01:00
Keith Edmunds
36816c6d96 Tweak note colour 2021-04-10 23:27:42 +01:00
Keith Edmunds
3f7cac07e3 Bug fix: inserting timed note didn't refresh times 2021-04-10 23:12:01 +01:00
Keith Edmunds
5d65bebd1e Cleaned up save_playlist(); improved DEBUG logging. 2021-04-10 19:57:51 +01:00
Keith Edmunds
f61c6fd74f Implement deleting of notes 2021-04-10 17:45:54 +01:00
Keith Edmunds
830c88cc33 Add Config.TESTMODE 2021-04-10 17:21:27 +01:00
Keith Edmunds
62f6775e90 Let notes have times 2021-04-10 17:20:09 +01:00
Keith Edmunds
79b3071170 Improve appearance of buttons bottom right 2021-04-10 15:06:21 +01:00
Keith Edmunds
6adaa844e1 Change notes color to bootstrap bg-info 2021-04-10 13:58:55 +01:00
Keith Edmunds
00ebcb09ea Implement test menu and functions 2021-04-10 13:54:04 +01:00
Keith Edmunds
0a09be839d Don't allow program to quit whilst playing track. 2021-04-10 12:58:59 +01:00
Keith Edmunds
8d3c989c18 Keep row selection when adding tracks/notes 2021-04-10 12:54:32 +01:00
Keith Edmunds
2d247db543 Correctly handle determining whether a playlist row is selected. 2021-04-10 12:54:08 +01:00
Keith Edmunds
9ee5730b14 Fix up add from database dialog 2021-04-10 12:25:21 +01:00
Keith Edmunds
301bee4ba5 Reinstate row spanning after note move 2021-04-10 11:25:36 +01:00
Keith Edmunds
b3e3e503ca Improve adding tracks to end of playlist 2021-04-10 11:24:41 +01:00
Keith Edmunds
f550c8944f More DEBUG message improvements 2021-04-10 11:24:01 +01:00
Keith Edmunds
69ba659d73 Improve DEBUG messages 2021-04-10 11:22:34 +01:00
Keith Edmunds
ee0bfceeae Code review for V1.0.0 2021-04-09 23:21:42 +01:00
Keith Edmunds
eff7d0aca9 Log uncaught exceptions 2021-04-08 18:31:30 +01:00
Keith Edmunds
9068f46d40 Add file to db and playlist 2021-04-08 07:38:10 +01:00
Keith Edmunds
67b3b804e1 Playlist creation and changing fragilely working 2021-04-07 22:07:53 +01:00
Keith Edmunds
15a540234e Update headers as part of repaint 2021-04-06 23:57:20 +01:00
Keith Edmunds
5dc3575ce3 Implement right click delete 2021-04-06 23:51:47 +01:00
Keith Edmunds
4ebce12e81 Use resources for button icons 2021-04-06 19:06:42 +01:00
Keith Edmunds
5a446919e3 Store playlist order; allow reordering and save 2021-04-06 16:40:54 +01:00
Keith Edmunds
6d6327ae18 Efficient database updating 2021-04-05 13:20:28 +01:00
Keith Edmunds
8ccded2a57 Can add notes, not saved to db 2021-04-04 23:25:31 +01:00
Keith Edmunds
8f749fa78d Add stop command; some refactoring 2021-04-04 22:17:09 +01:00
Keith Edmunds
8cdeb3d1a9 Implement end times in playlist 2021-04-04 21:50:20 +01:00
Keith Edmunds
233cce7800 Headers, timer colours, all looking good 2021-04-04 19:49:33 +01:00
Keith Edmunds
ba9b9cc936 Dim played tracks 2021-04-04 13:25:55 +01:00
Keith Edmunds
dadd251587 Refactoring mostly done; manage playlist metadata 2021-04-04 12:57:43 +01:00
Keith Edmunds
bcfd076a93 Refactor into modules 2021-04-03 22:45:30 +01:00
Keith Edmunds
cf52eb3c9c Playlist drag and drop; track colours 2021-04-02 00:22:29 +01:00
Keith Edmunds
d3b739dc36 Fix fading; lots of tidying! 2021-03-30 19:42:39 +01:00
Keith Edmunds
6643da84b6 Use thread for fading 2021-03-28 22:05:37 +01:00
Keith Edmunds
6777c12aa4 Playdates now working 2021-03-28 14:40:09 +01:00
Keith Edmunds
65e967d112 Further playdates fixes 2021-03-28 14:37:31 +01:00
Keith Edmunds
9bd3a4cf00 Add fade duration 2021-03-28 14:35:51 +01:00
Keith Edmunds
ff556f3b0a Fix up playdates relationship 2021-03-28 14:35:25 +01:00
Keith Edmunds
adc4cec094 Add sort to playlist/tracks association table 2021-03-28 13:25:36 +01:00
Keith Edmunds
af895ef577 Store playlist in db 2021-03-27 22:41:29 +00:00
Keith Edmunds
ddce8f2391 Remove pytiger; select next track at end 2021-03-27 16:27:48 +00:00
Keith Edmunds
2bd96ad1a6 Make more robust 2021-03-27 13:55:57 +00:00
Keith Edmunds
44a8d30e35 Add TOD clocks 2021-03-27 00:44:24 +00:00
Keith Edmunds
e5037371af Tidying 2021-03-27 00:17:09 +00:00
Keith Edmunds
28143ced6c Counters updating; store full path; round milliseconds 2021-03-26 23:55:53 +00:00
Keith Edmunds
31cf7ca3e6 QTimer added, TOD clock updating 2021-03-26 18:56:43 +00:00
Keith Edmunds
aeda0880dd Play next works 2021-03-26 18:46:08 +00:00
Keith Edmunds
8abf4caf4a Store window size and location 2021-03-26 15:28:59 +00:00
Keith Edmunds
a6de739c74 Add settings table 2021-03-26 15:28:22 +00:00
Keith Edmunds
f1805138f6 Log formatting 2021-03-26 09:36:34 +00:00
Keith Edmunds
b58b9fc188 Restructure project layout; implement logging 2021-03-26 09:19:04 +00:00