Skip to content

podcast last position fix proposal#376

Merged
mherger merged 1 commit intoLMS-Community:public/8.0from
philippe44:podcast-start-from-last-position-fix
Jul 2, 2020
Merged

podcast last position fix proposal#376
mherger merged 1 commit intoLMS-Community:public/8.0from
philippe44:podcast-start-from-last-position-fix

Conversation

@philippe44
Copy link
Contributor

This PR tries to fix podcast "resume from last position" behavior. This features does not work today when stopping track#1, starting #2, stopping #2 and then trying to start #1 at memorized position. This is because the songChangeCallBack has no way to differentiate a call with a jump from a call from the beginning. By adding a CODE in the play field, it allows that difference to be made.

@philippe44 philippe44 changed the title fix proposal podcast last position fix proposal Jun 30, 2020
@michaelherger
Copy link
Member

Haven't listened to podcasts on SB recently... could you please describe in more detail how to reproduce the issue you're trying to fix?

One of the reasons (besides lack of spare time...) why I didn't use this feature much recently was the streams stopping mid episode. Should that issue be fixed by one of your recent patches? I'm currently running your remote-headers branch. Should this help with that issue?

@philippe44
Copy link
Contributor Author

philippe44 commented Jun 30, 2020

Haven't listened to podcasts on SB recently... could you please describe in more detail how to reproduce the issue you're trying to fix?

If you play a podcast and you stop (not pause) it in the middle (or seek to a position for the sake of test), play a second one and then try later to restart from the beginning of the first one, it will restart at the memorized beginning. The reason being the following test

if ( $request->isCommand([['playlist'], ['newsong']]) && !($client->pluginData('goto') && $client->pluginData('goto') eq $url) && Slim::Music::Info::isRemoteURL($url) ) {	
		$client->pluginData( goto => $url );		
		if ( my $newPos = $cache->get("podcast-$url") ) {
			Slim::Player::Source::gototime($client, $newPos);			
		}		
	}

Means that we'll always do the goto (not empty and we are playing a new url). The test has no way to differentiate between a restart and a start at last position

One of the reasons (besides lack of spare time...) why I didn't use this feature much recently was the streams stopping mid episode. Should that issue be fixed by one of your recent patches? I'm currently running your remote-headers branch. Should this help with that issue?

I'm afraid not, I've been investigating that and it seems to be related to a low-level SSL issue. My Windows system is mainly affected, not my Linux one. Did that happen all the time for you?

@mherger mherger merged commit db61d67 into LMS-Community:public/8.0 Jul 2, 2020
@philippe44 philippe44 deleted the podcast-start-from-last-position-fix branch July 2, 2020 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants