Commit Graph

8 Commits

Author SHA1 Message Date
Jim Broadus 6240fd3d0a player: Fix crash on UrlHandler error.
In a case where a playlist is composed entirely of unresolvable
internet service URLs and the playlist is set to repeat, playing an
item will result in an infinite (until crash) recursive condition.
HandleLoadResult is called with a NoMoreTracks result. It then calls
NextItem, which calls PlayAt for the next item, which, again, calls
HandleLoadResult.

This can be reproduced by logging into a subsonic server, adding items
to an empty playlist, then signing out.

To solve this, separate the error condition from the NoMoreTracks
result. Handle URL resolution errors the same way that media playback
errors are handled, where an error count is incremented and the player
stops if a limit is reached. The common code also notifies the playlist
of the error and provides user feedback by graying out the item.
2021-06-21 12:52:25 +01:00
John Maguire 341dc7326f Reformat all C++ 2020-09-22 14:56:06 +01:00
ftiede 4619a4c1ab Work around Qt's QUrl parser. (#6059)
Qt's QUrl parser does no longer accept pure numeric hostnames without
trying to make a dotted IPv4 address of them.
Thus current method of storing subsonic's numeric ids in the host part
of a QUrl ("subsonic://<id>") does no longer work.
Instead a query is constructed omitting the host-part entirely and using
"subsonic://?id=<id>" to store and retrieve subsonic titles.
2018-05-23 14:23:21 +01:00
David G. F f1825629db Qt5
* Fixing a couple of issues with subsonic in the qt5 port

* Forgot to add this fixes as well, otherwise won't play music!
2016-04-19 23:22:23 +01:00
Chocobozzz 631a6cdabd Merge branch 'master' into qt5 2015-09-16 17:40:54 +02:00
Ivan Leontiev eb8fad766f Removed default value for the parameter original_url in the UrlHandler::LoadResult() constructor and updated internet services according to this. 2015-08-05 19:45:56 +00:00
Chocobozzz 8b226c2171 Update non optionnals sources to qt5 2015-04-11 23:24:07 +02:00
Krzysztof Sobiecki 93a286a272 Move files around and make subdirectories inside src/internet, move src/podcasts to src/internet 2014-12-18 00:39:20 +01:00