Commit Graph

660 Commits

Author SHA1 Message Date
Bart De Vries 3e79321c90 Solve a few remaining problems with MPRIS2
Now the application doesn't crash anymore if no track is loading on
startup.
Seeking through MPRIS2 also works again.
2021-04-21 14:53:02 +02:00
Bart De Vries 60330608ac Refactor the MPRIS2 MediaPlayer2.Player implementation
Changed most items to refer to the underlying AudioManager methods and
signals.
WIP: Still need to check the ProgressOnTaskBar stuff.
2021-04-21 14:53:02 +02:00
Bart De Vries 7c4658db2d Change implementation of seekable in AudioManager
We cannot simply pass on the value from the underlying QMediaPlayer,
since it is not reliable (see hacks concerning restoring startup player
position).  Instead we keep track of it ourselves and send out the
signal in the proper places.
2021-04-21 14:53:02 +02:00
Bart De Vries 21feef8ce0 Refactor to use skipForward and skipBackward
This is done to make the distinction between skipping time and changing
track.
2021-04-21 14:53:02 +02:00
Bart De Vries 791c25ad19 Use next() and previous() in PlayerControl
Also change to std::min and std::max for the implementation of next and
previous.
2021-04-21 14:53:02 +02:00
Bart De Vries 2aa237342c Minor tweak to let MPRIS2 load the correct track info on startup
It's still crashing without a proper track being loaded on startup.
Still needs to be resolved.
2021-04-21 14:53:02 +02:00
Bart De Vries c7164b3f6b Refactor audiomanager to be closer to MPRIS2 interface 2021-04-21 14:53:02 +02:00
Bart De Vries 139baba454 Remove unused ifdef 2021-04-21 14:53:02 +02:00
Bart De Vries 8fff1e127e Remove commented, old qml code 2021-04-21 14:53:02 +02:00
Bart De Vries 48e0e509f7 Switch to using PagePool 2021-04-21 14:53:02 +02:00
Bart De Vries ed58c4eda7 Do not show insertToQueue button if already added to Queue 2021-04-21 14:53:02 +02:00
Bart De Vries d9013ede9d Fix another issue with player startup position recovery 2021-04-21 14:53:02 +02:00
Bart De Vries 569c988962 Enabled MPRIS2 (WIP)
Simple play controls are working, but there seems to be quite a bit
missing still.
Proper signals are not triggered for the first track on startup.
2021-04-21 14:53:02 +02:00
Bart De Vries f626cee7af Fix saving last playing item when application is shutdown 2021-04-21 14:53:02 +02:00
Bart De Vries 593934bc4f Initial copy and adaptation of MPRIS2 from elisa (WIP)
This MPRIS2 implementation compiles without errors, but is not yet
instantiated within the application itself.
To be continued...
2021-04-21 14:53:02 +02:00
Bart De Vries 7e39d83f90 Restore last playing track on startup 2021-04-21 14:53:02 +02:00
Bart De Vries f5c20a92e2 Slightly adapt (temporary) debug information from enclosure 2021-04-21 14:53:02 +02:00
Bart De Vries 515064e618 Change enclosure license headers 2021-04-21 14:53:02 +02:00
Bart De Vries f88fb22153 Finally implement restoring playback positions! 2021-04-21 14:53:02 +02:00
Bart De Vries 129707009c Implement the framework for custom audio starting position
What's still needed is the backend for saving the current position
and making the audio player aware of that position when the entry
is changed.
2021-04-21 14:53:02 +02:00
Bart De Vries 527ed67d4a Remove "source" property from audiomanager
Also rename the internal variables of audiomanager to be aligned
with the naming conventions used elsewhere.
2021-04-21 14:53:02 +02:00
Bart De Vries d531b892e8 Adapt license headers of audiomanager 2021-04-21 14:53:02 +02:00
Bart De Vries 6b62ba2cf9 Add playbackrate capability to AudioManager 2021-04-21 14:53:02 +02:00
Bart De Vries 33f380e387 Clarify comment about read/new status 2021-04-21 14:53:02 +02:00
Bart De Vries e722ec29ee Solve issue with miniplayer not hiding on startup 2021-04-21 14:53:02 +02:00
Bart De Vries 3aa4b836d2 Make PlayerManager work
Still one issue with the minimized player opening on startup
2021-04-21 14:53:02 +02:00
Bart De Vries 7d94792872 Add audiomanager and powermanagementinterface
Both classes are based on classes taken from Elisa.

The audiomanager class will be adapted to add functionality like saving
and restoring play positions and interfacing with MPRIS2.
2021-04-21 14:53:02 +02:00
Bart De Vries 16c052250c Make main thread more responsive when updating feeds 2021-04-21 14:53:02 +02:00
Bart De Vries ee13a29d10 Add playposition tracking in enclosure 2021-04-21 14:53:02 +02:00
Bart De Vries e174269332 Make time countdown setting in player persistent 2021-04-21 14:53:02 +02:00
Bart De Vries e1b374e375 Make app restore last playing item 2021-04-21 14:53:02 +02:00
Bart De Vries 218b86807e Make application remember the last opened main page 2021-04-21 14:53:02 +02:00
Bart De Vries fbaf084a37 Solve issue with imported feeds being processed twice 2021-04-21 14:53:02 +02:00
Bart De Vries 65ef16017b Rename AlligatorSettings to SettingsManager 2021-04-21 14:53:02 +02:00
Bart De Vries 7468c35b9a Enable autoDownload
There seems to still be a problem with the images not being fetched for
the newly added queue items.
2021-04-21 14:53:02 +02:00
Bart De Vries 718a9ef734 Delete feed pointer as last action
This to ensure that there will not be a dangling pointer when doing all
the other delete operations (entries, enclosures, files and images).
2021-04-21 14:53:02 +02:00
Bart De Vries 20730ccc6f Add autoQueue option to SettingsPage 2021-04-21 14:53:02 +02:00
Bart De Vries 7232238d7b Add additional checks after enclosure has been downloaded
The file size in the database will be corrected if it doesn't match the
real file size.
The "new" status will be unset once the file has been downloaded.
2021-04-21 14:53:02 +02:00
Bart De Vries 61e3af704b Add "new" label also to queue entries 2021-04-21 14:53:02 +02:00
Bart De Vries a8e174739f Implement "new" episodes feature and autoQueue 2021-04-21 14:53:02 +02:00
Bart De Vries 26986616c7 Only mark episodes as read/new on new feeds, not on existing ones 2021-04-21 14:53:02 +02:00
Bart De Vries 056a7b7835 Fix segmentation fault due to non-existent entry in m_feeds 2021-04-21 14:53:02 +02:00
Bart De Vries 3a4cdbfec0 Implement limited number of new entries for new feed 2021-04-21 14:53:02 +02:00
Bart De Vries 58b5719f71 Minor whitespace correction 2021-04-21 14:53:02 +02:00
Bart De Vries 436e66542a Change to singleton AlligatorSettings class 2021-04-21 14:53:02 +02:00
Bart De Vries 81c2ad90d1 Add "new" label to entry list items 2021-04-21 14:53:02 +02:00
Bart De Vries 4455545daa More optimizations of PlayerControls 2021-04-21 14:53:02 +02:00
Bart De Vries a4dea193ad Make properties for miniplayer size 2021-04-21 14:53:02 +02:00
Bart De Vries 5d5ca2c58b Add title and feed name below image in PlayerControls 2021-04-21 14:53:02 +02:00
Bart De Vries 518dbf293e Fix scrollview details flickable 2021-04-21 14:53:02 +02:00