mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2024-12-26 16:52:46 +01:00
Videoplayer bugfixes + Feedhandler bugfixes
This commit is contained in:
parent
1eefeec79f
commit
c8977b719f
@ -30,7 +30,7 @@
|
||||
<activity android:name="de.podfetcher.activity.ItemviewActivity"/>
|
||||
<activity android:name="de.podfetcher.activity.DownloadActivity"
|
||||
android:label="@string/downloads_label"/>
|
||||
<activity android:name="de.podfetcher.activity.MediaplayerActivity" android:launchMode="singleTask" android:configChanges="orientation" android:theme="@style/StyledIndicators"/>
|
||||
<activity android:name="de.podfetcher.activity.MediaplayerActivity" android:launchMode="singleTask" android:configChanges="orientation" android:theme="@style/Theme.MediaPlayer"/>
|
||||
|
||||
<service android:enabled="true" android:name="de.podfetcher.service.DownloadService" />
|
||||
<service android:enabled="true" android:name="de.podfetcher.service.PlaybackService" >
|
||||
|
6
res/values-land/styles.xml
Normal file
6
res/values-land/styles.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="Theme.MediaPlayer" parent="@style/Theme.Sherlock.Light.ForceOverflow">
|
||||
<item name="android:windowActionBarOverlay">true</item>
|
||||
</style>
|
||||
</resources>
|
6
res/values-port/styles.xml
Normal file
6
res/values-port/styles.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Theme.MediaPlayer" parent="@style/StyledIndicators"></style>
|
||||
|
||||
</resources>
|
@ -9,6 +9,5 @@
|
||||
<item name="vpiTabPageIndicatorStyle">@style/Widget.TabPageIndicator</item>
|
||||
<item name="android:textColor">@color/black</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
</resources>
|
@ -404,7 +404,6 @@ public class MediaplayerActivity extends SherlockFragmentActivity implements
|
||||
videoview.setOnClickListener(playbuttonListener);
|
||||
videoview.setOnTouchListener(onVideoviewTouched);
|
||||
setupVideoControlsToggler();
|
||||
requestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
|
||||
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
|
||||
WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
}
|
||||
@ -431,7 +430,9 @@ public class MediaplayerActivity extends SherlockFragmentActivity implements
|
||||
videoControlsToggler.cancel(true);
|
||||
}
|
||||
toggleVideoControlsVisibility();
|
||||
setupVideoControlsToggler();
|
||||
if (videoControlsShowing) {
|
||||
setupVideoControlsToggler();
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
@ -602,7 +603,7 @@ public class MediaplayerActivity extends SherlockFragmentActivity implements
|
||||
videoControlsToggler = null;
|
||||
}
|
||||
|
||||
private static final int WAITING_INTERVALL = 3000;
|
||||
private static final int WAITING_INTERVALL = 5000;
|
||||
private static final String TAG = "VideoControlsToggler";
|
||||
|
||||
@Override
|
||||
@ -617,14 +618,12 @@ public class MediaplayerActivity extends SherlockFragmentActivity implements
|
||||
|
||||
@Override
|
||||
protected Void doInBackground(Void... params) {
|
||||
while (!isCancelled()) {
|
||||
try {
|
||||
Thread.sleep(WAITING_INTERVALL);
|
||||
} catch (InterruptedException e) {
|
||||
return null;
|
||||
}
|
||||
publishProgress();
|
||||
try {
|
||||
Thread.sleep(WAITING_INTERVALL);
|
||||
} catch (InterruptedException e) {
|
||||
return null;
|
||||
}
|
||||
publishProgress();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -244,7 +244,7 @@ public class PodDBAdapter {
|
||||
} else {
|
||||
db.update(TABLE_NAME_FEED_MEDIA, values, KEY_ID + "=?",
|
||||
new String[] { String.valueOf(media.getId()) });
|
||||
}
|
||||
}
|
||||
return media.getId();
|
||||
}
|
||||
|
||||
@ -272,7 +272,7 @@ public class PodDBAdapter {
|
||||
}
|
||||
values.put(KEY_FEED, item.getFeed().getId());
|
||||
values.put(KEY_READ, item.isRead());
|
||||
|
||||
|
||||
if (item.getId() == 0) {
|
||||
item.setId(db.insert(TABLE_NAME_FEED_ITEMS, null, values));
|
||||
} else {
|
||||
@ -281,7 +281,7 @@ public class PodDBAdapter {
|
||||
}
|
||||
if (item.getSimpleChapters() != null) {
|
||||
setSimpleChapters(item);
|
||||
}
|
||||
}
|
||||
return item.getId();
|
||||
}
|
||||
|
||||
@ -305,24 +305,28 @@ public class PodDBAdapter {
|
||||
* Inserts or updates a download status.
|
||||
* */
|
||||
public long setDownloadStatus(DownloadStatus status) {
|
||||
ContentValues values = new ContentValues();
|
||||
values.put(KEY_FEEDFILE, status.getFeedFile().getId());
|
||||
if (status.getFeedFile().getClass() == Feed.class) {
|
||||
values.put(KEY_FEEDFILETYPE, FEEDFILETYPE_FEED);
|
||||
} else if (status.getFeedFile().getClass() == FeedImage.class) {
|
||||
values.put(KEY_FEEDFILETYPE, FEEDFILETYPE_FEEDIMAGE);
|
||||
} else if (status.getFeedFile().getClass() == FeedMedia.class) {
|
||||
values.put(KEY_FEEDFILETYPE, FEEDFILETYPE_FEEDMEDIA);
|
||||
}
|
||||
// Don't save failed downloads
|
||||
if (status.getFeedFile() != null) {
|
||||
ContentValues values = new ContentValues();
|
||||
values.put(KEY_FEEDFILE, status.getFeedFile().getId());
|
||||
if (status.getFeedFile().getClass() == Feed.class) {
|
||||
values.put(KEY_FEEDFILETYPE, FEEDFILETYPE_FEED);
|
||||
} else if (status.getFeedFile().getClass() == FeedImage.class) {
|
||||
values.put(KEY_FEEDFILETYPE, FEEDFILETYPE_FEEDIMAGE);
|
||||
} else if (status.getFeedFile().getClass() == FeedMedia.class) {
|
||||
values.put(KEY_FEEDFILETYPE, FEEDFILETYPE_FEEDMEDIA);
|
||||
}
|
||||
|
||||
values.put(KEY_REASON, status.getReason());
|
||||
values.put(KEY_SUCCESSFUL, status.isSuccessful());
|
||||
values.put(KEY_COMPLETION_DATE, status.getCompletionDate().getTime());
|
||||
if (status.getId() == 0) {
|
||||
status.setId(db.insert(TABLE_NAME_DOWNLOAD_LOG, null, values));
|
||||
} else {
|
||||
db.update(TABLE_NAME_DOWNLOAD_LOG, values, KEY_ID + "=?",
|
||||
new String[] { String.valueOf(status.getId()) });
|
||||
values.put(KEY_REASON, status.getReason());
|
||||
values.put(KEY_SUCCESSFUL, status.isSuccessful());
|
||||
values.put(KEY_COMPLETION_DATE, status.getCompletionDate()
|
||||
.getTime());
|
||||
if (status.getId() == 0) {
|
||||
status.setId(db.insert(TABLE_NAME_DOWNLOAD_LOG, null, values));
|
||||
} else {
|
||||
db.update(TABLE_NAME_DOWNLOAD_LOG, values, KEY_ID + "=?",
|
||||
new String[] { String.valueOf(status.getId()) });
|
||||
}
|
||||
}
|
||||
return status.getId();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user