tomahawk-player / tomahawk

Tomahawk, the multi-source music player
http://tomahawk-player.org
GNU General Public License v3.0
2.95k stars 367 forks source link

Ampache: Can't play song (hangs on 00:00) #563

Open rseek opened 7 years ago

rseek commented 7 years ago

Hi, here is my problem:

  1. Click on my Ampache collection
  2. Browse to any song
  3. Click play

Expected result: Song is playing

Actual result: Song hangs on 00:00 (but I see all notifications like "THIS SONg is now playing!")

Lines from tomahawk log: (ampache server is masked)

ср сен 21 2016 - 23:17:20 [8]: void Tomahawk::ResultUrlChecker::check() Checking http url: "MY_AMPACHE/server/xml.server.php?action=play&filter=60&auth=985aa0b3d5e14e8eef5502d65c2b8288" 
ср сен 21 2016 - 23:17:20 [8]: void Tomahawk::ResultUrlChecker::headFinished() Found invalid http url: "MY_AMPACHE/server/xml.server.php?action=play&filter=60&auth=985aa0b3d5e14e8eef5502d65c2b8288" 6 

Important thing: when I copy-pasted this full url into browser: "MY_AMPACHE/server/xml.server.php?action=play&filter=60&auth=985aa0b3d5e14e8eef5502d65c2b8288", browser started to play this song.

Full Log (after click on "play"): (Ampache server url is masked):

ср сен 21 2016 - 23:17:20 [5]: void AudioEngine::play() 
ср сен 21 2016 - 23:17:20 [5]: void AudioEngine::next() 
ср сен 21 2016 - 23:17:20 [8]: bool AudioEngine::canGoNext() 
ср сен 21 2016 - 23:17:20 [5]: void AudioEngine::loadNextTrack() 
ср сен 21 2016 - 23:17:20 [8]: void AudioEngine::loadNextTrack() Loading playlist's next item Tomahawk::TreeProxyModelPlaylistInterface(0x26c2e80) false 
ср сен 21 2016 - 23:17:20 [1]: void AudioControls::onControlStateChanged() 
ср сен 21 2016 - 23:17:20 [8]: bool AudioEngine::canGoNext() 
ср сен 21 2016 - 23:17:20 [1]: virtual void PlayableProxyModel::setCurrentIndex(const QModelIndex&) 
ср сен 21 2016 - 23:17:20 [8]: void AudioEngine::loadNextTrack() Got next item, loading track 
ср сен 21 2016 - 23:17:20 [5]: void AudioEngine::loadTrack(const result_ptr&) "MY_AMPACHE/server/xml.server.php?action=play&filter=60&auth=985aa0b3d5e14e8eef5502d65c2b8288" 
ср сен 21 2016 - 23:17:20 [8]: Enqueueing command to rw thread: "logplayback" 
ср сен 21 2016 - 23:17:20 [5]: void AudioEngine::performLoadIODevice(const result_ptr&, const QString&) "MY_AMPACHE/server/xml.server.php?action=play&filter=60&auth=985aa0b3d5e14e8eef5502d65c2b8288" 
ср сен 21 2016 - 23:17:20 [9]: Committing "logplayback" "dd9821ad-1156-41b1-b0db-8eef265d8b7b" 
ср сен 21 2016 - 23:17:20 [8]: void Tomahawk::Source::onPlaybackFinished(const track_ptr&, const Tomahawk::PlaybackLog&) "Track(The Rolling Stones - Tell Me (You're Coming Back))" 
ср сен 21 2016 - 23:17:20 [0]: void HttpIODeviceReadyHandler::called() QNetworkReplyImpl(0x25188b0) 
ср сен 21 2016 - 23:17:20 [5]: void AudioEngine::performLoadTrack(Tomahawk::result_ptr, QString, QSharedPointer<QIODevice>) "MY_AMPACHE/server/xml.server.php?action=play&filter=60&auth=985aa0b3d5e14e8eef5502d65c2b8288" 
ср сен 21 2016 - 23:17:20 [0]: Starting new song: "MY_AMPACHE/server/xml.server.php?action=play&filter=60&auth=985aa0b3d5e14e8eef5502d65c2b8288" 
ср сен 21 2016 - 23:17:20 [1]: void AudioControls::onControlStateChanged() 
ср сен 21 2016 - 23:17:20 [8]: bool AudioEngine::canGoNext() 
ср сен 21 2016 - 23:17:20 [8]: Enqueueing command to thread: Tomahawk::DatabaseWorker(0x7f52b40029b0) 0 "loadsocialactions" 
ср сен 21 2016 - 23:17:20 [9]: virtual void Tomahawk::DatabaseCommand_LoadSocialActions::exec(Tomahawk::DatabaseImpl*) 
ср сен 21 2016 - 23:17:20 [8]: Enqueueing command to rw thread: "logplayback" 
ср сен 21 2016 - 23:17:20 [8]: INSERTING INTO OPLOG: 0 "ebe90517-e79b-404c-a229-58bd5239c20c" "logplayback" 
ср сен 21 2016 - 23:17:20 [8]: Singleton command, deleting previous oplog commands 
ср сен 21 2016 - 23:17:20 [8]: Saving to oplog: "logplayback" bytes: 224 guid: "ebe90517-e79b-404c-a229-58bd5239c20c" 
ср сен 21 2016 - 23:17:20 [9]: Committing "logplayback" "ebe90517-e79b-404c-a229-58bd5239c20c" 
ср сен 21 2016 - 23:17:20 [1]: void AudioEngine::onNowPlayingInfoReady(Tomahawk::InfoSystem::InfoType) Saving cover image to: "/tmp/The Rolling Stones_The Rolling Stones_tomahawk_cover.png.Jr5742" 
ср сен 21 2016 - 23:17:20 [8]: bool Tomahawk::InfoSystem::InfoSystem::pushInfo(Tomahawk::InfoSystem::InfoPushData) type is 80 
ср сен 21 2016 - 23:17:20 [8]: void Tomahawk::InfoSystem::InfoSystemWorker::pushInfo(Tomahawk::InfoSystem::InfoPushData) type is  80 
ср сен 21 2016 - 23:17:20 [8]: void Tomahawk::InfoSystem::InfoSystemWorker::getShortUrl(Tomahawk::InfoSystem::InfoPushData) type is  80 
ср сен 21 2016 - 23:17:20 [8]: void Tomahawk::InfoSystem::InfoSystemWorker::pushInfo(Tomahawk::InfoSystem::InfoPushData) type is  80 
ср сен 21 2016 - 23:17:20 [8]: void Tomahawk::InfoSystem::InfoSystemWorker::pushInfo(Tomahawk::InfoSystem::InfoPushData) number of matching plugins:  2 
ср сен 21 2016 - 23:17:20 [8]: void AudioEnginePrivate::onStateChanged(Phonon::State, Phonon::State)  Phonon::LoadingState   Phonon::StoppedState  false 4 
ср сен 21 2016 - 23:17:20 [8]: virtual void Tomahawk::InfoSystem::FdoNotifyPlugin::pushInfo(Tomahawk::InfoSystem::InfoPushData) showing notification: true 
ср сен 21 2016 - 23:17:20 [8]: void Tomahawk::InfoSystem::FdoNotifyPlugin::nowPlaying(const QVariant&) 
ср сен 21 2016 - 23:17:20 [8]: void Tomahawk::InfoSystem::FdoNotifyPlugin::nowPlaying(const QVariant&) sending message "<i></i>Can I Get A Witness
<i>by</i> The Rolling Stones
<i>on</i> The Rolling Stones." 
ср сен 21 2016 - 23:17:20 [8]: void Tomahawk::Source::onPlaybackStarted(const track_ptr&, unsigned int) "Track(The Rolling Stones - Can I Get A Witness)" 
ср сен 21 2016 - 23:17:20 [8]: void Tomahawk::SourcePlaylistInterface::onSourcePlaybackStarted(const track_ptr&) 
ср сен 21 2016 - 23:17:20 [8]: Dispatching to resolver "DatabaseResolver" "Query(4f8b6262-df77-4101-9fe1-cf8be8e42e08, The Rolling Stones - Can I Get A Witness)" false "4f8b6262-df77-4101-9fe1-cf8be8e42e08" 
ср сен 21 2016 - 23:17:20 [8]: Enqueueing command to thread: Tomahawk::DatabaseWorker(0x7f52b40029b0) 0 "dbresolve" 
ср сен 21 2016 - 23:17:20 [9]: No candidates found in first pass, aborting resolve "Track(The Rolling Stones - Can I Get A Witness)" 
ср сен 21 2016 - 23:17:20 [8]: void DatabaseResolver::gotResults(Tomahawk::QID, QList<QSharedPointer<Tomahawk::Result> >) "4f8b6262-df77-4101-9fe1-cf8be8e42e08" 0 
ср сен 21 2016 - 23:17:20 [8]: Dispatching to resolver "Ampache" "Query(4f8b6262-df77-4101-9fe1-cf8be8e42e08, The Rolling Stones - Can I Get A Witness)" false "4f8b6262-df77-4101-9fe1-cf8be8e42e08" 
ср сен 21 2016 - 23:17:20 [0]: "/home/john/.local/share/Tomahawk/atticaresolvers/ampache/contents/code/ampache.js" : "Ampache API call: MY_AMPACHE/server/xml.server.php?filter=Can%20I%20Get%20A%20Witness&limit=10&action=search_songs&auth=985aa0b3d5e14e8eef5502d65c2b8288" 
ср сен 21 2016 - 23:17:20 [1]: void ScriptEngine::sslErrorHandler(QNetworkReply*, const QList<QSslError>&) 
ср сен 21 2016 - 23:17:20 [0]: "/home/john/.local/share/Tomahawk/atticaresolvers/ampache/contents/code/ampache.js" : "<?xml version="1.0" encoding="UTF-8" standalone="yes"?><root>
    <song id='60'>
        <title>Can I Get A Witness</title>
        <artist id='14'>The Rolling Stones</artist>
        <albumartist id='14'>The Rolling Stones</albumartist>
        <album id='18'>The Rolling Stones</album>
        <url>MY_AMPACHE/server/xml.server.php?action=play&amp;filter=60&amp;auth=985aa0b3d5e14e8eef5502d65c2b8288</url>
        <time>179</time>
        <track>10</track>
        <bitrate>320000</bitrate>
        <mime>audio/mpeg</mime>
        <size>0</size>
        <art></art>
        <rating>0</rating>
        <preciserating>0</preciserating>
    </song>
</root>
" 
ср сен 21 2016 - 23:17:20 [9]: Resolver reporting results: QMap(("qid", QVariant(QString, "4f8b6262-df77-4101-9fe1-cf8be8e42e08") ) ( "results" ,  QVariant(QVariantList, (QVariant(QVariantMap, QMap(("album", QVariant(QString, "The Rolling Stones") ) ( "albumpos" ,  QVariant(QString, "10") ) ( "artist" ,  QVariant(QString, "The Rolling Stones") ) ( "duration" ,  QVariant(QString, "179") ) ( "score" ,  QVariant(QString, "0") ) ( "size" ,  QVariant(QString, "0") ) ( "source" ,  QVariant(QString, "Ampache") ) ( "track" ,  QVariant(QString, "Can I Get A Witness") ) ( "url" ,  QVariant(QString, "MY_AMPACHE/server/xml.server.php?action=play&filter=60&auth=985aa0b3d5e14e8eef5502d65c2b8288") ) )  ) )  ) ) )  
ср сен 21 2016 - 23:17:20 [8]: void Tomahawk::ResultUrlChecker::check() Checking http url: "MY_AMPACHE/server/xml.server.php?action=play&filter=60&auth=985aa0b3d5e14e8eef5502d65c2b8288" 
ср сен 21 2016 - 23:17:20 [8]: void Tomahawk::ResultUrlChecker::headFinished() Found invalid http url: "MY_AMPACHE/server/xml.server.php?action=play&filter=60&auth=985aa0b3d5e14e8eef5502d65c2b8288" 6 
ср сен 21 2016 - 23:17:20 [8]: Finished resolving: "Query(4f8b6262-df77-4101-9fe1-cf8be8e42e08, The Rolling Stones - Can I Get A Witness)" 
ср сен 21 2016 - 23:17:20 [8]: void Tomahawk::SourcePlaylistInterface::resolvingFinished(bool) Has results? false 

Environemtn:

Ubuntu 16.04

TOMAHAWK DIAGNOSTICS LOG -ср сен 21 23:20:06 2016 

TOMAHAWK-VERSION: 0.8.4
PLATFORM: Linux
DBID: 77a783da-96e4-4129-8086-b9d33cb3a1fe

NETWORK:
    Listening to:
      192.168.1.101:50210
      172.17.0.1:50210
      [80.64.174.43]:50210

INFOPLUGINS:
      /usr/lib/x86_64-linux-gnu/libtomahawk_infoplugin_discogs.so
      /usr/lib/x86_64-linux-gnu/libtomahawk_infoplugin_charts.so
      /usr/lib/x86_64-linux-gnu/libtomahawk_infoplugin_echonest.so
      /usr/lib/x86_64-linux-gnu/libtomahawk_infoplugin_mpris.so
      /usr/lib/x86_64-linux-gnu/libtomahawk_infoplugin_newreleases.so
      /usr/lib/x86_64-linux-gnu/libtomahawk_infoplugin_rovi.so
      /usr/lib/x86_64-linux-gnu/libtomahawk_infoplugin_musixmatch.so
      /usr/lib/x86_64-linux-gnu/libtomahawk_infoplugin_hypem.so
      /usr/lib/x86_64-linux-gnu/libtomahawk_infoplugin_fdonotify.so
      /usr/lib/x86_64-linux-gnu/libtomahawk_infoplugin_spotify.so
      /usr/lib/x86_64-linux-gnu/libtomahawk_infoplugin_musicbrainz.so
      LastFM
      Spotify

ACCOUNTS:

Thank you for your time

muesli commented 7 years ago

Does it work without HTTPS, using plain HTTP (if that's an option to test with). Also, which phonon backends do you have installed? Try installing phonon-backend-vlc and removing every other phonon-backend-* (those backends are basically broken anyway, at least for streaming).

rseek commented 7 years ago

Thank you for quick response.

I have phonon-backend-vlc and phonon-backend-gstreamer (and ...gstreamer-common). If I uninstall phonon-backend-gstreamer and all others backends (but keep phonon-backend-vlc) I have this error:

"Sorry, there is a problem accessing your audio device or the desired track, current track will be skipped. Make sure you have a suitable Phonon backend and required plugins installed." 

Can't test HTTP right now

muesli commented 7 years ago

Did you restart Tomahawk after installing/uninstalling the package?