Algorithm to match / link complementary pairs
Assuming you don't want to repeat a song, this is the problem of finding a longest path in a directed graph.  Here the graph has one vertex per song, and an edge $s \to t$ if the ending of song $s$ blends well with the beginning of song $t$.

Unfortunately, the longest-path problem is NP-hard.  (See, e.g., Is finding the longest path of a graph NP-complete?,  How to prove NP-hardness of a longest-path problem?.)  This means that you should not expect to find an efficient algorithm for your problem that works on all graphs and that is always correct.  Instead,if you want to solve it in practice, your best will be to look for approximation algorithms or heuristics.

Unfortunately, it is also known that there are no approximation algorithms with guaranteed performance, i.e., that are guaranteed to find a path that is close to the longest, for all graphs.  (See 
https://en.wikipedia.org/wiki/Longest_path_problem#Approximation.)  So your best bet is to look for heuristics... or hope your graph has some special structure.

If you are willing to allow repeated songs, then the problem becomes tractable in theory, but the resulting algorithms are probably going to provide poor-quality results in practice.  In particular, if you find any cycle in the graph, then it is possible to traverse the cycle an unbounded number of times, achieving an arbitrarily long path.  Unfortunately these algorithms have a decent chance of producing a cycle of short length, which means that your playlist will just repeat the same few songs over and over... which is probably not what you'd hope for.

One simple heuristic might be to pick a starting vertex randomly, do depth-first search starting from that vertex, find the leaf in the tree with largest depth, and use the path from the root to that leaf as your playlist.  You could repeat a few times from a few different random starting points and take the best playlist found.  There are no guarantees for how well this will perform; you'd have to try it out to see.