-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[WIP] Livemetadata PR #1675
Closed
Closed
[WIP] Livemetadata PR #1675
Changes from 6 commits
Commits
Show all changes
79 commits
Select commit
Hold shift + click to select a range
32cece7
Added .vscode on gitignore
davidhm ba829a2
First few files
davidhm 5169748
So far manual tests are working
davidhm 3d8c501
Pre automatic tests
davidhm 523d09b
Using github as a backup
davidhm 23ef862
Error when compiling moc generated cpp
davidhm 0a4a4d6
WIP: Automatic tests
davidhm d203e85
Moved timers away from Track object
davidhm 1a6bc0d
Pre volume scrobbling
davidhm ff27795
Pre tests, scrobbling manager
davidhm db2db23
Deadlock
davidhm 7f55150
Solved the deadlock, simple tests pass
davidhm 121443e
WIP: Adding file listener
davidhm 2cd5bbc
Fixed file buffer, it's automatically updated now
davidhm b9c4a6c
[Untested] Fixed file info, modified metadatabroadcast
davidhm e10df9e
[WIP] Adding tests for scrobbling manager
davidhm c1de7db
Added first test for scrobbling manager
davidhm 50019b0
File listener template + factory
davidhm d805306
Scrobbling tests done
davidhm 4e714d5
[WIP] Adding file preferences
davidhm b3f8ea8
Preferences mock-up
davidhm 8cd9c16
Changed everything to a weak pointer
davidhm d4b9aa5
Added file listener path in options
davidhm ec98ef6
[WIP] Persistent config now playing file
davidhm 0209b4a
[WIP] Requested changes
davidhm 2d8f4a2
Adding new tab
davidhm 88c4819
Added mock-up in preferences
davidhm ab8b524
Table view mockup
davidhm 97daf77
Pre changing prefmetadata class
davidhm 4bc2de3
Added file settings
davidhm 49b8b93
[Untested] Added options to file listener
davidhm 567e9b5
Modified settings, added concurrency
davidhm 5748fa9
Added dedicated thread
davidhm 3a677b6
Modified author and title string
davidhm 9c43d09
Merge branch 'master' into Livemetadata
davidhm 2c21183
Added connections to lambda expressions in player manager, file liste…
davidhm a6d67d7
Fixed tests failing
davidhm ba8a6fc
Added mock network manager, gotta test with mock server
davidhm 6b7f207
Now listening scrobbles work with ListenBrainz
davidhm f7c6a83
Deleted log file
davidhm 1057b06
Merge branch 'master' into Livemetadata
davidhm 152925c
ListenBrainz full scrobbles work now too
davidhm ad43628
Fixed double delete in developer mode
davidhm 751f567
Forgot to compile
davidhm 64d35c5
Modified metadata file options
davidhm ddfb859
Editable combobox
davidhm e4dc8df
Added mpris stub, not working
davidhm a1ad4c6
MPRIS now reflects the playback state
davidhm ee4c5a5
Disabled failing test until a solution is found
davidhm 4571d43
Fixed broken tests, continuing MPRIS implementation
davidhm 185d2f2
Fixed non compiling build
davidhm 0bc22be
Segfault on weak_ptr
davidhm 0af2279
Fixed eject bug
davidhm 6be0042
Mpris reflects AutoDJ enabled
davidhm 62eae49
Pause, play and go next MPRIS functions work
davidhm c2317c7
Fixed correct fade-in in MPRIS
davidhm 8b5e54a
Added volume, playback status and loop status as well as a LINUX define
davidhm cac8c1f
Moved MPRIS into a feature
davidhm 6807838
Added MPRIS macro in includes too
davidhm d6880a1
MPRIS is seekable now
davidhm 32e565a
MPRIS broadcasts current track and rate works now too
davidhm 1b77c8b
Modified linked lists into hash maps
davidhm 7ba10a7
Added space after commas
davidhm 94ab525
Changed ref ampersand and disabled non working test
davidhm 5e8fb60
Added more button in encoding combo box
davidhm 41bdfb9
Resized combobox
davidhm 0def3e3
Merge remote-tracking branch 'upstream/master' into Livemetadata
davidhm 9fe5277
Added few UI suggestions
davidhm 97271d8
Missing include
davidhm f4b9649
Added cover art to mpris
davidhm dde6c47
Added cover art to MPRIS player
davidhm e1cfd7a
Fixed few things
davidhm 69a3020
Deleting all cover art files
davidhm 7af4dd7
Single file image
davidhm 170e6c9
Cover art file is now QTemporaryFile
davidhm 8c6fa58
Revamped encoding combobox
davidhm 899f207
Fixed some cover URL generation issues
daschuer 4a13665
Small fixes
davidhm 39dc901
Merge pull request #1 from daschuer/Livemetadata
davidhm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,3 +57,5 @@ lib/*/*.lib | |
lib/*/lib/*.lib | ||
|
||
lib/qtscript-bytearray/*.cc | ||
|
||
*.vscode | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#include "metadatabroadcast.h" | ||
#include "mixer/playerinfo.h" | ||
|
||
MetadataBroadcast::MetadataBroadcast() { | ||
/*connect(&PlayerInfo::instance(),SIGNAL(trackLoaded(QString,TrackPointer)), | ||
this,SLOT(slotTrackLoaded(QString,TrackPointer))); | ||
connect(&PlayerInfo::instance(),SIGNAL(trackUnloaded(QString,TrackPointer)), | ||
this,SLOT(slotTrackUnloaded(QString,TrackPointer))); | ||
connect(&PlayerInfo::instance(),SIGNAL(trackPaused(QString,TrackPointer)), | ||
this,SLOT(slotTrackPaused(QString,TrackPointer))); | ||
connect(&PlayerInfo::instance(),SIGNAL(trackResumed(QString,TrackPointer)), | ||
this,SLOT(slotTrackResumed(QString,TrackPointer)));*/ | ||
} | ||
|
||
void MetadataBroadcast::slotTrackLoaded(QString group, TrackPointer pTrack) { | ||
if (!pTrack) | ||
return; | ||
qDebug() << "Track " << pTrack->getTitle() << "loaded in group " << group << "."; | ||
} | ||
|
||
void MetadataBroadcast::slotTrackUnloaded(QString group, TrackPointer pTrack) { | ||
if (!pTrack) | ||
return; | ||
qDebug() << "Track " << pTrack->getTitle() << "unloaded in group " << group << "."; | ||
} | ||
|
||
void MetadataBroadcast::slotTrackPaused(QString group, TrackPointer pTrack) { | ||
if (!pTrack) | ||
return; | ||
qDebug() << "Track " << pTrack->getTitle() << "paused in group " << group << "."; | ||
} | ||
|
||
void MetadataBroadcast::slotTrackResumed(QString group, TrackPointer pTrack) { | ||
if (!pTrack) | ||
return; | ||
qDebug() << "Track " << pTrack->getTitle() << "resumed in group " << group << "."; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include <QObject> | ||
#include "track/track.h" | ||
|
||
class MetadataBroadcast : public QObject { | ||
Q_OBJECT | ||
public: | ||
MetadataBroadcast(); | ||
public slots: | ||
void slotTrackLoaded(QString group, TrackPointer pTrack); | ||
void slotTrackUnloaded(QString group, TrackPointer pTrack); | ||
void slotTrackPaused(QString group, TrackPointer pTrack); | ||
void slotTrackResumed(QString group, TrackPointer pTrack); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#include "gtest/gtest.h" | ||
#include "gmock/gmock.h" | ||
#include "track/track.h" | ||
#include "track/trackplaytimers.h" | ||
#include "test/trackplayedtimer_test.h" | ||
|
||
class ElapsedTimerMock : public TrackTimers::ElapsedTimer { | ||
public: | ||
~ElapsedTimerMock() = default; | ||
MOCK_METHOD0(invalidate,void()); | ||
MOCK_METHOD0(start,void()); | ||
MOCK_METHOD0(isValid,bool()); | ||
MOCK_METHOD0(elapsed,qint64()); | ||
}; | ||
|
||
|
||
class TrackTest : public testing::Test { | ||
public: | ||
TrackTest() { | ||
testTrack = Track::newDummy(QFileInfo(),TrackId()); | ||
} | ||
~TrackTest() = default; | ||
TrackPointer testTrack; | ||
public slots: | ||
}; | ||
|
||
TEST_F(TrackTest,SendsSignalWhenScrobbable) { | ||
testTrack->setDuration(5); | ||
ElapsedTimerMock etmock; | ||
TimerMock tmock; | ||
EXPECT_CALL(etmock,invalidate()); | ||
EXPECT_CALL(etmock,isValid()) | ||
.WillOnce(testing::Return(false)) | ||
.WillOnce(testing::Return(true)); | ||
EXPECT_CALL(etmock,start()); | ||
EXPECT_CALL(tmock,start(1000)) | ||
.WillOnce(testing::InvokeWithoutArgs(testTrack.get(), | ||
&Track::slotCheckIfScrobbable)); | ||
EXPECT_CALL(etmock,elapsed()) | ||
.WillOnce(testing::Return(2500)); | ||
testTrack->setTimer(&tmock); | ||
testTrack->setElapsedTimer(&etmock); | ||
testTrack->resetPlayedTime(); | ||
testTrack->resumePlayedTime(); | ||
ASSERT_TRUE(testTrack->isScrobbable()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include <QObject> | ||
#include "track/trackplaytimers.h" | ||
#include "gmock/gmock.h" | ||
|
||
class TimerMock : public TrackTimers::TrackTimer { | ||
Q_OBJECT | ||
public: | ||
~TimerMock() = default; | ||
MOCK_METHOD1(start,void(int msec)); | ||
MOCK_METHOD0(isActive,bool()); | ||
MOCK_METHOD0(stop,void()); | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is not created by Mixxx or its build system. Adding patterns for every conceivable editor/IDE to this project's gitignore is neither desirable nor feasible. You should add it to your global gitignore instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, we should stop adding these editor generated files to our shared .gitignore and remove the ones that are already there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was already mentioned in that PR ages ago. I can't seem to find it.