Skip to content

Commit

Permalink
f_title -> f_name
Browse files Browse the repository at this point in the history
it's confusing having multiple properties for the same thing
  • Loading branch information
lachlan-00 committed Oct 14, 2021
1 parent 9aeb87f commit eb163a7
Show file tree
Hide file tree
Showing 37 changed files with 191 additions and 187 deletions.
2 changes: 1 addition & 1 deletion public/templates/show_add_shout.inc.php
Expand Up @@ -65,7 +65,7 @@
} ?>
<div style="display: inline;">
<?php
$boxtitle = $object->f_title . ' ' . T_('Shoutbox');
$boxtitle = $object->f_name . ' ' . T_('Shoutbox');
Ui::show_box_top($boxtitle, 'box box_add_shout'); ?>
<?php
if (count($shouts)) {
Expand Down
4 changes: 2 additions & 2 deletions public/templates/show_podcast.inc.php
Expand Up @@ -35,11 +35,11 @@
$browse = new Browse();
$browse->set_type($object_type);

Ui::show_box_top($podcast->f_title, 'info-box'); ?>
Ui::show_box_top($podcast->f_name, 'info-box'); ?>
<div class="item_right_info">
<?php
$thumb = Ui::is_grid_view('podcast') ? 32 : 11;
Art::display('podcast', $podcast->id, $podcast->f_title, $thumb); ?>
Art::display('podcast', $podcast->id, $podcast->f_name, $thumb); ?>
</div>
<?php if ($podcast->description) { ?>
<div id="item_summary">
Expand Down
4 changes: 2 additions & 2 deletions public/templates/show_podcast_episode.inc.php
Expand Up @@ -34,7 +34,7 @@

/** @var Podcast_Episode $episode */
?>
<?php Ui::show_box_top($episode->f_title . ' - ' . $episode->f_podcast_link, 'box box_podcast_episode_details'); ?>
<?php Ui::show_box_top($episode->f_name . ' - ' . $episode->f_podcast_link, 'box box_podcast_episode_details'); ?>
<dl class="media_details">

<?php if (User::is_registered()) { ?>
Expand Down Expand Up @@ -110,7 +110,7 @@
} ?>
</dd>
<?php
$songprops[T_('Title')] = $episode->f_title;
$songprops[T_('Title')] = $episode->f_name;
$songprops[T_('Description')] = $episode->f_description;
$songprops[T_('Category')] = $episode->f_category;
$songprops[T_('Author')] = $episode->f_author;
Expand Down
2 changes: 1 addition & 1 deletion public/templates/show_podcast_row.inc.php
Expand Up @@ -51,7 +51,7 @@
</div>
</td>
<td class="<?php echo $cel_cover; ?>">
<?php Art::display('podcast', $libitem->id, $libitem->f_title, 2, $libitem->link); ?>
<?php Art::display('podcast', $libitem->id, $libitem->f_name, 2, $libitem->link); ?>
</td>
<td class="cel_title"><?php echo $libitem->f_link; ?></td>
<td class="cel_siteurl"><?php echo $libitem->f_website_link; ?></td>
Expand Down
36 changes: 18 additions & 18 deletions public/templates/show_search_form.inc.php
Expand Up @@ -78,37 +78,37 @@
<select name="limit">
<option value="0"><?php echo T_('Unlimited'); ?></option>
<option value="1" <?php if ($limit == 1) {
echo "selected=\"selected\"";
}?>>1</option>
echo "selected=\"selected\"";
}?>>1</option>
<option value="5" <?php if ($limit == 5) {
echo "selected=\"selected\"";
}?>>5</option>
echo "selected=\"selected\"";
}?>>5</option>
<option value="10" <?php if ($limit == 10) {
echo "selected=\"selected\"";
}?>>10</option>
echo "selected=\"selected\"";
}?>>10</option>
<option value="25" <?php if ($limit == 25) {
echo "selected=\"selected\"";
}?>>25</option>
echo "selected=\"selected\"";
}?>>25</option>
<option value="50" <?php if ($limit == 50) {
echo "selected=\"selected\"";
}?>>50</option>
echo "selected=\"selected\"";
}?>>50</option>
<option value="100" <?php if ($limit == 100) {
echo "selected=\"selected\"";
}?>>100</option>
echo "selected=\"selected\"";
}?>>100</option>
<option value="250" <?php if ($limit == 250) {
echo "selected=\"selected\"";
}?>>250</option>
echo "selected=\"selected\"";
}?>>250</option>
<option value="500" <?php if ($limit == 500) {
echo "selected=\"selected\"";
}?>>500</option>
echo "selected=\"selected\"";
}?>>500</option>
</select>
</td>
</tr>
<tr id="random_results">
<td><?php echo T_('Random'); ?></td>
<td><input type="checkbox" name="random" value="1" <?php if ($random == 1) {
echo "checked";
} ?> /></td>
echo "checked";
} ?> /></td>
</tr>
</table>

Expand Down
8 changes: 4 additions & 4 deletions public/templates/show_video.inc.php
Expand Up @@ -36,16 +36,16 @@
use Ampache\Module\Util\Ui;

?>
<?php Ui::show_box_top($video->f_title . ' ' . T_('Details'), 'box box_video_details'); ?>
<?php Ui::show_box_top($video->f_name . ' ' . T_('Details'), 'box box_video_details'); ?>
<div class="item_right_info">
<?php
$gart = false;
// The release type is not the video itself, we probably want preview
if (get_class($video) != Movie::class) {
$gart = Art::display('video', $video->id, $video->f_title, 8, null, false, 'preview');
$gart = Art::display('video', $video->id, $video->f_name, 8, null, false, 'preview');
}
if (!$gart) {
$gart = Art::display('video', $video->id, $video->f_title, 7);
$gart = Art::display('video', $video->id, $video->f_name, 7);
} ?>
<?php if (AmpConfig::get('encode_srt')) { ?>
<div class="subtitles">
Expand Down Expand Up @@ -137,7 +137,7 @@
} ?>
</dd>
<?php
$videoprops[T_('Title')] = scrub_out($video->f_title);
$videoprops[T_('Title')] = scrub_out($video->f_name);
$videoprops[T_('Length')] = scrub_out($video->f_time);
if (get_class($video) != Video::class) {
require Ui::find_template('show_partial_' . ObjectTypeToClassNameMapper::reverseMap(get_class($video)) . '.inc.php');
Expand Down
4 changes: 2 additions & 2 deletions public/templates/show_video_row.inc.php
Expand Up @@ -64,11 +64,11 @@
<td class="<?php echo $cel_cover; ?>">
<?php $art_showed = false;
if ($libitem->get_default_art_kind() == 'preview') {
$art_showed = Art::display('video', $libitem->id, $libitem->f_title, 9, $libitem->link, false, 'preview');
$art_showed = Art::display('video', $libitem->id, $libitem->f_name, 9, $libitem->link, false, 'preview');
}
if (!$art_showed) {
$thumb = (isset($browse) && !$browse->is_grid_view()) ? 7 : 6;
Art::display('video', $libitem->id, $libitem->f_title, $thumb, $libitem->link);
Art::display('video', $libitem->id, $libitem->f_name, $thumb, $libitem->link);
} ?>
</td>
<td class="cel_title"><?php echo $libitem->f_link; ?></td>
Expand Down
8 changes: 4 additions & 4 deletions src/Gui/Song/SongViewAdapter.php
Expand Up @@ -347,13 +347,13 @@ public function getProperties(): array
$songprops[T_('Year')] = $this->song->year;
$songprops[T_('Original Year')] = scrub_out($this->song->get_album_original_year($this->song->album));
$songprops[T_('Length')] = scrub_out($this->song->f_time);
$songprops[T_('Links')] = "<a href=\"http://www.google.com/search?q=%22" . rawurlencode($this->song->f_artist) . "%22+%22" . rawurlencode($this->song->f_title) . "%22\" target=\"_blank\">" . UI::get_icon('google', T_('Search on Google ...')) . "</a>";
$songprops[T_('Links')] .= "&nbsp;<a href=\"https://www.duckduckgo.com/?q=%22" . rawurlencode($this->song->f_artist) . "%22+%22" . rawurlencode($this->song->f_title) . "%22\" target=\"_blank\">" . UI::get_icon('duckduckgo', T_('Search on DuckDuckGo ...')) . "</a>";
$songprops[T_('Links')] .= "&nbsp;<a href=\"http://www.last.fm/search?q=%22" . rawurlencode($this->song->f_artist) . "%22+%22" . rawurlencode($this->song->f_title) . "%22&type=track\" target=\"_blank\">" . UI::get_icon('lastfm', T_('Search on Last.fm ...')) . "</a>";
$songprops[T_('Links')] = "<a href=\"http://www.google.com/search?q=%22" . rawurlencode($this->song->f_artist) . "%22+%22" . rawurlencode($this->song->f_name) . "%22\" target=\"_blank\">" . UI::get_icon('google', T_('Search on Google ...')) . "</a>";
$songprops[T_('Links')] .= "&nbsp;<a href=\"https://www.duckduckgo.com/?q=%22" . rawurlencode($this->song->f_artist) . "%22+%22" . rawurlencode($this->song->f_name) . "%22\" target=\"_blank\">" . UI::get_icon('duckduckgo', T_('Search on DuckDuckGo ...')) . "</a>";
$songprops[T_('Links')] .= "&nbsp;<a href=\"http://www.last.fm/search?q=%22" . rawurlencode($this->song->f_artist) . "%22+%22" . rawurlencode($this->song->f_name) . "%22&type=track\" target=\"_blank\">" . UI::get_icon('lastfm', T_('Search on Last.fm ...')) . "</a>";
if ($this->song->mbid) {
$songprops[T_('Links')] .= "&nbsp;<a href=\"https://musicbrainz.org/recording/" . $this->song->mbid . "\" target=\"_blank\">" . UI::get_icon('musicbrainz', T_('Search on Musicbrainz ...')) . "</a>";
} else {
$songprops[T_('Links')] .= "&nbsp;<a href=\"https://musicbrainz.org/taglookup?tag-lookup.artist=%22" . rawurlencode($this->song->f_artist) . "%22&tag-lookup.track=%22" . rawurlencode($this->song->f_title) . "%22\" target=\"_blank\">" . UI::get_icon('musicbrainz', T_('Search on Musicbrainz ...')) . "</a>";
$songprops[T_('Links')] .= "&nbsp;<a href=\"https://musicbrainz.org/taglookup?tag-lookup.artist=%22" . rawurlencode($this->song->f_artist) . "%22&tag-lookup.track=%22" . rawurlencode($this->song->f_name) . "%22\" target=\"_blank\">" . UI::get_icon('musicbrainz', T_('Search on Musicbrainz ...')) . "</a>";
}
$songprops[T_('Comment')] = scrub_out($this->song->comment);
$label_string = '';
Expand Down
2 changes: 1 addition & 1 deletion src/Module/Api/Daap_Api.php
Expand Up @@ -512,7 +512,7 @@ private static function tlv_songs($songs, $meta)
foreach ($meta as $tag) {
switch ($tag) {
case 'dmap.itemname':
$output .= self::tlv($tag, $song->f_title);
$output .= self::tlv($tag, $song->f_name);
break;
case 'dmap.containeritemid':
/* case 'dmap.persistentid': */ $output .= self::tlv($tag, $song->id);
Expand Down
12 changes: 6 additions & 6 deletions src/Module/Api/Json_Data.php
Expand Up @@ -779,7 +779,7 @@ public static function podcasts($podcasts, $user_id = null, $episodes = false, $
$rating = new Rating($podcast_id, 'podcast');
$flag = new Userflag($podcast_id, 'podcast');
$art_url = Art::url($podcast_id, 'podcast', Core::get_request('auth'));
$podcast_name = $podcast->f_title;
$podcast_name = $podcast->f_name;
$podcast_description = $podcast->description;
$podcast_language = $podcast->f_language;
$podcast_copyright = $podcast->f_copyright;
Expand Down Expand Up @@ -845,8 +845,8 @@ public static function podcast_episodes($podcast_episodes, $user_id = null, $enc
$art_url = Art::url($episode->podcast, 'podcast', Core::get_request('auth'));
array_push($JSON, [
"id" => (string) $episode_id,
"title" => $episode->f_title,
"name" => $episode->f_title,
"title" => $episode->f_name,
"name" => $episode->f_name,
"description" => $episode->f_description,
"category" => $episode->f_category,
"author" => $episode->f_author,
Expand Down Expand Up @@ -917,8 +917,8 @@ public static function songs($songs, $user_id = null, $encode = true, $object =

$ourArray = array(
"id" => (string)$song->id,
"title" => $song->f_title,
"name" => $song->f_title,
"title" => $song->f_name,
"name" => $song->f_name,
"artist" => array(
"id" => (string) $song->artist,
"name" => $song->get_artist_name()),
Expand Down Expand Up @@ -1063,7 +1063,7 @@ public static function democratic($object_ids = array(), $user_id = null, $objec

array_push($JSON, array(
"id" => (string)$song->id,
"title" => $song->f_title,
"title" => $song->f_name,
"artist" => array("id" => (string) $song->artist, "name" => $song->f_artist_full),
"album" => array("id" => (string) $song->album, "name" => $song->f_album_full),
"genre" => self::genre_array($song->tags),
Expand Down

0 comments on commit eb163a7

Please sign in to comment.